Last active
May 6, 2020 19:13
-
-
Save qpgmr-de/5150a1ef10c188a06174436017b146b1 to your computer and use it in GitHub Desktop.
IBM i full free ILE-RPG print procedure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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