IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FTP file date manipulation


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Wed Aug 29, 2012 8:35 am
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: 74
Location: Boston

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

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

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

Superior Member


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

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

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

Moderator Emeritus


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

PostPosted: Wed Aug 29, 2012 6:20 pm
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: 74
Location: Boston

PostPosted: Thu Aug 30, 2012 12:37 pm
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 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

Moderator Emeritus


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

PostPosted: Thu Aug 30, 2012 6:29 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top