Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Change of file name at receiving end thru FTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
radhakrishnan82

Senior Member


Joined: 31 Mar 2005
Posts: 386
Location: chennai, India

PostPosted: Fri Aug 12, 2005 12:34 pm    Post subject: Change of file name at receiving end thru FTP
Reply with quote

FTP parameters:

my control card has

*ip*
*user*
*pw*
put 'AAA.BBBB' CCC.txt (the file name is to be suffixed with datetimestamp and it should be changed for each ran of the job.The name should look like CCC200508121250 and the next day it should be CCC20050813121206 and so on....)
quit

Give me your suggestions whether i could change it on JCL side.no problem if change should be in the program(pls provide the code).
Back to top
View user's profile Send private message
References
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3380
Location: Charlotte,NC USA

PostPosted: Fri Aug 12, 2005 5:54 pm    Post subject: Re: Change of file name at receiving end thru FTP
Reply with quote

This step can build the "put" control card:
Code:

//*                                                 
//STEPXXXX EXEC PGM=SORT                             
//SORTIN   DD   *                                   
DUMMY RECORD                                         
/*                                                   
//SORTOUT  DD   DSN=&&T1,DISP=(,PASS)               
//SYSOUT   DD   SYSOUT=*                             
//SYSIN    DD   *                                   
  OPTION COPY                                       
  INREC FIELDS=(DATE1,TIME1)                         
  OUTFIL OUTREC=(1:C'put ''AAA.BBBB''',X,           
    C'ccc',1,12,C'.txt',                             
    80:X)                                           
/*                                                   
//                                                   
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3380
Location: Charlotte,NC USA

PostPosted: Fri Aug 12, 2005 6:39 pm    Post subject: Re: Change of file name at receiving end thru FTP
Reply with quote

radhakrishnan82, as a follow-up to your original post, you ask for suggestions, and even possible code samples. Yet, you have provided nowhere near enough background information (including what language the code should be in) for anyone to provide any reasonable suggestions.

Yes, I think that the program that is creating this data should also be supplying the value for the filename. There should be a process in place to easily re-transmit any file to it's original target filename, thereby overlaying the original file when needed. I think, for auditing and problem-tracking purposes, that there should be a one-to-one correlation between the dataset on the mainframe (which is presumably a GDG) and the target filename.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3380
Location: Charlotte,NC USA

PostPosted: Sat Aug 13, 2005 2:17 am    Post subject: Re: Change of file name at receiving end thru FTP
Reply with quote

Another option:
Code:

//STEPXXXX EXEC PGM=EZACFSM1                         
//SYSPRINT DD   SYSOUT=*                             
//SYSOUT   DD   DSN=&T1,DISP=(,PASS)                 
//SYSIN    DD   *                                   
put 'AAA.BBBB' ccc&LYR4&LMON&LDAY&LHR&LMIN..txt     
/*                                                   
//*                                                 
Back to top
View user's profile Send private message
prasanth_thavva

Active User


Joined: 28 Jul 2005
Posts: 103
Location: Bangalore

PostPosted: Sat Aug 13, 2005 4:11 pm    Post subject: Change of file name at receiving end thru FTP
Reply with quote

regarding this issue
ccc&LYR4&LMON&LDAY&LHR&LMIN..txt
How it will work can any body clear
this above thing is given in sysin dd *
EZACFSM1 icon_question.gif
Back to top
View user's profile Send private message
radhakrishnan82

Senior Member


Joined: 31 Mar 2005
Posts: 386
Location: chennai, India

PostPosted: Tue Aug 16, 2005 9:30 am    Post subject:
Reply with quote

superk,

Sorry to feel that i ran short of information.
My requirement is a new one and nowhere its been used in our shop till.
The code can either be in JCL or in COBOL.I thought of writing a cobol program to implement this logic. But if it can be done thru JCL,its well and good.

Thanks for the above solutions.I will try it at my end.
Back to top
View user's profile Send private message
radhakrishnan82

Senior Member


Joined: 31 Mar 2005
Posts: 386
Location: chennai, India

PostPosted: Tue Aug 16, 2005 1:29 pm    Post subject:
Reply with quote

When i ran the above,it gave FTP Return Code = 99000
Back to top
View user's profile Send private message
radhakrishnan82

Senior Member


Joined: 31 Mar 2005
Posts: 386
Location: chennai, India

PostPosted: Tue Aug 16, 2005 3:15 pm    Post subject:
Reply with quote

Now its working fine.But tell me is it possible to append upto milliseconds to the FTP'd dataset instead of stopping upto SECONDS.

Thanks for all your replies.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3380
Location: Charlotte,NC USA

PostPosted: Thu Aug 18, 2005 3:36 pm    Post subject: Re: Change of file name at receiving end thru FTP
Reply with quote

Where would you find a time value down to that level of precision?
Back to top
View user's profile Send private message
radhakrishnan82

Senior Member


Joined: 31 Mar 2005
Posts: 386
Location: chennai, India

PostPosted: Thu Aug 18, 2005 5:33 pm    Post subject: Re: Change of file name at receiving end thru FTP
Reply with quote

I think of the same.But my requirement is to add upto that precision.
Don't we have a symbol to do upto that precision level?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3380
Location: Charlotte,NC USA

PostPosted: Thu Aug 18, 2005 6:12 pm    Post subject: Re: Change of file name at receiving end thru FTP
Reply with quote

These are the standard Dynamic System Symbols:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E241/2.2.2
Back to top
View user's profile Send private message
radhakrishnan82

Senior Member


Joined: 31 Mar 2005
Posts: 386
Location: chennai, India

PostPosted: Fri Aug 19, 2005 10:02 am    Post subject:
Reply with quote

I had already searched in Dynamic System Symbols.But the symbol for millisecond level is not present in it.

I concatenated some of dynamic system symbols with &LSEC to acheive that precision level.Though it doesn't give the exact millisecond value,the point is to differentiate at the next level to seconds.Hence I concatenated the symbols to acheive it.

Thanks,superk.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1