FAQ Database Discussion Community


Does RPGLE has a ternary operator?

ternary-operator,rpgle
I did find old posts on forums about this question. But as they were old, I was wondering if it changed. I know that, back maybe in 2004, RPG did not have ternary operator. Having work a bit in C# and Java, I did use them and I like them....

Call procedure (long name) into variable (not free)

ibm-midrange,rpgle,rpg,icebreak
I'm trying to call a procedure and assign a variable with the output. My problem is that my procedure name is to long for the allowed space: This is my working source, is it posible to use move or movel and do the same? c eval pSitProp = json_parseString(wSitProp) ......

Write records from one PF to another without READ operation or DOW loop or move operation.

copy,move,ibm-midrange,rpgle
I know how to copy records from one pf to another by reading one file in dow loop and writing into another file like below. Files are PF1 and PF2 having record format rec1 and rec2 respectively where each file have only one field named fld1 and @fld1 respectively- READ...

Div(H) and Eval(H) gives different results

rpgle
I am using data from the same files in two different programs. I tried to get the same results in my new program using an Eval(H) instead of two operations of MULT and DIV(H) Here are the variable types : Var1,Var3,Var4,Var5 : 9P 2 Var2 : 9P 4 Original code...