|
>> 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
/Free
If Not ExecuteCommand('CLRPFM FILE(<YourFile>)');
<Your logic if it doesn't work.>
EndIf;
/End-Free
or 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-2025 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.