× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Building a CL command in a RPG Program (Help!)
  • From: "Slava Zharichenko" <Slava.Zharichenko@xxxxxxxx>
  • Date: Mon, 7 May 2001 20:17:13 -0500


it might help
C
C                   Eval      QCmd  = 'SBMJOB CMD-
C                             (' + %Trim($Parm) + ') JOB-
C                             (' + %Trim(F4JOBN) + ') -
C                              JOBD(' + %TRIM($JOBD) + ') -
C                              JOBPTY(' + %Trim(F4JOBP) + ') -
C                              USER(' + %Trim(F4USR) + ') INL-
C                             LIBL(*JOBD) JOBQ-
C                             (' + %TRIM($JOBQ) + ')-
C                              SCDDATE(' + %Trim(JDate) + ')-
C                              SCDTIME(' + %Trim(JTime) + ') DATE(*SYSVAL)'

Where $Parm contain : CALL PGM(PGMNAME) PARM('PARM1' 'PARM2' 'PARM3'
'PARM4')
C






MNWills@taylorcorp.com@midrange.com on 05/07/2001 02:17:15 PM

Please respond to RPG400-L@midrange.com

Sent by:  owner-rpg400-l@midrange.com


To:   RPG400-L@midrange.com
cc:

Subject:  Building a CL command in a RPG Program (Help!)



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
+---




______________________________________________________________________

Important Email Information

The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this email
by anyone else is unauthorized. If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be
taken in reliance on it, is prohibited and may be unlawful. If you are not
the intended addressee please contact the sender and dispose of this
e-mail.

+---
| 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.