SORT VB records from SUPERC to remove headers & drop line#s



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby skolusu » Fri May 09, 2014 1:14 am

Steve Coalbran,

You need VLSCMP and NOT VLSHRT to use on INCLUDE/OMIT.

VLSCMP specifies whether DFSORT is to pad "short" variable-length INCLUDE/OMIT compare fields with binary zeros. A short field is one where the variable-length record is too short to contain the entire field, that is, the field extends beyond the record. VLSCMP and NOVLSCMP apply to the INCLUDE and OMIT statements and to the INCLUDE and OMIT parameters of the OUTFIL statement. The compare fields are only padded temporarily for testing; they are not actually changed for output.

Use the following control cards to remove the first 11 bytes and still retain a VB file

//SYSIN    DD *                                     
  OPTION COPY,VLSCMP                               
                                                   
  OMIT COND=(8,07,CH,EQ,C'ISRSUPC',OR,             
             7,06,CH,EQ,C'LINE-Ä',OR,               
             7,10,CH,EQ,C' ')                       
                                                   
  INREC IFTHEN=(WHEN=(1,2,BI,GE,16),BUILD=(1,4,16))
//*                                                                 


If you want an FB file, then use the following control cards

//SYSIN    DD *                             
  OPTION COPY,VLSCMP                       
                                           
  OMIT COND=(8,07,CH,EQ,C'ISRSUPC',OR,     
             7,06,CH,EQ,C'LINE-Ä',OR,       
             7,10,CH,EQ,C' ')               
                                           
  INREC OVERLAY=(134:X)                     
  OUTFIL VTOF,BUILD=(16,122)               
//*


Btw how did end up with a VB file from SUPERC? The batch invocation of SUPERC(PGM=ISRSUPC) creates an FBA dataset with an LRECL of 133.
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby Steve Coalbran » Fri May 09, 2014 10:21 am

That's much better but it still has the blank lines.
Here's a snippet of the input file which you can probably identify as a TWS logfile.
VIEW       K248610.MLOG.ERROR.COPY                         Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 1  ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF
000002   LINE-Ä  SOURCE SECTION                    SRCH DSN: SYS4.EQQ.OPCA.MLOG
000003                                                                         
       444444444444444444444444444444444444444444444444444444444444444444444444
       000000000000000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
000004   340948   05/08 00.00.01 EQQM923I JOBLOG FOR BWFXRATE (UNX79470) ARRIVE
000005   340949   05/08 00.00.01 EQQM923I FOR OPERATION: BWFXRATEBASEL2  , 1405
000006   340950   05/08 00.00.02 EQQE016I ETT HAS SUCCESSFULLY ADDED ENDEVORPRO

Here's the SYSIN.
(I have HXd the top line in each to show that what was 16 for 10 is in fact X'40404040404040404040', I tried C' ' first but that gave the same (bad) result) ...
//SYSIN    DD *                                   
  OPTION COPY,VLSCMP                               
  OMIT COND=(8,07,CH,EQ,C'ISRSUPC',OR,             
             7,06,CH,EQ,C'LINE-Ä',OR,             
             16,10,CH,EQ,X'40404040404040404040')
  INREC IFTHEN=(WHEN=(1,2,BI,GE,16),BUILD=(1,4,16))
//*

gives...
SDSF EDIT    K248610K (JOB17311) SORTOUT                   Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001                                                                         
       444444444444444444444444444444444444444444444444444444444444444444444444
       000000000000000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
000002 05/08 00.00.01 EQQM923I JOBLOG FOR BWFXRATE (UNX79470) ARRIVED         
000003 05/08 00.00.01 EQQM923I FOR OPERATION: BWFXRATEBASEL2  , 1405071900, 010
000004 05/08 00.00.02 EQQE016I ETT HAS SUCCESSFULLY ADDED ENDEVORPROD5 FOR TRIG
...

Something I got wrong again? :roll:
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby Steve Coalbran » Fri May 09, 2014 11:49 am

This is not a REXX forum I know, but I ran up a REXX solution that works, albeit an extra step! I'd probably compile to CEXEC to save the ICEGENER step but this is a useful technique for development (and cross-node execution!?).
This also caters for the stuff at the end of the SUPERC listing which I hadn't yet started on in the DFSORT solution - which I would still like to get working.
EDIT       K248610.USER.JCL(STEFANKR) - 01.02              Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
000005 //*--------------------------------------------------------------------
000006 //GENMACRO EXEC PGM=ICEGENER                                           
000007 //SYSIN    DD DUMMY                                                     
000008 //SYSPRINT DD SYSOUT=*                                                 
000009 //SYSUT1   DD *                                                         
000010   "EXECIO 1 DISKR TWSILOG (STEM R "                                     
000011   DO WHILE( RC=0 )                                                     
000012      PARSE VAR r1 4 isr 11 . 3 lin 9 . 8 blk 18 . 7 eod 33 . 12 w1     
000013      IF( eod='SEARCH-FOR SUMMARY SECTION' )THEN LEAVE                   
000014      IF( isr<>'ISRSUPC' & lin<>'LINE-Ä' & blk<>'' )THEN                 
000015         "EXECIO 1 DISKW TWSOLOG (STEM W "                               
000016      ELSE NOP                                                           
000017      "EXECIO 1 DISKR TWSILOG (STEM R "                                 
000018   END                                                                   
000019   "EXECIO 0 DISKW TWSOLOG (FINIS "                                     
000020   EXIT                                                                 
==CHG> //SYSUT2   DD DSN=&&RE(XX),DISP=(,PASS),UNIT=VIO,SPACE=(TRK,(1,0,1))   
000022 //*--------------------------------------------------------------------
000023 //EXEMACRO EXEC PGM=IRXJCL,PARM=XX                                     
==CHG> //SYSEXEC  DD DISP=(OLD,PASS),DSN=&&RE                                 
000025 //SYSTSPRT DD SYSOUT=*                                                 
000026 //SYSTSIN  DD DUMMY                                                     
000027 //TWSILOG  DD DISP=SHR,DSN=K248610.MLOG.ERROR.COPY                     
000028 //TWSOLOG  DD SYSOUT=*                                                 
000029 //*                                                                     
****** **************************** Bottom of Data ****************************
Steve

These users thanked the author Steve Coalbran for the post:
Aki88 (Fri May 09, 2014 1:36 pm)
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby Steve Coalbran » Fri May 09, 2014 11:55 am

how did end up with a VB file from SUPERC? The batch invocation of SUPERC(PGM=ISRSUPC) creates an FBA dataset with an LRECL of 133.

Hi Kolusu,
Just re-read the responses here.
I don't know. I guess they've overwritten it in the job that extracts from the TWS log.
I just get the file! :lol:
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby BillyBoyo » Fri May 09, 2014 1:14 pm

If you return the record-length check in the OMIT, your blank record will disappear. As a VBA, it will be a five-byte record with a whatever control character.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby Steve Coalbran » Fri May 09, 2014 2:21 pm

BillyBoyo wrote:If you return the record-length check in the OMIT, your blank record will disappear. As a VBA, it will be a five-byte record with a whatever control character.

Thanks Billy. What's that mean in DFSORT SYSIN terms?
Input file is not VBA it is VB 137 (don't blame me!) ;)
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby NicC » Fri May 09, 2014 2:44 pm

Hi Steve - re the comment in your signature: have you referred to Terry's topic in "Suggestions & Feedback"?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

These users thanked the author NicC for the post:
Steve Coalbran (Fri May 09, 2014 3:28 pm)
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby Steve Coalbran » Fri May 09, 2014 2:57 pm

Thanks Nic!
Resolved my 'signature problem!
I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot.I am an idiot. .....
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby BillyBoyo » Fri May 09, 2014 3:29 pm

1,2 (of a variable-length record) is the record-length. If there are record-lengths you don't want, you can OMIT them. I guess since it is not VBA then there is a single blank there :-)

We know from an earlier error message there is a five-byte record. I suspect that is your blank line. I think SDSF is going to just pad in the display, so there it looks like a long bunch of trailing spaces. I just don't think the trailing spaces will be there (else the V is pointless) so a blank line is going to be just one space.

No access at the moment. If you look at your data with edit, it should show just the data? It would explain why the C' ' or C'with 10 blanks' does not work for you.

OPTION COPY
OUTFIL FTOV,BUILD=(1,2,BI,TO=ZD,LENGTH=3,X,5,132)

If you run that on your input, it should show your records, prefixed by the record-lengths. Should help you see exactly what you have. Untested, sorry. The X is just a blank to separate the record-length from the data.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SORT VB records from SUPERC to remove headers & drop lin

Postby Steve Coalbran » Fri May 09, 2014 3:36 pm

NicC wrote:people can explain things quickly but I can only comprehend slowly"?

I dont even seem to be able to explain things properly and I can't comprehnds nuffin today. Fridays is too late in the week and its afternoon already. "Suc!"(Swedish). :shock:
Still hoping for an "executable" DFSORT solution to my problem.
C'mon!? I did give the "ibmmainframeforum" world an "executable" Rexx one? :lol:
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

PreviousNext

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post