|
I use a C function, the Prototipe is:*************** Principio de datos ************************************
0001.00 D System pr 10I 0 Extproc('system') 0002.00 D comando * Value options(*String)****************** Fin de datos ***************************************
In my program: /copy system /free system("any command, including expresions"); ... Alan Campin wrote:
If CLRPF is quicker, what is the procedure to call it from RPG?d ExecuteCommand... d pr n d PR_CommandToExecute... d 32767 Varying d Value /FreeIf Not ExecuteCommand('CLRPFM FILE(<YourFile>)'); <Your logic if it doesn't work.>EndIf; /End-Freeor just ExecuteCommand('CLRPFM FILE(<YourFile>)'); Just return.*-------------------------------------------------- * Procedure name: ExecuteCommand * Purpose: Execute a command * Returns: * Parameter: InCommand => Incoming command *-------------------------------------------------- p ExecuteCommand b d pi n d InCommand 32767 Varying d Value d ExecuteQCMDEXC... d pr ExtPgm('QCMDEXC') d PR_CommandToExecute... d 32767 Options(*VarSize) d Const d PR_CommandLength... d 15p 5 Const d PR_IGCProcessControl... d 3 Options(*NoPass) d Const /Free Monitor; ExecuteQCMDEXC(InCommand:%Len(InCommand)); On-Error; Return '1'; EndMon; Return '0'; /End-Free p e
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.