Solved

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

Posted on 2011-03-14
1
1,368 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
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, f…
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…

705 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