× 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: Passing Numeric Parms in SBMJOB. How ?
  • From: "Sirosh Sridharan" <reachsirosh@xxxxxxxxxxx>
  • Date: Thu, 18 Mar 1999 13:27:45 PST

           
Hi,

Here's the solution to ur problem :
To pass a number as parameter to a SBMJOB program, define the number as : TYPE(*DEC) LEN(15 5) or as TYPE(*CHAR).
Here's the reason :
When u pass parameters to a SBMJOB program, the parameters are passed by value rather than by reference. The reason being obvious - the calling program may cease after Submitting the called program and the variable used for passing the parameter will not be available after the calling program ceases. So the contents of the parameter variables are first converted to constants and then passed as constants.
And here's the point...CL passes numeric constants as 15,5. Any other definition will require that the value be passed as a HEX value. And this requires the number to have even no of digits (including the sign, if present). If the contents of the numeric parameter variable does not contain an EVEN no. of digits while Submitting the called program in batch, the result is an invalid HEX value and hence the error 'DECIMAL DATA ERROR'.
Hope I was able to quell ur doubt...

Bye,
Sirosh Sridharan.

----Original Message Follows----
From: Silvio Santos <Silvio.Santos@brainag.com>
Reply-To: RPG400-L@midrange.com
To: "'RPG400'" <RPG400-L@midrange.com>
Subject: Passing Numeric Parms in SBMJOB. How ?
Date: Thu, 18 Mar 1999 18:52:20 -0000


Hello!

I have a RPG program that has to call another program in BATCH. So I have to execute the command SBMJOB in there. But one of the parameters is a numeric variable of the program (with no decimals positions), and I don't know how to put (and use) it in the command.

Code extract:

Records for build an array with the command to execute:

** $PM (CL Parm-String)
SBMJOB CMD(CALL PGM(BASPG12) PARM(' // Parms that I need to build
' '
')) JOB(
) JOBQ(###JQCAL) LOG(0 0 *NOLIST) JOBMSGQFL(*WRAP)



Thanks


Get Your Private, Free Email at http://www.hotmail.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.