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
 
Changing the control card without opening the JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
knd_r
Currently Banned

New User


Joined: 18 Mar 2005
Posts: 48

PostPosted: Mon May 23, 2005 11:34 am    Post subject: Changing the control card without opening the JCL
Reply with quote

hi,

i want to submit my jcl by changing the control card without opening the jcl. how to do it?

bye,
ks reddy.
Back to top
View user's profile Send private message
References
MGIndaco

Moderator


Joined: 10 Mar 2005
Posts: 478
Location: Milan, Italy

PostPosted: Mon May 23, 2005 3:13 pm    Post subject:
Reply with quote

I think that there are several method to do what you need.

You can use a jcl within a IDCAMS(to skip your jobcard) and IKJEFT01(to submit with your default jobcard all the other statement) as simple way or you can compose a new jcl with a static jobcard store in a PS and then use the previous method....
...or in difficult way(hard only for new users) you can use a rexx or a clist... but in all these cases the initial variable(both for the sample above) is the number of row of your job card in the original dataset.
If you have your jobcard in one row it's easy but if you have in 3 or 4 rows you must think and write some line of source more...
If you need pratical sample I'm here...
Back to top
View user's profile Send private message
knd_r
Currently Banned

New User


Joined: 18 Mar 2005
Posts: 48

PostPosted: Mon May 23, 2005 7:43 pm    Post subject:
Reply with quote

hi mgindaco,

please give me a practical example.

thanks,
ks reddy.
Back to top
View user's profile Send private message
MGIndaco

Moderator


Joined: 10 Mar 2005
Posts: 478
Location: Milan, Italy

PostPosted: Mon May 23, 2005 8:33 pm    Post subject:
Reply with quote

Assume that you have only one row as JOBCARD:
Code:
//*-------------------------------------------------------------------*
//*- DELETE OUTPUT FILE ----------------------------------------------*
//*-------------------------------------------------------------------*
//DELETEPS EXEC PGM=IDCAMS                                             
//SYSPRINT DD SYSOUT=*                                                 
//SYSIN    DD *                                                       
 LISTCAT ENTRIES(USERID.PS.TMPJCL)                                     
 IF MAXCC = 0 THEN DO                                                 
    DELETE (USERID.PS.TMPJCL)                                         
 END                                                                   
 ELSE DO                                                               
    SET MAXCC = 0                                                     
 END                                                                   
//*-------------------------------------------------------------------*
//*- ALLOCATE TEMPORARY PS FOR JCL -----------------------------------*
//*-------------------------------------------------------------------*
//ALLOCATE EXEC PGM=IEFBR14                                           
//DD1     DD DISP=(,CATLG),LRECL=80,RECFM=FB,SPACE=(TRK,(2,1),RLSE),   
//           DSN=USERID.PS.TMPJCL                                     
//*-------------------------------------------------------------------*
//*- BUILD JCL WITH NEW JOBCARD --------------------------------------*
//*-------------------------------------------------------------------*
//BUILDJCL EXEC PGM=IDCAMS                                             
//SYSPRINT DD SYSOUT=*                                                 
//INP1     DD DISP=SHR,DSN=MYLIB.PROCLIB(MYSKJOB)                     
//INP2     DD DISP=SHR,DSN=MYLIB.PROCLIB(MYJOB)                       
//OUTPUT   DD DISP=MOD,DSN=USERID.PS.TMPJCL                           
//SYSIN    DD *                                                       
 REPRO INFILE(INP1) OUTFILE(OUTPUT)                                   
 REPRO INFILE(INP2) OUTFILE(OUTPUT) SKIP(1)                           
//*-------------------------------------------------------------------*
//*- SUBMIT THE JOB --------------------------------------------------*
//*-------------------------------------------------------------------*
//SUBMIT   EXEC PGM=IKJEFT01,PARM='',DYNAMNBR=50,                     
//             REGION=4096K                                           
//SYSTSPRT DD SYSOUT=*                                                 
//SYSTSIN  DD *                                                       
 PROF PREFIX(MYUSERID)                                                 
 SUBMIT 'USERID.PS.TMPJCL'                                             
//*-------------------------------------------------------------------*
//*--------------------- END OF JOB ----------------------------------*
//*-------------------------------------------------------------------*


Tell me if you also need a Rexx source to make the same thing but with perfect knowledge about the right number of row in the original jobcard.
Back to top
View user's profile Send private message
knd_r
Currently Banned

New User


Joined: 18 Mar 2005
Posts: 48

PostPosted: Tue May 24, 2005 7:29 pm    Post subject:
Reply with quote

thanks mgindaco,
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