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'ing the .txt file with date and time extension

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
srinivas_cog

New User


Joined: 05 Jun 2008
Posts: 17
Location: chennai

PostPosted: Fri Jun 27, 2008 10:24 am    Post subject: FTP'ing the .txt file with date and time extension
Reply with quote

Hi,

I need to ftp my mainframe file as .txt with date and time extension.

ex:

i have file1 as mainframe file, i need to ftp this file like
file1.200806271202 (ccyymmddhhmm).txt

PUT 'Mainframe dataset name' file1.CCYYMMDDHHMM.TXT .

When i searched in forums it is saying that not possible. Is there any way

Thanks
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: Fri Jun 27, 2008 11:20 am    Post subject:
Reply with quote

Hello,

Quote:
file1.200806271202 (ccyymmddhhmm).txt
This is an invalid mainframe dataset name - dsn nodes must be less than 9 characters and cannot begin with a numeral.

This does not mean that you cannot ftp some file to a remote location and use that name. UNIX and Windows have more flexible file naming rules.

If you create a file named MY.MAINFRM.FILE - you can ftp it and use tHe name you want to use ON THE TARGET SYSTEM. Something like:
Code:

PUT MY.MAINFRM.FILE file1.200806271202.txt
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jun 27, 2008 2:54 pm    Post subject:
Reply with quote

If your site has CA-7, you can use CARPROC to generate the date for the file name. If your site has a different scheduler, see if it can generate date fields.

Or, write a program to create the FTP commands with the date as part of the file name and run that program before running your FTP step, which would get input from the program's output.

Otherwise, the long way around would be to set up your JCL with step 1 being a Unix System Services shell script that creates the desired FTP commands, step 2 being an OGET to transfer the FTP commands to an MVS file name, and step 3 being the actual FTP execution, using as input the commands generated in step 1.

Since MVS systems do not have intrinsics for the date, these are pretty much your only options.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Fri Jun 27, 2008 4:44 pm    Post subject: Reply to: FTP'ing the .txt file with date and time extension
Reply with quote

This topic is for almost exactly the same requirement.
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 -> All Other Mainframe Topics 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