MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Building dynamic Parm based on Month.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
naveen_summary
Beginner


Joined: 12 Feb 2007
Posts: 26
Topics: 13

PostPosted: Tue Mar 25, 2008 8:26 am    Post subject: Building dynamic Parm based on Month. Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Mar 25, 2008 10:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group