View previous topic :: View next topic
|
Author |
Message |
bhavya_sha
New User
Joined: 16 Apr 2005 Posts: 33
|
|
|
|
Hi,
I have a job to generate 34 files every monthl and same has to be FTPd to different system.
Now as we are automating this process for every month & job creates files with 'DYYMM' (D is character & 1601) as third qualifier.
I have a proc where sysin dataset is having symbolic variable(giving the 3rd qualifier dynamically) while FTPing DS.
But symbolic variable in a proc's sysin dsn is not getting expanded/replaced.
Would be of great help if any one helps with alternates to achieve the same.
Thanks & Regards,
Bhavya M S |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1745 Location: Tirupur, India
|
|
|
|
Hello,
Not sure if there is a more effecient way to do this, I used to have SORT with symbolic substitution for dynamic date on filenames.
Code: |
//SUBDATE EXEC PGM=SORT
//SYMNAMES DD *
YRMON,S'&YR2.&MON.'
//SORTIN DD *
some control cards here...
FTP FILENAME.DYYMM SOME.OUTPUT
/*
//SORTOUT DD DSN=&&TEMP1,DISP=(,PASS),SPACE=(TRK,1)
//SYSOUT DD SYSOUT=A
//SYSIN DD *
OPTION COPY
INREC FINDREP=(IN=C'YYMM',OUT=YRMON)
/* |
Input :
Code: |
some control cards here...
FTP FILENAME.DYYMM SOME.OUTPUT |
Output: written to &&TEMP1 - this can be used as SYSIN in the following step.
Code: |
some control cards here...
FTP FILENAME.D1501 SOME.OUTPUT |
Hope it helps. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I work in Data Transmissions and we send lots of files everyday via FTP, SFTP and NDM with variable filenames. We either use Scheduler variables, system variables, or a combination of both. All of our jobs use a PROC of some sort. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1745 Location: Tirupur, India
|
|
|
|
Quote: |
We either use Scheduler variables, system variables |
I think using the scheduler variables would be more reliable than the SORT solution I posted. Since the SORT solution dates would vary if the job failed and the restart happens in the following day. Scheduler variable however would remain the same, if needed.
The SORT solution was for a quick and dirty user job. |
|
Back to top |
|
|
|