Discussion:
SYNCSORT Question with IFTHEN and JOINKEYS
(too old to reply)
George,
2020-09-15 20:29:24 UTC
Permalink
Greetings

I'm stumped with a sort using IFTHEN logic within a JOINKEYS process.
I can't seem to get away from this error: BOTHFLS HAS INCOMPATIBLE LRECL

NOTE: BOTHFLS is the output file for records in both files. :)
F1ONLY & F2ONLY are self-explanatory.

Here's are the cards:

JOINKEYS F1=IN1,FIELDS=(1,12,A)
JOINKEYS F2=IN2,FIELDS=(12,12,A)
*
JOIN UNPAIRED
REFORMAT FIELDS=(F1:1,710,?,F2:1,596)
* ---------------------------------------------------------------------
* | CONTROL STATEMENTS AFTER RECORDS HAVE BEEN JOINED IN THE TEMP FILE|
* ---------------------------------------------------------------------
OPTION COPY
OUTFIL FNAMES=BOTHFLS,INCLUDE=(711,1,CH,EQ,C'B'),
IFTHEN=(WHEN(1,1,CH,EQ,C'1'),
BUILD=(1:1,710)),
IFTHEN=(WHEN(1,1,CH,NE,C'1'),
BUILD=(001:711,596,
597:1,114))
OUTFIL FNAMES=FL1ONLY,INCLUDE=(711,1,CH,EQ,C'1'), BUILD=(1,710)
OUTFIL FNAMES=FL2ONLY,INCLUDE=(711,1,CH,EQ,C'2'), BUILD=(712,596)
/*

Note: I have successfully run each BUILD individually without the IFTHEN to verify I have the lengths of each correct.
We are on SYNCSORT FOR Z/OS 2.1.9.

Any insights would be greatly appreciated!

Thanks
Bill

______________________________________________________________________
CONFIDENTIALITY NOTICE: This email from the State of California is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review or use, including disclosure or distribution, is prohibited. If you are not the intended recipient, please contact the sender and destroy all copies of this email.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Massimo Biancucci
2020-09-16 05:09:26 UTC
Permalink
Bill,

I think the problem is the IFTHEN on BOTHFLS.

SS "thinks" there's an option to write a record other than 711,1,CH,EQ,C'1'
and 711,1,CH,NE,C'1'. We know it's not possible.
So it's enough to change the IFTHEN in:

IFTHEN=(WHEN(1,1,CH,EQ,C'1'),
BUILD=(1:1,710)),
IFTHEN=(WHEN=NONE,
BUILD=(001:711,596,
597:1,114))

Hope this helps.

Regards.
Max


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Mail
priva di virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_444981408700301098_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Post by George,
Greetings
I'm stumped with a sort using IFTHEN logic within a JOINKEYS process.
I can't seem to get away from this error: BOTHFLS HAS INCOMPATIBLE LRECL
NOTE: BOTHFLS is the output file for records in both files. :)
F1ONLY & F2ONLY are self-explanatory.
JOINKEYS F1=IN1,FIELDS=(1,12,A)
JOINKEYS F2=IN2,FIELDS=(12,12,A)
*
JOIN UNPAIRED
REFORMAT FIELDS=(F1:1,710,?,F2:1,596)
* ---------------------------------------------------------------------
* | CONTROL STATEMENTS AFTER RECORDS HAVE BEEN JOINED IN THE TEMP FILE|
* ---------------------------------------------------------------------
OPTION COPY
OUTFIL FNAMES=BOTHFLS,INCLUDE=(711,1,CH,EQ,C'B'),
IFTHEN=(WHEN(1,1,CH,EQ,C'1'),
BUILD=(1:1,710)),
IFTHEN=(WHEN(1,1,CH,NE,C'1'),
BUILD=(001:711,596,
597:1,114))
OUTFIL FNAMES=FL1ONLY,INCLUDE=(711,1,CH,EQ,C'1'), BUILD=(1,710)
OUTFIL FNAMES=FL2ONLY,INCLUDE=(711,1,CH,EQ,C'2'), BUILD=(712,596)
/*
Note: I have successfully run each BUILD individually without the IFTHEN
to verify I have the lengths of each correct.
We are on SYNCSORT FOR Z/OS 2.1.9.
Any insights would be greatly appreciated!
Thanks
Bill
______________________________________________________________________
CONFIDENTIALITY NOTICE: This email from the State of California is for the
sole use of the intended recipient and may contain confidential and
privileged information. Any unauthorized review or use, including
disclosure or distribution, is prohibited. If you are not the intended
recipient, please contact the sender and destroy all copies of this email.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Mail
priva di virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...