Solved

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

Posted on 2011-03-14
1
1,340 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the past decade, as Internet security has become a chief concern of IT professionals, one of the most common questions administrators and users ask is, “Which is more secure, SFTP or FTPS?” In short, both file transfer protocols offer a high…
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…
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…
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…

863 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

21 Experts available now in Live!

Get 1:1 Help Now