MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reformatting the report from the Endevor

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
somuk
Beginner


Joined: 04 Feb 2003
Posts: 113
Topics: 37

PostPosted: Mon Nov 10, 2008 10:31 am    Post subject: Reformatting the report from the Endevor Reply with quote

Hi,
Can somebody please help me getting a solution using DF SORT/FOCUS for reformatting the below report from the Endevor.

Report from the Endevor
Code:

 ********************************* TOP OF DATA **********************************
1  Copyright (C) 2006 CA. All Rights Reserved.                                 
 XXX IT CHANGE MANAGER C1DEFLTS R7 SP3 080910             Endevor               
 PRINT                                  SUMMARY                    ACTION #    1
 ELEMENT: ABC1122                                                             
                                                                               
 *******************************************************************************
 *******************************************************************************
 **                                                                           **
 ** ELEMENT SUMMARY                                           10NOV08  05:27  **
 **                                                                           **
 **    ENVIRONMENT:  CBS         SYSTEM: S2BREC      SUBSYSTEM: S2BREC        **
 **    ELEMENT:      ABC1122     TYPE:   COBOL       STAGE ID:  2             **
 **                                                                           **
 *******************************************************************************
 *******************************************************************************
                                                                               
 -------------------------- SOURCE LEVEL INFORMATION ---------------------------
                                                                               
  VV.LL SYNC USER     DATE    TIME     STMTS CCID         COMMENT               
  ----- ---- -------- ------- ----- -------- ------------ ----------------------
  01.00      QF4ST44  09AUG07 08:35     1097 CFMP         CFMP - AUTOMATION     
  01.01      Q4M7TCN  03MAR08 10:38     1119 Q4M7TCN      CFMP PROJECT         
  01.02      Q3CXXMD  26AUG08 13:30     1158 SCR256044    SCR-256044           
 GENERATED   Q3CXXMD  26AUG08 13:46          SCR256044    FIX COMPARISON LOGIC ERROR
********************* B O T T O M   O F   D A T A *****************************
1  Copyright (C) 2006 CA. All Rights Reserved.                                 
 XXX IT CHANGE MANAGER C1DEFLTS R7 SP3 080910             Endevor               
 PRINT                                  SUMMARY                    ACTION #    1
 ELEMENT: ABC2233                                                             
                                                                                 
 *******************************************************************************
 *******************************************************************************
 **                                                                           **
 ** ELEMENT SUMMARY                                           10NOV08  05:27  **
 **                                                                           **
 **    ENVIRONMENT:  CBS         SYSTEM: S2BREC      SUBSYSTEM: S2BREC        **
 **    ELEMENT:      ABC2233     TYPE:   COBOL       STAGE ID:  2             **
 **                                                                           **
 *******************************************************************************
 *******************************************************************************
                                                                               
 -------------------------- SOURCE LEVEL INFORMATION ---------------------------
                                                                               
  VV.LL SYNC USER     DATE    TIME     STMTS CCID         COMMENT               
  ----- ---- -------- ------- ----- -------- ------------ ----------------------
  01.00      QF4ST44  09AUG07 08:35     1097 CFMP         CFMP - AUTOMATION     
  01.01      Q4M7TCN  03MAR08 10:38     1119 Q4M7TCN      CFMP PROJECT           
********************* B O T T O M   O F   D A T A *****************************   


Expected Reformatted report
Code:

ELEMENT  VV.LL SYNC USER     DATE    TIME     STMTS CCID         COMMENT

ABC1122  01.00      QF4ST44  09AUG07 08:35     1097 CFMP         CFMP - AUTOMATION
ABC1122  01.01      Q4M7TCN  03MAR08 10:38     1119 Q4M7TCN      CFMP PROJECT
ABC1122  01.02      Q3CXXMD  26AUG08 13:30     1158 SCR256044    SCR-256044
GENERATED           Q3CXXMD  26AUG08 13:46          SCR256044    FIX COMPARISON LOGIC ERROR
*******************************************************************************************
ABC2233  01.00      QF4ST44  09AUG07 08:35     1097 CFMP         CFMP - AUTOMATION
ABC2233  01.01      Q4M7TCN  03MAR08 10:38     1119 Q4M7TCN      CFMP PROJECT
*******************************************************************************************


1. Beginning of the Report is indicated by '********************************* TOP OF DATA **********************************' - only one header for the entire report - Starting at position 1.

2. Each element information is segregated by a trailer '********************* B O T T O M O F D A T A *****************************' - Starting at position 1

3. File type is FB, LRECL=100. The starting position and length of each field is as given in the sample above.

ELEMENT: L2BACCEX - Starting at position 8
VV.LL SYNC USER DATE TIME STMTS CCID COMMENT - Starting at position 2.
_________________
Regds,
Somu
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Nov 10, 2008 1:45 pm    Post subject: Reply with quote

You can do this with the new WHEN=GROUP function of DFSORT available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

Code:

//STEP0100 EXEC PGM=ICEMAN                                       
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD DSN=your.ENDVR.REPORT,                           
//            DISP=SHR                                           
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                 
 INREC IFTHEN=(WHEN=GROUP,BEGIN=(8,7,CH,EQ,C'ELEMENT'),         
 PUSH=(101:20,10)),                                             
 IFTHEN=(WHEN=GROUP,BEGIN=(3,5,CH,EQ,C'VV.LL'),                 
 END=(20,30,CH,EQ,C'** B O T T O M   O F   D A T A '),           
 PUSH=(111:ID=1)),                                               
 IFTHEN=(WHEN=GROUP,RECORDS=1,                                   
 BEGIN=(20,30,CH,EQ,C'** B O T T O M   O F   D A T A '),         
 PUSH=(112:ID=1)),                                               
 IFTHEN=(WHEN=(111,1,ZD,GT,0),                                   
 OVERLAY=(113:SEQNUM,4,ZD,RESTART=(111,1)),HIT=NEXT),           
 IFTHEN=(WHEN=(111,1,ZD,GT,1,AND,113,4,ZD,LE,2),                 
 OVERLAY=(117:C'N'))                                             
 SORT FIELDS=COPY                                               
                                                                 
 OUTREC IFTHEN=(WHEN=INIT,BUILD=(101,10,1,117)),                 
 IFTHEN=(WHEN=(122,1,ZD,GT,0),OVERLAY=(1:100C'*')),             
 IFTHEN=(WHEN=(13,5,CH,EQ,C'VV.LL'),OVERLAY=(2X,C'ELEMENT')),   
 IFTHEN=(WHEN=(123,4,ZD,EQ,2),OVERLAY=(2X,7C'-'))               
                                                                 
 OUTFIL INCLUDE=(121,1,ZD,GT,0,AND,127,1,CH,EQ,C' '),           
 BUILD=(1,110)                                                   
/*                                                               


If you don't have the July, 2008 PTF installed, ask your System Programmer to install it (it's free).

For complete details on the new WHEN=GROUP and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/

Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
somuk
Beginner


Joined: 04 Feb 2003
Posts: 113
Topics: 37

PostPosted: Tue Nov 11, 2008 4:26 am    Post subject: Reply with quote

Thanks a lot Kolusu.
As expected we don't have the July, 2008 PTF installed and it will take some time to get the request processed since we don't have direct access to the System admins. It's giving error for PUSH, IFTHEN and OVERLAY.
Could you please let me know if there is any alternative method?
_________________
Regds,
Somu
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Nov 11, 2008 1:27 pm    Post subject: Reply with quote

somuk,

Run the following Job and show me your sysout, so that we can determine the function level of DFSORT.

Code:

//STEP0100 EXEC PGM=ICEMAN
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
SAMPLE
//SORTOUT  DD DUMMY
//SYSIN    DD *
  OPTION COPY
/*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
somuk
Beginner


Joined: 04 Feb 2003
Posts: 113
Topics: 37

PostPosted: Wed Nov 12, 2008 3:11 am    Post subject: Reply with quote

Hi Kolusu,

Please find the sysout below.

Code:

1ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED
 ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
 ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 03:02 ON WED NOV 12, 2008 -
0            OPTION COPY                                                           00001450
 ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
 ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 C9-BASE   E5-K24705 E7-K24705
 ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
 ICE088I 0 QSDK7G92.STEP0100.        , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
 ICE093I 0 MAIN STORAGE = (MAX,6291456,6278238)
 ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200798,6200798)
 ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=256
 ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=ABEND,MSGDDN=SYSOUT
 ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N             ,ABCODE=MSG
 ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB2
 ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=N,DSA=0
 ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N
 ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=0
 ICE235I 0 OPTIONS: NULLOUT=RC0
 ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT
 ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN
 ICE751I 1 EF-K10929 F0-Q84357 E8-K24705
 ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
 ICE055I 0 INSERT 0, DELETE 0
 ICE054I 0 RECORDS - IN: 1, OUT: 1
 ICE052I 0 END OF DFSORT

_________________
Regds,
Somu
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Nov 12, 2008 12:13 pm    Post subject: Reply with quote

somuk,

The following DFSORT/ICETOOL JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL                                         
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN       DD DSN=YOUR ENDVRPT,                               
//            DISP=SHR                                               
//T1       DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)           
//OUT      DD SYSOUT=*                                               
//TOOLIN   DD *                                                     
 SPLICE FROM(IN) TO(T1) WITHALL ON(101,8,CH) WITH(1,100) USING(CTL1)
 COPY FROM(T1) USING(CTL2)   
/*
//CTL1CNTL DD *                                                     
  OMIT COND=(1,100,CH,EQ,C'*',OR,1,100,CH,EQ,C' ')                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(101:SEQNUM,8,ZD)),               
  IFTHEN=(WHEN=(8,7,CH,EQ,C'ELEMENT',OR,                             
        20,30,CH,EQ,C'** B O T T O M   O F   D A T A '),             
  OVERLAY=(101:SEQNUM,8,ZD,20,30)),                                 
  IFTHEN=(WHEN=NONE,                                                 
  OVERLAY=(109:SEQNUM,8,ZD,101:101,8,ZD,SUB,109,8,ZD,M11,LENGTH=8)) 
  SORT FIELDS=COPY                                                   
  OUTFIL FNAMES=T1,                                                 
  OMIT=(101,8,ZD,EQ,0,OR,                                           
        109,30,CH,EQ,C'** B O T T O M   O F   D A T A '),           
  IFTHEN=(WHEN=INIT,BUILD=(1,119,SEQNUM,8,ZD,RESTART=(101,8)))       
/*
//CTL2CNTL DD *                                                     
  INCLUDE COND=((101,8,ZD,EQ,1,AND,120,8,ZD,GE,5),OR,               
                (101,8,ZD,GT,1,AND,120,8,ZD,GT,6))                   
  INREC IFTHEN=(WHEN=INIT,BUILD=(109,10,1,120,120,8)),               
  IFTHEN=(WHEN=(13,5,CH,EQ,C'VV.LL'),OVERLAY=(2X,C'ELEMENT')),       
  IFTHEN=(WHEN=(131,8,ZD,EQ,6),OVERLAY=(2X,7C'-'))                   
  OUTFIL FNAMES=OUT,BUILD=(1,110),REMOVECC,                         
  SECTIONS=(119,10,                                                 
  TRAILER3=(100C'*'))                                               
/*


Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
somuk
Beginner


Joined: 04 Feb 2003
Posts: 113
Topics: 37

PostPosted: Thu Nov 13, 2008 7:36 am    Post subject: Reply with quote

Thank you very much Kolusu.
This really helped me to get the desired result.
_________________
Regds,
Somu
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group