Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

FTP file date manipulation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ronny John

New User


Joined: 30 Mar 2010
Posts: 33
Location: USA

PostPosted: Wed Aug 29, 2012 8:28 am    Post subject: FTP file date manipulation
Reply with quote

Hi,
I have a requirement to send a file to an external vendor, they need to have two dates in the file name of the file being FTP-ed; one is the process date and the second date is 2 months from the process date(1st day of the second month)....for eg if i run an FTP today....the file name would be XXX_082812_YYYY_100112. Please let me know how this can be achieved? Can this be done using EZACFSM1?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 29, 2012 8:35 am    Post subject:
Reply with quote

Hello,

Suggest some code that will generate all of the needed ftp control statements and write them into a dataset. Then the ftp process simply reads the control statements and sends the file.

To generate the control statements sort, rexx, COBOL, or any tool that is used on your system..
Back to top
View user's profile Send private message
hailashwin

New User


Joined: 16 Oct 2008
Posts: 73
Location: Boston

PostPosted: Wed Aug 29, 2012 12:59 pm    Post subject:
Reply with quote

Looks like the same question in a different form which was moved to FAQ & Off Topics, yesterday

http://ibmmainframes.com/viewtopic.php?t=59297

If you are planning to use cobol, search for BPXWDYN which would dynamically allocate files after you have a logic in place to get the current date and 2 months after the current date.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Aug 29, 2012 3:59 pm    Post subject:
Reply with quote

Does this eariler thread provides some pointer: http://ibmmainframes.com/viewtopic.php?t=36108&highlight=ezacfsm1
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 29, 2012 6:20 pm    Post subject:
Reply with quote

Hello,

Quote:
If you are planning to use cobol, search for BPXWDYN which would dynamically allocate files after you have a logic in place to get the current date and 2 months after the current date.
There is nothing in the question relating to dynamic file allocation. . .

Unless i totally missed the the question, what is wanted is a way to place these dates in the filename to be sent to the "external vendor".

Why might you believe dynamic file allcation would be of use?
Back to top
View user's profile Send private message
hailashwin

New User


Joined: 16 Oct 2008
Posts: 73
Location: Boston

PostPosted: Thu Aug 30, 2012 12:37 pm    Post subject:
Reply with quote

Quote:
...for eg if i run an FTP today....the file name would be XXX_082812_YYYY_100112. Please let me know how this can be achieved?


...maybe I got this wrong, or tried to relate the earlier post by the same user with this one http://ibmmainframes.com/viewtopic.php?t=59297

I was under the impression that the TS had problem creating the file with two different dates in the file name and then FTP'ing it. Please correct me if I got this wrong.

If that was the problem, I thought it would be okay to create the data file using BPXWDYN and a FTP control card(having the dynamic file name) in the same cobol program. A FTP step following it would transmit the file.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Aug 30, 2012 6:29 pm    Post subject:
Reply with quote

Hello,

Yup, i believe you "got it wrong".

If i understand (and i might not) the goal is to create a value of "XXX_082812_YYYY_100112" to be the file name mentioned as the file on the target system.

It does not relate to a file on the mainframe which is what "dynamic allocaton" deals with.

So far we have heard nothing from Ron . . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us