View previous topic :: View next topic
|
Author |
Message |
knd_r Currently Banned New User
Joined: 18 Mar 2005 Posts: 48
|
|
|
|
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 |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
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 |
|
|
knd_r Currently Banned New User
Joined: 18 Mar 2005 Posts: 48
|
|
|
|
hi mgindaco,
please give me a practical example.
thanks,
ks reddy. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
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 |
|
|
knd_r Currently Banned New User
Joined: 18 Mar 2005 Posts: 48
|
|
|
|
thanks mgindaco, |
|
Back to top |
|
|
|