|
Would you have any better luck by using a command to run your program
versus CALL itself?
Rob Berendt
==================
Remember the Cole!
"Wills, Mike N.
(TC)" To: "'RPG400-L@midrange.com'"
<RPG400-L@midrange.com>
<MNWills@taylorco cc:
rp.com> Subject: Building a CL command
in a RPG Program (Help!)
Sent by:
owner-rpg400-l@mi
drange.com
05/07/01 02:17 PM
Please respond to
RPG400-L
I am trying to build a CL call command within a RPG program with four
parameters. I cannot get the command to work. I am modifying a program and
for some reason unable to debug it to verify the command is right. What is
the proper syntax for putting quotes around parameters?
This is the command I want to call:
SBMJOB CMD(CALL PGM(PGMNAME) PARM('PARM1' 'PARM2' 'PARM3' 'PARM4'))
JOB(JOBNAME)
This is the code I have to build it:
EVAL CMD = 'SBMJOB CMD(CALL PGM(PGMNAME) ' +
'PARM("' + Parm1 + '" ' +
'"' + Parm2 + '" ' +
'"' + Parm3 + '" ' +
'"' + Parm4 + '"))' +
' JOB(JOBNAME)'
The command is being passed to a CL where is then uses QCMDEXC to execute
the command. My program gets a data decimal error because on some of the
parameters, it picks up the double quotes as part of the parameter (ex. A
date field would look like "0501200).
Thanks for any help!
Mike
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
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.