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

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

Postby Steve Coalbran » Thu May 08, 2014 10:33 pm

I am probably being an idiot missing something here but! ... :roll:

I am trying to massage the output from a SUPERC (VB,137) to:
  • remove the page headers
  • remove the line numbers (ie. the first 11 columns)
SDSF OUTPUT DISPLAY K248610K JOB55979  DSID   103 LINE 1       COLUMNS 02- 81 
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE805I 1 JOBNAME: K248610K , STEPNAME: SORT                                   
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                     
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 18:25 ON THU MA
            OPTION COPY,VLSHRT                                                 
            OMIT COND=(8,7,CH,EQ,C'ISRSUPC',                                   
                    OR,7,6,CH,EQ,C'LINE-Ä',                                     
                    OR,7,10,CH,EQ,C'          ')                               
            OUTREC FIELDS=(16,122)                                             
ICE251A 0 MISSING RDW OR DATA FOR *OUTREC : REASON CODE 03, IFTHEN 0           
ICE751I 0 C5-K76982 C6-K90026 C7-K94453 C8-K94453 E9-K60824 E7-K95469           
ICE052I 3 END OF DFSORT                                                         
******************************** BOTTOM OF DATA ********************************

I have (although clearly not thoroughly enough?) read the fine manual(s) Image
Please help me get over these #?!*% RDWs? :D
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 » Thu May 08, 2014 11:19 pm

            OPTION COPY,VLSHRT                                                 
            OMIT COND=(8,7,CH,EQ,C'ISRSUPC',                                   
                    OR,7,6,CH,EQ,C'LINE-Ä',                                     
                    OR,7,10,CH,EQ,C'          ')                               
            INREC BUILD=(1,4,16)


If your input is V, your output must be V unless you specifically convert it to F. This means that every time you BUILD a record (note, FIELDS on INREC/OUTREC and OUTREC on OUTFIL are just synonyms for backwards-compatability) you must specify the RDW (1,4).

I've changed the OUTREC to INREC. Since you have no SORT or MERGE the results will be identical. INREC is for processing before SORT/MERGE/SUM, OUTREC for after, OUTFIL for final processing to a specific dataset (can be multiple outputs).

You had 16,122. This would try to copy data beyond the end of a record. I changed that to 16 on its own, which says "from 16 to the end of the variable-length record".

If you want the output fixed-length, use OUTFIL with VTOF and specify the BUILD as you had it, non-existent characters will be padded to space.

 OUTFIL VTOF,BUILD=(16,122)


An OUTFIL without specifying a different name operates on SORTOUT.
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 » Thu May 08, 2014 11:20 pm

forgot to post the error! :?
 SDSF OUTPUT DISPLAY K248610K JOB55979  DSID   103 LINE 1       COLUMNS 02- 81 
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE805I 1 JOBNAME: K248610K , STEPNAME: SORT                                   
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                     
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 18:25 ON THU MA
            OPTION COPY,VLSHRT                                                 
            OMIT COND=(8,7,CH,EQ,C'ISRSUPC',                                   
                    OR,7,6,CH,EQ,C'LINE-Ä',                                     
                    OR,7,10,CH,EQ,C'          ')                               
            OUTREC FIELDS=(16,122)                                             
ICE251A 0 MISSING RDW OR DATA FOR *OUTREC : REASON CODE 03, IFTHEN 0           
ICE751I 0 C5-K76982 C6-K90026 C7-K94453 C8-K94453 E9-K60824 E7-K95469           
ICE052I 3 END OF DFSORT                                                         
******************************** BOTTOM OF DATA ********************************
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 » Thu May 08, 2014 11:28 pm

I still get for the first block only...
OPTION COPY,VLSHRT                 
OMIT COND=(8,7,CH,EQ,C'ISRSUPC',   
        OR,7,6,CH,EQ,C'LINE-Ä',     
        OR,7,10,CH,EQ,C'          ')
INREC BUILD=(1,4,16)               
Error
ICE218A 6 5 BYTE VARIABLE RECORD IS SHORTER THAN 16 BYTE MINIMUM FOR          FIELDS
ICE751I 1 EF-BASE   F0-K91597 E8-K94453
and appending the OUTREC ...
OPTION COPY,VLSHRT                   
OMIT COND=(8,7,CH,EQ,C'ISRSUPC',     
        OR,7,6,CH,EQ,C'LINE-Ä',       
        OR,7,10,CH,EQ,C'          ') 
INREC BUILD=(1,4,16)                 
OUTFIL VTOF,BUILD=(16,122)
Error
ICE027A 9 END OF SORTOUT  FIELD BEYOND MAXIMUM RECORD LENGTH         
ICE751I 0 C5-K76982 C6-K90026 C7-K94453 C8-K94453 E9-K60824 E7-K95469
ICE052I 3 END OF DFSORT
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 » Thu May 08, 2014 11:32 pm

I don't have any SUPERC output handy, but it looks like a blank line or a line only containing a line number.

Amend the OMIT to have 1,2,BI,LT,16 as the first condition (doesn't have to be first, just seems more like it should be).

Remember, trailing blanks are probably not there if that is what your C'ten intentional blanks here' is after. You don't need to specify 10, by the way, just specify one C' ' and it will be padded to the correct length for comparison.

Actually reading the message, it is a five-byte record. I suspect it is a single control-character. Perhaps try EQ,5 instead of LT,16, so you know if there are other shorties around.
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 BillyBoyo » Thu May 08, 2014 11:45 pm

I'd better to this as a separate post rather than a seventh edit.

If you want the output fixed, you don't need the BUILD on INREC at all. Sorry not to be clear. You will now be losing data from the beginning of each line you want. Drop the INREC if you want fixed-length.
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 12:01 am

I am probably misreading your suggestions, not understanding their meaning.
This is what I get trying to apply the latest ones - wrong?!
 SDSF OUTPUT DISPLAY K248610K JOB63599  DSID   104 LINE 1       COLUMNS 02- 81 
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE805I 1 JOBNAME: K248610K , STEPNAME: SORT                                   
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                     
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 20:29 ON THU MA
            OPTION COPY,VLSHRT                                                 
            OMIT COND=(1,2,BI,LT,16,                                           
                    OR,8,7,CH,EQ,C'ISRSUPC',                                   
                    OR,7,6,CH,EQ,C'LINE-Ä',                                     
                    OR,7,10,CH,EQ,C'          ')                               
            INREC BUILD=(1,4,16)                                               
            OUTFIL VTOF,BUILD=(16,122)                                         
ICE027A 9 END OF SORTOUT  FIELD BEYOND MAXIMUM RECORD LENGTH                   
ICE751I 0 C5-K76982 C6-K90026 C7-K94453 C8-K94453 E9-K60824 E7-K95469           
ICE052I 3 END OF DFSORT                                                         
******************************** BOTTOM OF DATA ********************************
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 enrico-sorichetti » Fri May 09, 2014 12:12 am

nobody/nothing prevents You from using ...
//OUTDD  DD SYSOUT=(*),RECFM=FB,LRECL=133

to avoid all the VB hassles
TESTED
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

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

Postby BillyBoyo » Fri May 09, 2014 12:41 am

I think you missed a post in the middle.

You need to remove the INREC, which is dropping off the line-numbers, because in the OUTFIL you are dropping off the line-numbers again, but since they are no longer there, 16,122 is longer than the record OUTFIL receives.

If you look at the sysout from the step, you will see the maximum record-lengths.

enrico's is a good idea for not overly-large output, if it is under your control. Then you can have BUILD=(12,122) on INREC, OUTREC or OUTFIL.
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 enrico-sorichetti » Fri May 09, 2014 12:50 am

just tested with
//OUTDD  DD DISP=(NEW,CATLG),DSN=ENRICO.SUPERC.LISTING,
//          SPACE=(CYL,(1,1))


and

 Command ===>

 Data Set Name . . . . : ENRICO.SUPERC.LISTING

 General Data                           Current Allocation
  Management class . . : **None**        Allocated cylinders : 1
  Storage class  . . . : **None**        Allocated extents . : 1
   Volume serial . . . : STOR02
   Device type . . . . : 3390
  Data class . . . . . : **None**       Current Utilization
   Organization  . . . : PS              Used cylinders  . . : 1
   Record format . . . : FBA             Used extents  . . . : 1
   Record length . . . : 133
   Block size  . . . . : 27930
   1st extent cylinders: 1
   Secondary cylinders : 1
   Data set name type  :                 SMS Compressible  :   NO

   Creation date . . . : 2014/05/08      Referenced date . . : 2014/05/08
   Expiration date . . : ***None***
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Next

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post