Question

  Asked: Jun 5 2008   3:45 PM GMT
  Asked by: Svankipu


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


CL/400, QRYSLT, OPNQRYF, CL

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.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0




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.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register