|
I need to clear a physical file at a certain point in an RPGLE program that uses CGIDEV2 and I'm having a tough time getting it to work. Here's the code I've tried (all free format): syscall('clrpfm gregw/fndordbydt'); and syscall('clrpfm file(gregw/fndordbydt)'); Then a co-developer theorized that perhaps you can't use the clrpfm command from inside a CGI job, so I wrote a batch program that does it and called it from a command line. It works great. Then I tried to call THAT program from within my CGI program, but no joy. Here's what I tried (the batch program has the same name as the file it's clearing): syscall('call gregw/fndordbydt'); and syscall('call pgm(gregw/fndordbydt)'); Then I tried it this way, and it STILL wouldn't work: syscall('sbmjob cmd(call pgm(gregw/fndordbydt)'); and Cmd = 'sbmjob cmd(call pgm(gregw/fndordbydt) parm(''' + '''))'; syscall(%trim(Cmd)); There are no parameters to pass, so I left the "parm" off and then tried it with "parm" blank. The CGI program doesn't fail, and there are no compile errors, but both the clrpfm and the call pgm commands simply don't do anything, no matter where I do the syscall within the program. What's wrong? Thanks.
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.