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

Posted on 2011-03-14
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
Question by:preferredbooks
1 Comment
LVL 57

Accepted Solution

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:


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


Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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 ( First, just open a new email message. In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With  eFax Corporate (, 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, f…

831 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