Incompatible LRECL or RDW not included



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

Incompatible LRECL or RDW not included

Postby akanchu » Sat Mar 28, 2015 11:32 am

I have 2004 lrecl VB file.
I am sorting some data using temp area in 3000 byes thru 15 bytes.

I am able to achieve the sorting that I need.
But when I am writing the output 2004 VB file.
(i) either I am getting error or (ii) it has lost te lrecl that it had before and fills with spaces from the input lrecl to 2004.

Here are the smaples that I tried and errors that received. And also the successful one.

(A)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)   
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
                                 RESTART=(18,10),             
          3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),       
.
.   
OUTREC FIELDS=(1:3016,4,5:5)   

ERROR : WER235A  OUTREC   RDW NOT INCLUDED             


//////////////////////////////
(B)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)   
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
                                 RESTART=(18,10),             
          3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),       
.
.
 OUTFIL BUILD=(1:3016,4,5:5)     
   
ERROR : SORTOUT  OUTREC RDW NOT INCLUDED         


////////////////////////////////
(C)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)   
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
                                 RESTART=(18,10),             
          3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),       
.
.
   OUTFIL BUILD=(1:1,4,5:5)   

ERROR :  WER247A  SORTOUT  HAS INCOMPATIBLE LRECL   


///////////////////////////////
(D)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)   
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
                                 RESTART=(18,10),             
          3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),       
.
.
 OUTFIL BUILD=(1,2004) 

ERROR :  SORTOUT  HAS INCOMPATIBLE LRECL   


///////////////////////////////
(E)
SORT FIELDS=(3005,4,CH,A,3014,2,CH,A,3012,2,CH,A)   
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3012:C'0000',3009:SEQNUM,3,ZD,
                                 RESTART=(18,10),             
          3016:1,2,BI,EDIT=(TTTT),3,2,BI,EDIT=(TTTT))),       
.
.
 OUTREC FIELDS=(1,2000) 

:)
RC : 00, but the lrecl of each record expanded to 2004.
ie if the third record was 250 bytes, input had nothing after pos 250, but now there is spaces in the output after 251.
Can some one please help me what am I doing wrong.

Thanks in advance
Aka.
akanchu
 
Posts: 36
Joined: Fri Jan 23, 2009 3:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: Incompatible LRECL or RDW not included

Postby BillyBoyo » Sat Mar 28, 2015 1:41 pm

A and B seem identical and you know what you did with those.

C and D the record-length being calculated is greater than the LRECL you have for the file in the JCL (best not to have DCB information, as it gives you two places to maintain things).

E the problem is the OVERLAY. When you extend a record with OVERLAY, intervening bytes between your previous last byte of data and the new bytes from the OVERLAY are padded with blanks. The position you specified on OVERLAY is not just a convenient place to store things, but it becomes part of the record with new contiguous blanks Effectively, you have made all your variable-length records into fixed-length records with an RDW.l.

Using OVERLAY in that way us fine for fixed-length records, but for variable-length records you need to extend in a different place. At the beginning of the data.

    INREC IFTHEN=(WHEN=INIT,
                    BUILD=(1,4,4X,5)),


That makes some space at the beginning of the record. The 4X makes four blanks (doesn't matter what goes there, it is just to rearrange the record and update the RDW) and you then use that with your OVERLAY. I've chosen 4 as an example, you need to make it long enough for all the extra you need.

Later you need to return the record to it's original:

  OUTFIL BUILD=(1,4,9)


This doesn't need to be done in OUTFIL, that is just an example. The data which was at 5 originally is now at 9, so to get it back to 5 is like this.

You don't need to specify columns (the :) unless you need to leave gaps. The default when not specified is position 1 for the first item, and the next available position otherwise.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Incompatible LRECL or RDW not included

Postby akanchu » Sat Mar 28, 2015 11:53 pm

Thank you for the information.

I think I understand your suggestion about moving the temp place before the record starts.
So should I change the overlay to
INREC IFTHEN=(WHEN=INIT,   
OVERLAY=(1,4,     <-- rdw
  17:5,2004,           <--  data
  12:C'0000',         <--- other overlays
  9:SEQNUM,3,ZD,RESTART=(18,10))),   



still gives
INREC    RDW NOT INCLUDED   

I cannot use build and overlay togather right ?
akanchu
 
Posts: 36
Joined: Fri Jan 23, 2009 3:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: Incompatible LRECL or RDW not included

Postby BillyBoyo » Sun Mar 29, 2015 5:20 am

    INREC IFTHEN=(WHEN=INIT,
                    BUILD=(1,4,7X,5)), change 7X to the length you want to extend by
          IFTHEN=(WHEN=INIT,OVERLAY=(put what you want here))

    SORT FIELDS=(what you want to SORT on) 
 
    OUTFIL BUILD=(1,4,11) with the 7X example.


The RDW on an output record must always be sourced from the RDW on an input record. SORT will then adjust it to the lengths you implicitly/explicitly use.

I can't tell exactly what you're trying to do, so fill in yourself, or explain what you want.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Incompatible LRECL or RDW not included

Postby akanchu » Mon Mar 30, 2015 1:32 am

I was able to get the desired result with the 2 INIT - build and overlay.
It works.

Thank you Billy.
akanchu
 
Posts: 36
Joined: Fri Jan 23, 2009 3:11 am
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post