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
 

 

Is there is a way to append Date and Time in FTP file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Thu Feb 22, 2007 4:03 pm    Post subject: Is there is a way to append Date and Time in FTP file
Reply with quote

Could anyone please let me know if there is a way to append Date and Time in FTP file....

Code:

//STEPFTP  EXEC PGM=FTP
//SYSTCPD  DD DISP=SHR,DSN=SYS0.PARMLIB(TCPDATA)                 
//OUTPUT   DD SYSOUT=*                                           
//SYSPRINT DD SYSOUT=*                                           
//INPUT    DD *                 
 IP Address                                 
 User ID                                                       
 Pass Word                                                       
 File Path
 PUT 'Host File' FTPTEST_Date_Time.TXT                       
 QUIT                                           
/*                 
//*
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Thu Feb 22, 2007 5:33 pm    Post subject: Re: Is there is a way to append Date and Time in FTP file
Reply with quote

I'm not sure I follow your question - you've already shown how in your example. All you need is for your application/program/utility/script to supply the appropriate values to the target filename string, FTPTEST_Date_Time.TXT, in the appropriate format, i.e. the application creates the string FTPTEST_20070222_0800.TXT in the dataset 'HLQ.FTPPUT'. The FTP job picks that up:

Code:

//STEPFTP  EXEC PGM=FTP
//SYSTCPD  DD DISP=SHR,DSN=SYS0.PARMLIB(TCPDATA)                 
//OUTPUT   DD SYSOUT=*                                           
//SYSPRINT DD SYSOUT=*                                           
//INPUT    DD *                 
IP Address                                 
User ID                                                       
Pass Word                                                       
File Path
put 'Host File' +
// DD DISP=SHR,DSN=HLQ.FTPPUT
// DD *
quit                                           
/*                 
//*
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Thu Feb 22, 2007 6:43 pm    Post subject: Re: Is there is a way to append Date and Time in FTP file
Reply with quote

Here's an actual job I just put into production yesterday. It only needs the date, but the method for the time is similar:

Code:

//jobname JOB (...),CLASS=...         
//*                                                               
//STEP1    EXEC PGM=EZACFSM1                                       
//SYSIN    DD   *
put //dd:sysut1 filename_&YR4&MON&DAY..dat     
qui                                                             
/*
//SYSOUT   DD   DSN=&&T,DISP=(,PASS),UNIT=VIO,                     
//         RECFM=FB,LRECL=80,BLKSIZE=0                             
//*                                                               
//STEP2    EXEC PGM=FTP,                                           
// PARM='ftpsite 21 (Exit=8'             
//NETRC    DD   DISP=SHR,DSN=NETRC.DATASET
//SYSUT1   DD   DISP=SHR,DSN=THE.DATA.FILE
//OUTPUT   DD   SYSOUT=*                                           
//INPUT    DD   *
ascii                                               
sendsite                                           
locsite sbsendeol=crlf                             
cd /app/dashboard/loader/landing/                   
/*
//         DD   DSN=&&T,DISP=(OLD,DELETE)                         
//*                                                                 
// IF (STEP2.RC = 0) THEN                                             
//STEP3    EXEC PGM=SORT                                             
//SORTIN   DD   DISP=SHR,DSN=THE.DATA.FILE
//SORTOUT  DD   DISP=SHR,DSN=THE.DATA.FILE
//SYSOUT   DD   SYSOUT=*                                             
//SYSIN    DD   *
  OPTION COPY       
  OMIT COND=ALL     
/*
// ENDIF                                                             
//*                                                                   


The EZACFSM1 program is part of TCP/IP. It is known as the "symbol translator utility". EZACFSM1 reads an input file and writes to an output file, translating any symbols in the process.

See reference here: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B350/1.2.9.1?SHELF=AP0ABK19&DT=20050708113621

The symbols it translates are the MVS built-in dynamic system symbols. A basic set is provided by IBM, and others can be created by your MVS systems programmers. You can check here for the list of standard dynamic system variables: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E241/2.2.2

The FTP program is part of TCP/IP. See reference here: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/3.0?DT=20050708142126
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu Feb 22, 2007 7:39 pm    Post subject: FTP query
Reply with quote

Superk,

What should we need to change is we are transfering that file to J:\asp\cai\ftp ... Please adivse on the same....

Is EZACFSM1 a utility ? is it only used for FTP operations ???
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Thu Feb 22, 2007 8:50 pm    Post subject: Re: FTP query
Reply with quote

khamarutheen wrote:

What should we need to change is we are transfering that file to J:\asp\cai\ftp

I don't know what you're asking. If you need to change directories, then you need to code an appropriate FTP "cd" (Change Directory) command.

khamarutheen wrote:
Is EZACFSM1 a utility ? is it only used for FTP operations ???


Did you look at the links I provided? EZACFSM1 is a utility, although unlike a utility such as IEBGENER or IEBCOPY, it probably does NOT reside in SYS1.LINKLIB, but instead is most likely in one of the TCP/IP Linklib's. So, I can't make any guarantee that you'll have access to it. It can be used for any purpose you desire, although I feel that you're always better off using your site's approved standardized variables, such as those provided by your job scheduling system.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu Feb 22, 2007 10:23 pm    Post subject: FTP query
Reply with quote

Quote:
What should we need to change is we are transfering that file to J:\asp\cai\ftp

I don't know what you're asking. If you need to change directories, then you need to code an appropriate FTP "cd" (Change Directory) command.


Superk , what 's my doubt is ... When we download i want to download to J: drive which is a remote system share drive ... so how do i get connected to that drive first ... moving to the directory is known but how can i move to the drive ???? icon_cry.gif
Back to top
View user's profile Send private message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Fri Feb 23, 2007 1:46 pm    Post subject: Re: Is there is a way to append Date and Time in FTP file
Reply with quote

You have to provide the IP address of the target location in the PARM in STEP2.

Please correct me if I am wrong....
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Sun Feb 25, 2007 5:00 pm    Post subject: Re: Is there is a way to append Date and Time in FTP file
Reply with quote

k.a.khamaurutheen, to answer your question ... I don't know. I've never seen an FTP server that allowed the user to change from the default drive designation to another drive. You might have to dig into the technical details of your software more.

To be honest, when talking about sending data to a specific drive, it almost sounds as if you want to issue a mount (using something like NFS), which is a discussion probably better suited to a Network engineer.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am


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