View previous topic :: View next topic
Author
Message
maddop New User Joined: 14 Mar 2006Posts: 8 Location: Liverpool
Does anyone know if you can use fileaid to insert 1 line of code into a range of members within 1 dataset.
e.g.
Dataset: deypm1.test.jobs
Range: MADDKTA0 - MADDKTK1 (102 members in total)
Line of code: //*%PREP RUNS_ON DEV1
If so can someone provide a sample?
Thanks,
Paul
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi,
I know the subject mentions adding 1 line of JCL to the top of X members.
I have an example below on how to insert a line after the string "EXEC" is found. (i know this is not what you asked for but it may assist, I have not ben able to insert at the top)
Gerry
Code:
//STEP0001 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=INPUT-PDS,
// DISP=SHR
//DD01O DD DSN=OUTPUT-PDS,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,5,5),RLSE),
// DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
$$DD01 USER WRITE=DD01O,PADCHAR=C' ',
IF=(1,0,C'EXEC'),
MOVE=(1,C'//*%PREP RUNS_ON DEV1'),
WRITE=DD01O,PADCHAR=C' '
//*
//**********************************************************************
Back to top
maddop New User Joined: 14 Mar 2006Posts: 8 Location: Liverpool
Hi Gerry,
Many thanks for you reply but I have been able to add a line after EXEC...
Unfortunately nobody appears to know if it is possible to add a line at the top...
I guess I will have to try do it the long way - manually!!! damn!
Thanks anyway...
Paul.
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
It doesn't look like I appended the code correctly.
Gerry
Code:
//**********************************************************************
//FILEAID1 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=CSCSGLC.IBM(A),DISP=SHR
//DD01O DD DSN=CSCSGLC.IBM.OUT(A),DISP=SHR
//SYSIN DD *
$$DD01 USER MOVE=(1,080C' '),
MOVE=(1,C'//*%PREP RUNS_ON DEV1'),
WRITE=DD01O,OUT=1,
MOVE=(1,80,1),
WRITE=DD01O
$$DD01 USER MOVE=(1,80,1),
WRITE=DD01O
//**********************************************************************
Back to top
Please enable JavaScript!