Solved

Is there a way to obtain the system date when executing the IBM FTP?

Posted on 2011-03-14
1
1,333 Views
Last Modified: 2013-12-09
When running a EXEC=FTP on the mainframe, executing the IBM program called FTP is there a way to obtain the system date and then use the system date as part of the file name?
For example, in the following PUT statement, I need to obtain the current date YYYYMMDD:
PUT 'mainframe.file(0)'   YYYYMMDD_server_filename.TXT
 
0
Comment
Question by:preferredbooks
1 Comment
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 35128301
A couple of possibilities:

1) If you have a job scheduler typically they have the ability to have variables in the JCL and fill in.  We do this with BMC's Control-M all of the time.  I am sure that other job schedulers have the same featuer/function.

2) Instead of executing FTP in batch, you could setup a REXX that calls FTP and the REXX can get the system date/time and pass everything to FTP.

3) TCP/IP provides a program, EZACFSM1, that you can feed your JCL into and it will resove any system symbols you have coded in it and then you submit the job to the internal reader.

I'm not sure if there is a system symbol for YYYYMMDD, but you could use:

     &YR4.&MON.&DAY

to build it.  The above will get you the date based on GMT time.  If you want local time you would need to use:

      &LYR4.&LMON.&LDAY
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

With the withdrawal of support for Windows Server 2003 this summer, many clients face the issue of moving away from their 2003 installs. There are a few options out there that many people/companies are selling. But the clients I have, haven't wanted…
Cloud file services can fill many different roles for your business. Often, the use of cloud file services begins with employees using consumer products, like Dropbox, to share files with customers and each other. While sync-and-share can be an effe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now