Skip to content

Instantly share code, notes, and snippets.

@qpgmr-de
Last active May 6, 2020 19:13
Embed
What would you like to do?
IBM i full free ILE-RPG print procedure
dcl-proc print;
//--------------------------------------------
// usage:
// ...
// print('Message');
// ...
// /COPY PRINT
//--------------------------------------------
dcl-pi *N;
pMsg VarChar(5000) Const;
end-pi;
dcl-pr printf ExtProc(*DCLCASE);
*N Pointer Value Options(*STRING);
*N Int(10) Value Options(*NOPASS);
end-pr;
dcl-c LF Const(x'15'); // Newline/LF
dcl-s myMsg VarChar(5001) Inz;
myMsg = %Trim(pMsg) + LF;
printf(myMsg);
return;
end-proc print;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment