Page 2 of 6

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

PostPosted: Fri May 09, 2014 1:14 am
by skolusu
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.

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

PostPosted: Fri May 09, 2014 10:21 am
by Steve Coalbran
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:

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

PostPosted: Fri May 09, 2014 11:49 am
by Steve Coalbran
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 ****************************

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

PostPosted: Fri May 09, 2014 11:55 am
by Steve Coalbran
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:

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

PostPosted: Fri May 09, 2014 1:14 pm
by BillyBoyo
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.

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

PostPosted: Fri May 09, 2014 2:21 pm
by Steve Coalbran
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!) ;)

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

PostPosted: Fri May 09, 2014 2:44 pm
by NicC
Hi Steve - re the comment in your signature: have you referred to Terry's topic in "Suggestions & Feedback"?

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

PostPosted: Fri May 09, 2014 2:57 pm
by Steve Coalbran
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. .....

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

PostPosted: Fri May 09, 2014 3:29 pm
by BillyBoyo
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.

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

PostPosted: Fri May 09, 2014 3:36 pm
by Steve Coalbran
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: