Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need Help with : IFTHEN(WHEN=GROUP)

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

New User


Joined: 14 Apr 2017
Posts: 1
Location: India

PostPosted: Wed Apr 19, 2017 5:23 pm    Post subject: Need Help with : IFTHEN(WHEN=GROUP)
Reply with quote

Hi Super Coders,
I need a little help with this. My Input is the output from running the LISTCAT ALL for a GDG.

I want the record to be formatted.

This is the input

lrecl=80
Code:
    LISTCAT ENT('B5293.MEDCO.UNETFILE.G5293214.SKIPD') ALL               
 GDG BASE ------ B5293.MEDCO.UNETFILE.G5293214.SKIPD                     
      IN-CAT --- CATALOG.ICF.MCEBTOPS                                   
      HISTORY                                                           
        DATASET-OWNER----TSUEMF6     CREATION--------2013.338           
        RELEASE----------------2     LAST ALTER------2017.108           
      ATTRIBUTES                                                         
        LIMIT-----------------255     SCRATCH    NOEMPTY    LIFO       NO
  NOEXTENDED                                                             
      ASSOCIATIONS                                                       
        NONVSAM--B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0776V00           
        NONVSAM--B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0777V00           
        NONVSAM--B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0778V00           
        NONVSAM--B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0779V00           
        NONVSAM--B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0780V00
Right now I am using the sort card:
Code:
INCLUDE COND=(01,8,CH,EQ,C'GDG BASE',OR,                           
              04,7,CH,EQ,C'NONVSAM',OR,                           
              37,8,CH,EQ,C'CREATION')                             
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(81:17,44),               
 BEGIN=(1,8,CH,EQ,C'GDG BASE',OR,4,7,CH,EQ,C'NONVSAM'))           
 SORT FIELDS=COPY                                                 
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(125:X'01',55,6,UFF,PD,LENGTH=3)),
 IFTHEN=(WHEN=(53,2,ZD,LT,20),OVERLAY=(125:X'00'))                 
 OUTFIL INCLUDE=(37,8,CH,EQ,C'CREATION',OR,                       
                 16,5,CH,EQ,C'OWNER',OR,                           
                 08,5,CH,EQ,C'LIMIT'),                             
 BUILD=(81,44,C' CREATED: ',125,4,DT1,EDIT=(TTTT-TT-TT)

And getting the output as:
Code:
B5293.MEDCO.UNETFILE.G5293214.SKIPD          CREATED: 2013-12-04
B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0776V00 CREATED: 2016-06-14
B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0777V00 CREATED: 2016-06-15
B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0778V00 CREATED: 2016-06-16
B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0779V00 CREATED: 2016-06-17
B5293.MEDCO.UNETFILE.G5293214.SKIPD.G0780V00 CREATED: 2016-06-18

Now I want OWNER, and LIMIT in the GDG Base Row. [/Search]

Code'd
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2278
Location: @my desk

PostPosted: Wed Apr 19, 2017 9:11 pm    Post subject:
Reply with quote

Sumanta_89,

Welcome to the forums, code tags can be used here to preserve alignment of code/data. Just select the data/code and click the 'code' button and do a 'Preview' before submitting.

You are not INCLUDEing the 'LIMIT' record from the LISTCAT output, so I think you will have to start with that.

EDIT : A quick modified version would be something like this.
Code:
 INCLUDE COND=(01,8,CH,EQ,C'GDG BASE',OR,           
               04,7,CH,EQ,C'NONVSAM',OR,             
               08,5,CH,EQ,C'LIMIT',OR,               
               37,8,CH,EQ,C'CREATION')               
 SORT FIELDS=COPY                                   
 OUTREC IFTHEN=(WHEN=GROUP,                         
               BEGIN=(01,8,CH,EQ,C'GDG BASE',OR,     
                      04,7,CH,EQ,C'NONVSAM'),       
                PUSH=(081:ID=4,17,44)),             
        IFTHEN=(WHEN=GROUP,                         
               BEGIN=(16,5,CH,EQ,C'OWNER'),         
                PUSH=(129:26,08,53,4,58,3))         
 OUTFIL INCLUDE=(08,5,CH,EQ,C'LIMIT',OR,                   
                 37,8,CH,EQ,C'CREATION',AND,81,4,ZD,GT,1), 
        IFTHEN=(WHEN=(81,4,ZD,EQ,1),                       
         BUILD=(C'GDG BASE:',85,44,3X,                     
                C'LIMIT:',31,3,X,                         
                C'CREATED:',137,7,Y4T,TOGREG=Y4T(-),X,     
                C'OWNER:',129,8)),                         
        IFTHEN=(WHEN=NONE,                                 
         BUILD=(C'GENERATION:',85,44,X,                     
                C'CREATED:',137,7,Y4T,TOGREG=Y4T(-))) 
Gives this:
Code:
GDG BASE:XXXX.ABCDEFG.XPQRSTU.AAA                       LIMIT:3   CREATED:2008-04-04 OWNER:A11111
GENERATION:XXXX.ABCDEFG.XPQRSTU.AAA.G0014V00            CREATED:2017-04-10
GENERATION:XXXX.ABCDEFG.XPQRSTU.AAA.G0015V00            CREATED:2017-04-18
GENERATION:XXXX.ABCDEFG.XPQRSTU.AAA.G0016V00            CREATED:2017-04-18     
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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 4 Wed Mar 22, 2017 7:46 am
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us