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

Propagate fields (WHEN=GROUP), but not on all records...


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tuxama

New User


Joined: 25 Jan 2007
Posts: 42
Location: france

PostPosted: Wed Nov 20, 2013 5:13 pm
Reply with quote

Hello,

I have an input file containing 80 JCL of several steps.

I have to propagate on all lines jobnames in column 80 and stepname in column 90. To obtain the following result:

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+--

./ ADD    NAME=F2LAG8021 SOURCE=0035 PDS=ADCX.OPC.BTQ.JOBLIB.REF.SYSQ          F2LAG802
//F2LAG802 JOB (00000000,00000000000BAZ,AE07A30L00AQ00,'R=00 '),        $OPC$V F2LAG802
//             RD=R,CLASS=I,MSGCLASS=9,SCHENV='SE_DB2DS'                       F2LAG802
//*%OPC SCAN                                                                   F2LAG802
//*%OPC SETVAR  TAOCP00O=(OYMD1    + 00WD),PHASE=SETUP                         F2LAG802
//JCLLIB   JCLLIB     ORDER=(ADCX.JOB.&SYSNAME..JCLLIB,                        F2LAG802
//             EXPL.JOB.$$$.JCLLIB)                                            F2LAG802
//*                                                                            F2LAG802
//*-------------------------------------------------------------------         F2LAG802
//S01      EXEC CHPNN,PROG=IKJEFT1B,                                           F2LAG802  S01     
//             DATOPC=&OYMD1.                                                  F2LAG802  S01     
/*                                                                             F2LAG802  S01     
...                                                                            F2LAG802  S01     
//S02      EXEC CHPNN,PROG=IKJEFT1B,                                           F2LAG802  S02     
//             DATOPC=&OYMD1.                                                  F2LAG802  S02     
/*                                                                             F2LAG802  S02     
...                                                                            F2LAG802  S02
./ ADD    NAME=FAAAAAAA SOURCE=0036 PDS=ADCX.OPC.BTQ.JOBLIB.REF.SYSQ           FAAAAAAA
//FAAAAAAA JOB (00000000,00000000000BAZ,AE07A30L00AQ00,'R=00 '),        $OPC$V FAAAAAAA
//             RD=R,CLASS=I,MSGCLASS=9,SCHENV='SE_DB2DS'                       FAAAAAAA
//*%OPC SCAN                                                                   FAAAAAAA
//*%OPC SETVAR  TAOCP00O=(OYMD1    + 00WD),PHASE=SETUP                         FAAAAAAA
//JCLLIB   JCLLIB     ORDER=(ADCX.JOB.&SYSNAME..JCLLIB,                        FAAAAAAA
//             EXPL.JOB.$$$.JCLLIB)                                            FAAAAAAA
//*                                                                            FAAAAAAA
//*-------------------------------------------------------------------         FAAAAAAA
//S11      EXEC CHPNN,PROG=IKJEFT1B,                                           FAAAAAAA  S11     
//             DATOPC=&OYMD1.                                                  FAAAAAAA  S11     
/*                                                                             FAAAAAAA  S11     
//...                                                                          FAAAAAAA  S11     
//S22      EXEC CHPNN,PROG=IKJEFT1B,                                           FAAAAAAA  S12     
//             DATOPC=&OYMD1.                                                  FAAAAAAA  S12     
/*                                                                             FAAAAAAA  S12     
...


The following :
Code:
  INREC IFTHEN=(WHEN=GROUP,                             
                BEGIN=(1,15,CH,EQ,C'./ ADD    NAME='), 
                PUSH=(80:16,8)),                       
        IFTHEN=(WHEN=GROUP,                             
                BEGIN=(12,4,CH,EQ,C'EXEC'),             
                PUSH=(90:3,8))                         


Produce :
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+--

./ ADD    NAME=F2LAG8021 SOURCE=0035 PDS=ADCX.OPC.BTQ.JOBLIB.REF.SYSQ          F2LAG802
//F2LAG802 JOB (00000000,00000000000BAZ,AE07A30L00AQ00,'R=00 '),        $OPC$V F2LAG802
//             RD=R,CLASS=I,MSGCLASS=9,SCHENV='SE_DB2DS'                       F2LAG802
//*%OPC SCAN                                                                   F2LAG802
//*%OPC SETVAR  TAOCP00O=(OYMD1    + 00WD),PHASE=SETUP                         F2LAG802
//JCLLIB   JCLLIB     ORDER=(ADCX.JOB.&SYSNAME..JCLLIB,                        F2LAG802
//             EXPL.JOB.$$$.JCLLIB)                                            F2LAG802
//*                                                                            F2LAG802
//*-------------------------------------------------------------------         F2LAG802
//S01      EXEC CHPNN,PROG=IKJEFT1B,                                           F2LAG802  S01     
//             DATOPC=&OYMD1.                                                  F2LAG802  S01     
/*                                                                             F2LAG802  S01     
...                                                                            F2LAG802  S01     
//S02      EXEC CHPNN,PROG=IKJEFT1B,                                           F2LAG802  S02     
//             DATOPC=&OYMD1.                                                  F2LAG802  S02     
/*                                                                             F2LAG802  S02     
...                                                                            F2LAG802  S02
./ ADD    NAME=FAAAAAAA SOURCE=0036 PDS=ADCX.OPC.BTQ.JOBLIB.REF.SYSQ           FAAAAAAA  S02
//FAAAAAAA JOB (00000000,00000000000BAZ,AE07A30L00AQ00,'R=00 '),        $OPC$V FAAAAAAA  S02
//             RD=R,CLASS=I,MSGCLASS=9,SCHENV='SE_DB2DS'                       FAAAAAAA  S02
//*%OPC SCAN                                                                   FAAAAAAA  S02
//*%OPC SETVAR  TAOCP00O=(OYMD1    + 00WD),PHASE=SETUP                         FAAAAAAA  S02
//JCLLIB   JCLLIB     ORDER=(ADCX.JOB.&SYSNAME..JCLLIB,                        FAAAAAAA  S02
//             EXPL.JOB.$$$.JCLLIB)                                            FAAAAAAA  S02
//*                                                                            FAAAAAAA  S02
//*-------------------------------------------------------------------         FAAAAAAA  S02
//S11      EXEC CHPNN,PROG=IKJEFT1B,                                           FAAAAAAA  S11     
//             DATOPC=&OYMD1.                                                  FAAAAAAA  S11     
/*                                                                             FAAAAAAA  S11     
//...                                                                          FAAAAAAA  S11     
//S22      EXEC CHPNN,PROG=IKJEFT1B,                                           FAAAAAAA  S12     
//             DATOPC=&OYMD1.                                                  FAAAAAAA  S12     
/*                                                                             FAAAAAAA  S12     
...


So the problem is how to propagate correctly the stepname.

Does anyone have any ideas ?
Back to top
View user's profile Send private message
tuxama

New User


Joined: 25 Jan 2007
Posts: 42
Location: france

PostPosted: Wed Nov 20, 2013 5:53 pm
Reply with quote

The errors on the following lines :
Code:

./ ADD    NAME=FAAAAAAA SOURCE=0036 PDS=ADCX.OPC.BTQ.JOBLIB.REF.SYSQ           FAAAAAAA  S02
//FAAAAAAA JOB (00000000,00000000000BAZ,AE07A30L00AQ00,'R=00 '),        $OPC$V FAAAAAAA  S02
//             RD=R,CLASS=I,MSGCLASS=9,SCHENV='SE_DB2DS'                       FAAAAAAA  S02
//*%OPC SCAN                                                                   FAAAAAAA  S02
//*%OPC SETVAR  TAOCP00O=(OYMD1    + 00WD),PHASE=SETUP                         FAAAAAAA  S02
//JCLLIB   JCLLIB     ORDER=(ADCX.JOB.&SYSNAME..JCLLIB,                        FAAAAAAA  S02
//             EXPL.JOB.$$$.JCLLIB)                                            FAAAAAAA  S02
//*                                                                            FAAAAAAA  S02
//*-------------------------------------------------------------------         FAAAAAAA  S02


Because they do not belong to any step.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Nov 20, 2013 6:34 pm
Reply with quote

This code should have an end
Code:
     IFTHEN=(WHEN=GROUP,                             
                BEGIN=(12,4,CH,EQ,C'EXEC'),             
                PUSH=(90:3,8))


Atleast if you have comment to mark the end it should be regarded as END

Or I could think of is end at './ ADD NAME=' and dont consider the step name
Back to top
View user's profile Send private message
tuxama

New User


Joined: 25 Jan 2007
Posts: 42
Location: france

PostPosted: Wed Nov 20, 2013 7:03 pm
Reply with quote

The question is sometimes stupid ...
Thank you for your answer that solves my problem.

The code is :
Code:

  INREC IFTHEN=(WHEN=GROUP,                           
                BEGIN=(1,15,CH,EQ,C'./ ADD    NAME='),
                PUSH=(80:16,8)),                     
        IFTHEN=(WHEN=GROUP,                           
                BEGIN=(12,4,CH,EQ,C'EXEC'),           
                END=(1,15,CH,EQ,C'./ ADD    NAME='), 
                PUSH=(90:3,8)),                       
        IFTHEN=(WHEN=(1,15,CH,EQ,C'./ ADD    NAME='),
                OVERLAY=(90:7X))                     
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Nov 20, 2013 7:09 pm
Reply with quote

Glad it solves your problem and would recommend you to read the manual as there are many options that would be explained with sample codes and which would help you learning yourself and saves time icon_smile.gif
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top