Posted: Mon Nov 10, 2008 10:31 am Post subject: Reformatting the report from the Endevor
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
-------------------------- 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
-------------------------- 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
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
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Mon Nov 10, 2008 1:45 pm Post subject:
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
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
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Wed Nov 12, 2008 12:13 pm Post subject:
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'*'))
/*
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