MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
naveen_summary Beginner Joined: 12 Feb 2007 Posts: 26 Topics: 13
Posted: Tue Mar 25, 2008 8:26 am Post subject: Building dynamic Parm based on Month.
Hello,
I have a requirement wherein I need to build in dynamic parm based on month.
//Job Exec Proc xx,Month=&month (01,02,....,12)
Is this possible via sort?
I think I could use the below code I found in this site by directing the the SYSOUT to INTRDR. Wil try the code and update. Thanks.
Code:
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY RECORD
//SORTOUT DD DSN=...output
//SYSIN DD *
OPTION COPY
INREC FIELDS=(DATE1)
OUTFIL OUTREC=(1:C'put //DD:SYSUT1 ',
C'rpt',5,4,C'.txt',80:X,/,
1:C'quit')
/*
with this result:
Code:
put //DD:SYSUT1 rpt0924.txt
quit
Thanks in Advance.
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Mar 25, 2008 10:18 am Post subject:
naveen_summary ,
You dont need to direct to intrdr to generate the card. I am assuming that your final goal is to use the card for FTP
use the following DFSORT JCl which will give you the desired results
Code:
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
RPTDATE,S'&LMON&LDAY'
//SORTIN DD DUMMY,LRECL=80,RECFM=FB,BLKSIZE=80
//SORTOUT DD DSN=&&T1,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=('PUT //DD:SYSUT1 RPT',RPTDATE,'.TXT',/,
'QUIT',80:X)
//*
//STEP0200 EXEC PGM=FTP
//SYSPRINT DD SYSOUT=*
//INPUT DD *
ip address
userid
password
// DD DSN=&&T1,DISP=SHR
Hope this helps...
Cheers _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum