IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FILEAID to add 1 line of JCL to the top of x members


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maddop

New User


Joined: 14 Mar 2006
Posts: 8
Location: Liverpool

PostPosted: Mon Nov 05, 2007 8:41 pm
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Nov 06, 2007 7:54 am
Reply with quote

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

New User


Joined: 14 Mar 2006
Posts: 8
Location: Liverpool

PostPosted: Tue Nov 06, 2007 2:03 pm
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Nov 08, 2007 10:27 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts Duplicate several members of/in one l... JCL & VSAM 7
Search our Forums:

Back to Top