CL/400 – I want to know about QRYSLT(Please see below explanation)

560 pts.
Tags:
CL
CL/400
OPNQRYF
QRYSLT
Hi, I am not well versed with code in CL/400, i know the concepts. I want to know what is he doing in the below code. e.g usibng the symbols '|>' and '||' and '<|' IF COND(&TODUE7 *NE '0000000') THEN(DO) CHGVAR VAR(&QRYSL) VALUE(&QRYSL |> ' *AND (ODUDT *GE + ' || &FRDUE7 || ') *AND') CHGVAR &QRYSL VALUE(&QRYSL |> '(ODUDT *LE ' || + &TODUE7 || ')') ENDDO IF COND(&TOORD *NE ' ') THEN(DO) CHGVAR VAR(&QRYSL) VALUE(&QRYSL |> ' *AND (ORDNO *GE + "' || &FRORD || '") *AND') CHGVAR &QRYSL VALUE(&QRYSL |> '(ORDNO *LE "' || + &TOORD || '")') ENDDO ********************************* OPNQRYF FILE((SAWMOMPF)) QRYSLT(&QRYSL) + KEYFLD((FITWH) (RATIO) (ORDNO)) I understand that he's building the query &QRYSL above, which to be used later in OPNQRYF. but am unable to understand what he's doing above with &QRYSL exactly. any clarification would be greatly aPpreciated.
ASKED: June 5, 2008  3:45 PM
UPDATED: April 25, 2010  9:20 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

The symbols are short forms of the CAT operators.

|| is *CAT (Concatenate without altering the spaces between the two values)
|> is *BCAT (Concatenate with a blanks space between the two values)
<| is *TCAT (Concatenate and remove spaces between the two values)

Regards,

Martin Gilbert.

=========================================================

The symbols are not recommended. Because they consist of characters that may be variant, they can appear differently on different workstations or printers. They can also be incorrectly translated when source members are copied from one system to another.

I tend to replace them wherever I find them with the mnemonic forms.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following