how exclude bytes in a middle of VB record



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

how exclude bytes in a middle of VB record

Postby juares castro » Tue Jul 17, 2012 3:17 am

Hi all!
I'm using SYNCSORT and trying exclude 223 bytes of a VB record, keeping it VB.
Input file has 4223 bytes (+4 RDW=4227).
Output file should have 4000 bytes (+4 RDW=4004).
The file has header and trailer:
=> header - first 6 pos. binary (zeros)
=> trailer - first 6 pos. binary (high values)
When header or trailer i'm excluding last 223 bytes, otherwise pos. 5 to 227.
I'm using the syncsort code below and it comes out with a incompatible LRECL error:


//STEP2    EXEC PGM=SORT,REGION=4096K                           
//SORTIN   DD  DISP=SHR,DSN=INPUT.FILE
//SORTOUT  DD  DSN=OUTPUT.FILE,
//         DISP=(NEW,CATLG,DELETE),                               
//         UNIT=DISK,SPACE=(CYL,(500,500),RLSE),                 
//         DCB=(LRECL=4004,BLKSIZE=27998,RECFM=VB)               
//SYSOUT   DD  SYSOUT=*                                         
//SYSPRINT DD  SYSOUT=*                                         
//SYSIN    DD  *                                                 
  SORT FIELDS=COPY                                               
  OUTREC IFTHEN=(WHEN=(5,6,BI,NE,X'000000000000',AND,   HEADER   
                       5,6,BI,NE,X'FFFFFFFFFFFF'),      TRAILER 
          BUILD=(1,4,228,4000)),                                 
         IFTHEN=(WHEN=(5,6,BI,EQ,X'000000000000',OR,    HEADER   
                       5,6,BI,EQ,X'FFFFFFFFFFFF'),      TRAILER 
          BUILD=(1,4,5,4000))                                   
//*                                                             
//                                                               


********************************* Top of Data **********************************
 SYNCSORT FOR Z/OS  1.4.0.1R    U.S. PATENTS: 4210961, 5117495   (C) 2010 SYNCSO
 SYSIN :                                                                       
   SORT FIELDS=COPY                                                             
   OUTREC IFTHEN=(WHEN=(5,6,BI,NE,X'000000000000',AND,   HEADER                 
                        5,6,BI,NE,X'FFFFFFFFFFFF'),      TRAILER               
           BUILD=(1,4,228,4000)),                                               
          IFTHEN=(WHEN=(5,6,BI,EQ,X'000000000000',OR,    HEADER                 
                        5,6,BI,EQ,X'FFFFFFFFFFFF'),      TRAILER               
           BUILD=(1,4,5,4000))                                                 
 WER276B  SYSDIAG= 234245, 893166, 893166, 2043075                             
 WER164B  1,140K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
 WER164B     0 BYTES RESERVE REQUESTED, 1,116K BYTES USED                       
 WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                               
 WER108I  SORTIN   : RECFM=VB   ; LRECL=  4227; BLKSIZE= 27998                 
 WER073I  SORTIN   : DSNAME=VMMSLXDA.NPIXX2X.IVM20.AODET.G0107V00               
 WER237I  OUTREC RECORD LENGTH =  4227                                         
 WER110I  SORTOUT  : RECFM=VB   ; LRECL=  4004; BLKSIZE= 27998                 
 WER074I  SORTOUT  : DSNAME=VMMSLXDA.NPIXX2X.IVM20.AODET.G0107.M223             
 WER247A  SORTOUT  HAS INCOMPATIBLE LRECL                                       
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
******************************** Bottom of Data ********************************

juares castro
 
Posts: 9
Joined: Mon May 14, 2012 7:24 am
Has thanked: 0 time
Been thanked: 0 time

Re: how exclude bytes in a middle of VB record

 

Re: how exclude bytes in a middle of VB record

Postby dick scherrer » Tue Jul 17, 2012 8:42 am

Hello and welcome to the forum,

Where did the 228 in the first BUILD originate?

Possibly i am mis-reading somethng :?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: how exclude bytes in a middle of VB record

Postby BillyBoyo » Tue Jul 17, 2012 2:54 pm

Thanks for the nice explanation, well laid out as well.

I don't have access to Syncsort, so no manuals, but some suggestions anyway which you can follow up.

From the message it looks like a "full-sized" record is making it through the IFTHENs. So far I can't see how. Have a look at IFOUTLEN, if it exists with Syncsort, and see if any description might apply.

I'd not code the DCB info, let Syncsort fill all that in. It gives you a useful view as to whether "working" for the record-lengths or not.

To get your variable-length records I'd go for (1,4,5) which says "position five to the end of the record" and similar for the 223 (make good note of Dick's point).

I'd code the IFTHEN differently, not to repeat the test. Since the tests are mutually exclusive, try with WHEN=NONE for the second IFTHEN.

These users thanked the author BillyBoyo for the post:
shiitiizz (Mon Dec 17, 2012 7:56 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: how exclude bytes in a middle of VB record

Postby juares castro » Tue Jul 17, 2012 11:10 pm

Hi Billy!
Although OUTREC and SORTOUT messages show LRECL=4227, your last suggestion (WHEN=NONE) worked fine.
Sortout was created with 4000 (LRECL=4004) and looks good.
Thanks a lot.
juares castro
 
Posts: 9
Joined: Mon May 14, 2012 7:24 am
Has thanked: 0 time
Been thanked: 0 time

Re: how exclude bytes in a middle of VB record

Postby juares castro » Wed Jul 18, 2012 12:17 am

Hi again Billy!
I made a mistake. Messages from SYNCSORT show 4004 for OUTREC.
Thanks.
juares castro
 
Posts: 9
Joined: Mon May 14, 2012 7:24 am
Has thanked: 0 time
Been thanked: 0 time

Re: how exclude bytes in a middle of VB record

Postby juares castro » Wed Jul 18, 2012 1:33 am

Hi !
Comparing fields OUTPUT X INPUT we see that in OUTPUT there are fields filled by spaces that are not filled in INPUT.
So, allocation space in OUTPUT are greater than INPUT.
Could we avoid that?

Thanks in advance.
juares castro
 
Posts: 9
Joined: Mon May 14, 2012 7:24 am
Has thanked: 0 time
Been thanked: 0 time

Re: how exclude bytes in a middle of VB record

Postby BillyBoyo » Wed Jul 18, 2012 2:44 am

Can you show your current sort cards and a sample of data showing the problem, please. Doesn't need to be the full length...

Are the fields all at the "end" of the records?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: how exclude bytes in a middle of VB record

Postby juares castro » Wed Jul 18, 2012 3:57 am

Hi Billy!
Below the card and a sample of INPUT and OUTPUT using DCB especified (LRECL=4004,RECFM=VB,BLKSIZE=27998):
And not all length of record is filleds.

Thanks in advance.

CARD:
********************************* Top of Data **********************************
 SYNCSORT FOR Z/OS  1.4.0.1R    U.S. PATENTS: 4210961, 5117495   (C) 2010 SYNCSO
                  SYNCSORT PROBLEMS CONTACT THE ROCC 314-235-4646  ON PROMPT ENT
 SYNCSORT LICENSED FOR CPU SERIAL NUMBER 7430C, MODEL 2086 460             LICEN
 SYSIN :                                                                       
   SORT FIELDS=COPY                                                             
   OUTREC IFTHEN=(WHEN=(5,6,BI,NE,X'000000000000',AND,   HEADER                 
                        5,6,BI,NE,X'FFFFFFFFFFFF'),      TRAILER               
           BUILD=(1,4,228,4000)),                                               
          IFTHEN=(WHEN=NONE,                                                   
           BUILD=(1,4,5,4000))                                                 
 WER276B  SYSDIAG= 320627, 906756, 906756, 2020575                             
 WER164B  1,140K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
 WER164B     0 BYTES RESERVE REQUESTED, 2,388,496 BYTES USED                   
 WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                               
 WER108I  SORTIN   : RECFM=VB   ; LRECL=  4227; BLKSIZE= 27998                 
 WER073I  SORTIN   : DSNAME=                                                   
 WER237I  OUTREC RECORD LENGTH =  4004                                         
 WER110I  SORTOUT  : RECFM=VB   ; LRECL=  4004; BLKSIZE= 27998                 
 WER074I  SORTOUT  : DSNAME=                                                   
 WER410B  5,868K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,       
 WER410B     0 BYTES RESERVE REQUESTED, 2,241,040 BYTES USED                   
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
 WER416B  SORTIN   : EXCP'S=13,UNIT=3390,DEV=AD26,CHP=(0F1F4F5F,1),VOL=ISTL44   
 WER416B  SORTOUT  : EXCP'S=113,UNIT=3390,DEV=AE39,CHP=(0F1F4F5F,1),VOL=CLH091 
 WER416B  TOTAL OF 126 EXCP'S ISSUED FOR COPYING                               
 WER054I  RCD IN      12133, OUT      12133                                     
 WER169I  RELEASE 1.4 BATCH 0520 TPF LEVEL 0.1                                 
 WER052I  END SYNCSORT - AODET223,STEP2,,DIAG=C000,53C0,E88E,80E4,8872,6CCB,AA88
******************************** Bottom of Data ********************************

INPUT:
 HHTD E                                               Line 00000001 Col 441 520
 Command ===>                                                  Scroll ===> CSR 
----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2
----+----F----+----F----+----F----+----F----+----F----+----F----+----F----+----F
----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2
 ------------------------------------------------------------------------------
................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
000209KBPS      B4D   UP  T1        MIS0000000580000AVPNY¬                     
FFFFFFDCDE444444CFC444ED44EF44444444DCEFFFFFFFFFFFFFCEDDE5                     
000209227200000024400047003100000000492000000058000015758F                     
 ------------------------------------------------------------------------------
000201KBPS      B4D   UP  T1        MIS0000000580000AVPNY¬                     
FFFFFFDCDE444444CFC444ED44EF44444444DCEFFFFFFFFFFFFFCEDDE5                     
000201227200000024400047003100000000492000000058000015758F                     
 ------------------------------------------------------------------------------
000221KBPS      B4D   UP  T1        MIS0000000580000AVPNY¬                     
FFFFFFDCDE444444CFC444ED44EF44444444DCEFFFFFFFFFFFFFCEDDE5                     
000221227200000024400047003100000000492000000058000015758F                     
 ------------------------------------------------------------------------------


OUTPUT:
 HHTD E                                               Line 00000001 Col 218 297
 Command ===>                                                  Scroll ===> CSR 
--2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+--
--F----+----F----+----F----+----F----+----F----+----F----+----F----+----F----+--
--2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+--
 ------------------------------------------------------------------------------
................................y...............................................
00000000000000000000000000000000A00000000000000000000000000000000000000000000000
00000000000000000000000000000002800000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
000209KBPS      B4D   UP  T1        MIS0000000580000AVPNY¬                     
FFFFFFDCDE444444CFC444ED44EF44444444DCEFFFFFFFFFFFFFCEDDE54444444444444444444444
000209227200000024400047003100000000492000000058000015758F0000000000000000000000
 ------------------------------------------------------------------------------
000201KBPS      B4D   UP  T1        MIS0000000580000AVPNY¬                     
FFFFFFDCDE444444CFC444ED44EF44444444DCEFFFFFFFFFFFFFCEDDE54444444444444444444444
000201227200000024400047003100000000492000000058000015758F0000000000000000000000
 ------------------------------------------------------------------------------
000221KBPS      B4D   UP  T1        MIS0000000580000AVPNY¬                     
FFFFFFDCDE444444CFC444ED44EF44444444DCEFFFFFFFFFFFFFCEDDE54444444444444444444444
000221227200000024400047003100000000492000000058000015758F0000000000000000000000
 ------------------------------------------------------------------------------
juares castro
 
Posts: 9
Joined: Mon May 14, 2012 7:24 am
Has thanked: 0 time
Been thanked: 0 time

Re: how exclude bytes in a middle of VB record

Postby BillyBoyo » Wed Jul 18, 2012 12:04 pm

OK, you missed a bit from my previous post:

To get your variable-length records I'd go for (1,4,5) which says "position five to the end of the record" and similar for the 223


The way you have coded it, when record-length less than 4004, the whole record is copied, and then its length is extended to 4004 with the new bytes being "padded" with space.

The way you have coded it you'd end up with all records on the file being 4004 (fixed) for a VB file.

The (1,4... copies the Record Descriptor Word to the new internal record. Then the ..5) copies from the position 5, to the end of the record, and updates the new record-length in the new RDW.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: how exclude bytes in a middle of VB record

Postby juares castro » Thu Jul 19, 2012 2:35 am

Hi Billy!
I had tried with (1,4,5) and (1,4,228) respectively to first and second IFTHEN.
Using defined DCB with 4004 in JCL we have "WER247A SORTOUT HAS INCOMPATIBLE LRECL" error and
without DCB we get 4227 record length (this is not the requirement).

Thanks a lot!
juares castro
 
Posts: 9
Joined: Mon May 14, 2012 7:24 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post