Page 1 of 1

WER235A OUTREC RDW NOT INCLUDED .

Posted: Thu Oct 29, 2015 5:30 pm
by Cobol Wolf
This is the OUTREC I have:

Code: Select all

OUTREC IFTHEN(WHEN=(32,1,CH,EQ,C'1'), 
               OVERLAY=(1,4, 
                        32:32,2,C'7X', 
                   358:358,2,C'FW', 
                   366:366,1,C'D')), 
        IFTHEN(WHEN=NONE, 
               BUILD=(1,4,5:5)) 
In above I am trying to set up a OUTREC to overlay certain fields in VB records. But I get these messages:

Code: Select all

WER164B  1,028K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED, 
WER164B     156K BYTES RESERVE REQUESTED, 1,000K BYTES USED 
WER146B  24K BYTES OF EMERGENCY SPACE ALLOCATED 
WER108I  SORTIN   : RECFM=VB   ; LRECL=  8004; BLKSIZE= 27998 
WER073I  SORTIN   : DSNAME=HLQ.INPUT.FILE 
WER235A  OUTREC   RDW NOT INCLUDED 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000 
I think I am including the RDW in each of the IFWHEN phrases (1,4). Can anyone please help me with what I am doing wrong here?

Re: WER235A OUTREC RDW NOT INCLUDED .

Posted: Thu Oct 29, 2015 5:38 pm
by Akatsukami
Do not attempt to copy the RDW from the input data set; let Syncsort determine it.

Re: WER235A OUTREC RDW NOT INCLUDED .

Posted: Fri Oct 30, 2015 6:12 am
by William Collins
Akatsukami, I have duly noted that over the months you have been correctly picking up things about SORT.

However, in this case, you missed.

SORT, when using BUILD (or the horribly outdated FIELDS-in-a-context-where-BUILD-should-be used), always required for variable-length records that the RDW is copied. The original content can be irrelevant, the correct record-length will be handled by SORT, but the field must be sourced from the actual RDW of the current record. The coder will be prevented from amending the value of anything in the RDW.

Re: WER235A OUTREC RDW NOT INCLUDED .

Posted: Fri Oct 30, 2015 6:18 am
by William Collins
COBOL Wolf,

I don't believe you got that output with those Control Cards. If really so, report the bug to SyncSORT via the normal channels at your site.

OVERLAY for a variable-length record has column 5, the first byte of data, as the default starting point where no column is specified. Your 1,4 in the OVERLAY clobbered bytes five to eight.

I'm not sure what you are trying to do in the OVERLAY. You locate to a column, copy the existing data for a length to the same position and length, and then overlay the following bytes with a constant. That is unlikely to be what you really want.

With your BUILD, you are copying the entire record, byte for byte, to itself, keeping the original positions, and changing nothing. Ie, you are simply wasting resources. You don't need the WHEN=NONE if you are not going to change data in it.

I don't see what you've coded as likely to be what you want, but I can't see any way that it should genuinely give you that message with those Control Cards.

Re: WER235A OUTREC RDW NOT INCLUDED .

Posted: Mon Nov 02, 2015 12:05 pm
by Cobol Wolf
I've changed the OUTREC like this and it works for the requitement now:

Code: Select all

OUTREC IFTHEN=(WHEN=(32,1,CH,EQ,C'1'),      
                 BUILD=(1,4,5:5,27,        
                                 32:C'7X',            
                                 34:34,323,         
                                 358:C'FW',
                                 360:360,5,         
                                 366:C'D', 
                                 367:367)),         
               IFTHEN=(WHEN=NONE,         
                      BUILD=(1,4,5:5))