Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
when=group clause: question about the end of group detection

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
tuxama

New User


Joined: 25 Jan 2007
Posts: 32
Location: france

PostPosted: Thu Mar 26, 2015 12:51 pm    Post subject: when=group clause: question about the end of group detection
Reply with quote

The input file contains several JCL concatenated one after the other and separated by a IEBUPDTE card "./ ADD".

I have to propagate the stepname column 90.

For this I use group instruction as well:

Code:

//CTL2CNTL DD *                                         
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(121:X)),
        IFTHEN=(WHEN=GROUP,                             
                BEGIN=(1,1,CH,EQ,C'//',AND,
                   3,1,CH,NE,C'*',AND,
                  4,71,SS,EQ,C' EXEC '),           
                END=(1,15,CH,EQ,C'./ ADD    NAME='),     
                PUSH=(90:3,8)),                         
/*                                                       


The problem is that the line that match "./ ADD" contains also the stepname.

To remove it I use the following :

Code:

//CTL2CNTL DD *                                         
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(121:X)),
        IFTHEN=(WHEN=GROUP,                             
                BEGIN=(1,1,CH,EQ,C'//',AND,
                   3,1,CH,NE,C'*',AND,
                  4,71,SS,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))                         
/*                                                       


Is there a better solution?

In any case, how excluded from processing lines that match BEGIN or END ?

Thank's for your time and attention.
Best regards
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Mar 26, 2015 2:43 pm    Post subject: Reply to: when=group clause: question about the end of group detection
Reply with quote

A record matching END= is always part of the group. I think you already have the best way to deal with that.

For the rest, I'd suggest PARSEing the data. You can potentially get false hits on the way you have used SS to look for EXEC.
Code:

                BEGIN=(1,1,CH,EQ,C'//',AND,
                   3,1,CH,NE,C'*',AND,


You have a typo, and that can be simplified:

Code:
                BEGIN=(1,3,CH,EQ,C'// ',AND,
Back to top
View user's profile Send private message
tuxama

New User


Joined: 25 Jan 2007
Posts: 32
Location: france

PostPosted: Fri Mar 27, 2015 10:51 am    Post subject: Reply to: when=group clause: question about the end of group detection
Reply with quote

Thanks for your answer.
Best Regards
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am
No new posts question about dfsms management clas... Hervey Martinez IBM Tools 0 Tue Oct 10, 2017 6:19 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us