Please help a newbie in JCL and mainframe

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
JISC
Member
Posts: 1
Joined: Wed Apr 04, 2007 12:54 am

Please help a newbie in JCL and mainframe

Post by JISC » Wed Apr 04, 2007 3:19 am

i have this code

Code: Select all

000019 //ERRFILE  DD DSN=TSHRCI.&MYFILE..&MYPLAN..D&MYDATE..ERRFILE,          
000020 //         DISP=(MOD,CATLG),LRECL=200,RECFM=FB,SPACE=(TRK,(90,90),RLSE)
000021 //SYSPRINT DD SYSOUT=*                                                 
000022 //SYSUDUMP DD SYSOUT=*                                                 
000023 //RUNCNTL  DD DISP=(,DELETE),DSN=&&RUNCNTL,SPACE=(TRK,1),              
000024 //            LRECL=80,RECFM=(FB)                                      
000025 //SYSIN    DD  *                                                       
000026 CONTROL PREFIX(EHPRT) SUFFIX(3) KEYU(30000)                            
000027 COMPANY *** MMMC ***                                                   
000028  GROUP PICS   COPT(4) LOGM(EHPRMODE) LOGD(3) APPLPROF(ON) -            
000029        JOURNAL(TSHRCI.TYKERBP2.PLANPN01.JOURNAL.PT1)                   
now i want the last line to be a variable, im such a newbie that i tried this

JOURNAL(TSHRCI..&MYFILE..&MYPLAN..D&MYDATE..JOURNAL.PT1)

but its not working, i think its a syntax error, can anybody here help me? thanks[/code]

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Apr 04, 2007 3:53 am

lines 26 thru 29 are instream data for SYSIN. JCL symbols modify JCL; not Instream data (lines 26 thru 29).
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Apr 04, 2007 4:54 am

by the way, your title for this thread is poor.

what you want to do is symbolically create your DSN for the ERRFILE and use the same substitution values to modify your instream data.

i can think of two choices:
  • A) modify the SYSIN input before the JCL is executed (leaving it instream)
  • B) modify the SYSIN input in a previous STEP (SYSIN would be temp DS)
.

A - write a REXX (or COBOL or PL1 or ASM) to generate the JCL, modifying the instream data on-the-fly and either SUBMIT or write it to INTRDR (or however you spell it!! Need to check out the REXX forum for this stuff.

B -
  • you might beable to modify the dataset containing your SYSIN data (or use it as input and generate a temp ds for input to the SYSIN) with DFSORT/ICETOOL when Frank checks in
  • write a program that inputs the JCL SYMBOLICs as PARM= parameters and resolve the symbols in the ds for input to the SYSIN - for that you may have to go to another forum (appl progm)
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others