INCOMPATIBLE LRECL



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

INCOMPATIBLE LRECL

Postby timcordsen » Thu Sep 17, 2015 5:47 pm

Hello everybody,
I get an error code 16. INCOMPATIBLE LRECL. The File is no. 03 is FB590. In my opinion it is right. Where is my mistake?

JOINKEYS FILES=F1,FIELDS(30,2,A,             
                         32,3,A,             
                         35,1,A,             
                          4,26,A,           
                        164,5,A)             
JOINKEYS FILES=F2,FIELDS(16,2,A,             
                         13,3,A,             
                         18,1,A,             
                         38,26,A,           
                         33,5,A)             
REFORMAT FIELDS=(F2:1,590,                   
                 F1:1,239),FILL=C'*'         
JOIN UNPAIRED                               
SORT FIELDS=COPY                             
OUTFIL FILES=01,                             
INCLUDE=(591,20,CH,EQ,C'********************'),BUILD=(1,590)
OUTFIL FILES=02,                                           
INCLUDE=(1,20,CH,EQ,C'********************'),BUILD=(591,239)
OUTFIL FILES=03,SAVE,IFTHEN=(WHEN=(79,3,CH,EQ,C'INV'),     
                             BUILD=(1,183,                 
                                  608,12,                   
                                  759,7,                   
                                  184,388),HIT=NEXT),       
                     IFTHEN=(WHEN=(79,3,CH,NE,C'INV'),     
                             BUILD=(1,590))                 


Thanks in advance.
timcordsen
 
Posts: 3
Joined: Thu Sep 17, 2015 5:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: INCOMPATIBLE LRECL

Postby Robert Sample » Thu Sep 17, 2015 6:30 pm

I get an error code 16. INCOMPATIBLE LRECL. The File is no. 03 is FB590. In my opinion it is right. Where is my mistake?
The FIRST mistake is that you think you are right and the computer is wrong. Computers don't lie -- if you are getting an INCOMPATIBLE LRECL message it is because the LRECL the computer is calculating is not what you think it is. Perhaps you should start by finding out what the computer thinks the LRECL is and work from there, rather than blindly (and wrongly) assuming you are right and the computer is wrong?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: INCOMPATIBLE LRECL

Postby timcordsen » Thu Sep 17, 2015 6:42 pm

Thank you so much for your words, but they don't help me.

Here is the full JCL, maybe you can find out what the computer "thinks" I can't.

//S03     EXEC PSSORT                           
//SORTJNF1  DD DSN=UE72025.DA1.TDA1170.BKK,     
//             DISP=SHR                         
//SORTJNF2  DD DSN=UE72025.DA1.TDA1220.UNLOAD, 
//             DISP=SHR                         
//SORTOF01  DD DSN=UE72025.DA1.TDA1220.TEMP,   
//             RECFM=FB,LRECL=590,             
//             DISP=(NEW,CATLG,CATLG),         
//             SPACE=(CYL,(50,10),RLSE)         
//*            UNIT=3490,RETPD=21,             
//*            VOL=(,,,99)                     
//SORTOF02  DD DUMMY                           
//*            DISP=(NEW,CATLG,CATLG),         
//*            RECFM=FB,LRECL=239,             
//*            SPACE=(CYL,(50,10),RLSE)         
//SORTOF03  DD DSN=UE72025.DA1.INHOUSE.PASST,   
//             DISP=(NEW,CATLG,CATLG),         
//             RECFM=FB,LRECL=590,             
//             SPACE=(CYL,(50,10),RLSE)         
//SYSOUT    DD SYSOUT=X                         
//SYSIN     DD *                               
 JOINKEYS FILES=F1,FIELDS(30,2,A,             KV_NR         
                          32,3,A,             QUARTAL_DAT   
                          35,1,A,             DADD_R_SL     
                           4,26,A,            TKL_TIMESTAMP 
                         164,5,A)             ID_LST_ERB_NR 
 JOINKEYS FILES=F2,FIELDS(16,2,A,             KV_NR         
                          13,3,A,             QUARTAL_DAT   
                          18,1,A,             DADD_R_SL     
                          38,26,A,            TKL_TIMESTAMP 
                          33,5,A)             ID_LST_ERB_NR 
 REFORMAT FIELDS=(F2:1,590,                                 
                  F1:1,239),FILL=C'*'                       
 JOIN UNPAIRED                                               
 SORT FIELDS=COPY                                           
 OUTFIL FILES=01,                                           
 INCLUDE=(591,20,CH,EQ,C'********************'),BUILD=(1,590)
 OUTFIL FILES=02,                                           
 INCLUDE=(1,20,CH,EQ,C'********************'),BUILD=(591,239)
 OUTFIL FILES=03,SAVE,IFTHEN=(WHEN=(79,3,CH,EQ,C'INV'),     
                              BUILD=(1,183,                 
                                   608,12,                   
                                   759,7,                   
                                   184,388),HIT=NEXT),       
                      IFTHEN=(WHEN=(79,3,CH,NE,C'INV'),     
                              BUILD=(1,590))                 
/*                                                           
timcordsen
 
Posts: 3
Joined: Thu Sep 17, 2015 5:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: INCOMPATIBLE LRECL

Postby BillyBoyo » Thu Sep 17, 2015 7:09 pm

When you get an error, it is good to show the sysout from the step which shows the error, including the full message and its code, which I assume is WER247A.

Showing the JCL has added nothing.

If you are correct in your belief about the 590, then the step works, worked when you ran it and will always work in the future.

To be fair, you did wonder where your mistake was. "I'm right, is this a compiler bug"-type-of-thing we see too often, and often switch off and reply when seeing that type of phrase.

So, you're wrong, the computer is right, and you want to know how.

This is a bit tortuous:

OUTFIL FILES=03,SAVE,IFTHEN=(WHEN=(79,3,CH,EQ,C'INV'),     
                             BUILD=(1,183,                 
                                  608,12,                   
                                  759,7,                   
                                  184,388),HIT=NEXT),       
                     IFTHEN=(WHEN=(79,3,CH,NE,C'INV'),     
                             BUILD=(1,590))


When an IFTHEN=(WHEN=(logicalexpression) is true for a record, IFTHEN processing stops for that record. To modify that behaviour, you use HIT=NEXT.

However, you don't want to modify that behaviour, because you have mutually-exclusive conditions.

Then, if the first IFTHEN is satisfied, the second will never be tested. And if the first is not satisfied, you know that the second is certainly true.

OUTFIL FILES=03,SAVE,IFTHEN=(WHEN=(79,3,CH,EQ,C'INV'),     
                             BUILD=(1,183,                 
                                  608,12,                   
                                  759,7,                   
                                  184,388)),       
                     IFTHEN=(WHEN=NONE,     
                             BUILD=(1,590))


Consider IFTHEN=(WHEN=(logigcalexpression)... to be like a COBOL EVALUATE (if you know COBOL) and WHEN=NONE is the catch-all at the end if none of the tests are true. Where there is a single test, it is (also) like an IF/ELSE.

However, you don't need that second BUILD, because position 1,590 already contains the data of position 1,590. Because you have used an IFTHEN you can use IFOUTLEN to set the record-length for the output records (IFOUTLEN represents the output record-length after IFTHEN processing).

 OUTFIL FILES=03,
        SAVE,
        IFOUTLEN=590,
        IFTHEN=(WHEN=(79,3,CH,EQ,C'INV'),     
                             BUILD=(1,183,                 
                                  608,12,                   
                                  759,7,                   
                                  184,388))


Now your problem has gone away.

What was your problem? Your input, the REFORMAT record, was not 590. SORT is interested in rapid processing. It does not attempt to fully understand the IFTHEN-flow as a whole, it relies on the human coder to do that. Because of your code, SORT could not determine the IF/ELSE-EVALUATE/OTHER nature (it would take too long), and believed it would be possible that the original REFORMAT record could also reach the end of the OUTFIL.

Now, with the IFTHEN changes (I can't check specifically, I don't have SyncSORT) or with the IFOUTLEN for sure, you are not going to get that problem.

And, it is best not to code the DCB info for output datasets from SORT. SORT will provide what you have coded in the Control Cards. If you code it in the JCL as well, then you have two places to have it correct, and two places to maintain it.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: INCOMPATIBLE LRECL

Postby timcordsen » Thu Sep 17, 2015 8:05 pm

Thank you very much, the problem is done.

Great, fast help!
timcordsen
 
Posts: 3
Joined: Thu Sep 17, 2015 5:43 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post