Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
In RPG free I define and call the Qp0zLprintf proc like this to write messages to the joblog:
Dcl-PR WrtJobLog Int(10:0) ExtProc('Qp0zLprintf');
szOutputStg Pointer Value Options(*String);
*n Pointer Value Options(*String: *NoPass);
*n Pointer Value Options(*String: *NoPass);
End-PR;
WrtJoblog(%trimR(Message) + LF);
"Message" is VarChar(256)
"LF" is a constant of x'25'
How would I do this same definition and call in CLLE?
You pass the LF and a null terminator since CL doesn't have *STRING as a parm option.
TESTJOBLOG: PGM DCL VAR(&LF) TYPE(*CHAR) LEN(2) VALUE(X'2500') DCL VAR(&MSG) TYPE(*CHAR) LEN(256) CHGVAR VAR(&MSG) VALUE('Hello World' *TCAT &LF) CALLPRC PRC('Qp0zLprintf') PARM((&MSG)) ENDPGM: ENDPGM
Thanks!
I had my &LF variable as this: DCL VAR(&LF) TYPE(*CHAR) LEN(1) VALUE(x'25')
I guess I was missing the NULL ind.