× 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.



Just for fun:

Suppose a display file named DISPLAY containing one format that has one
field called PACK defined as numeric five and zero.  Suppose a CL program
named CLPGM containing a SNDRCVF command to display the format.  Imagine an
RPG program named RPGPGM that accepts one parameter defined as packed five
and zero.  In CLPGM, immediately following the SNDRCVF, call RPGPGM passing
&PACK.  The call will work every time.  Since this will work, then the
statement:

-|> -|You're actually 100% correct.  I *meant* to say,
-|> -|"...has something to do with not being able to pass numerics
-|> -|other than 15,2
-|> -|to RPG programs from CL programs directly..."

is not right.  (I assume that 15,2 really meant 15,5).

As a further example, change the RPG program to accept a packed 9,2
parameter.  Change the CL program in the example above so that it declares a
numeric variable called &NUM defined as nine and two.  After the SNDRCVF,
CHGVAR &NUM &PACK then call the RPG program passing &NUM.  This too will
work.

It will also work if the screen declares the parameter with decimals and the
&NUM has no decimals - although the digits right of the decimal will be
lost, that is a documented behavior of CHGVAR and it has been that way since
1981.

Since I can call an RPG program directly from a CL program and pass a
numeric parameter that is not declared as 15 and 5, I think that I can be
done.

Please post a code fragment that requires 15,5.

If your fragment includes a call to QCMDEXEC or SBMJOB and the command line
contains numeric literals, that is a well known and documented situation.
It has been documented to work like this since 1981.

I am being argumentative because this keeps coming up and it just isn't
true.

Richard Jackson
mailto:richardjackson@richardjackson.net
http://www.richardjacksonltd.com
Voice: 1 (303) 808-8058
Fax:   1 (303) 663-4325

-|-----Original Message-----
-|From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
-|Behalf Of Jim Langston
-|Sent: Tuesday, October 24, 2000 11:51 AM
-|To: RPG400-L@midrange.com
-|Subject: Re: 15,5 Revisted (Was Call Query)
-|
-|
-|I meant to say 15,5
-|
-|And what do you mean that is wrong?  This exact same conversation came up
-|back in July of this year and there was a lot of conversation going back
-|and forth about passing numerics to RPG.
-|
-|You show me a way to:
-|
-|1. Set up a display screen to accept numeric values.
-|2. Pass those values to RPG other than character or 15,5 numeric.
-|
-|This is an old topic and has been beaten to death.
-|
-|Regards,
-|
-|Jim Langston
-|
-|Richard Jackson wrote:
-|>
-|> -|You're actually 100% correct.  I *meant* to say,
-|> -|"...has something to do with not being able to pass numerics
-|> -|other than 15,2
-|> -|to RPG programs from CL programs directly..."
-|>
-|> That too would be completely wrong.
-|>
-|> Richard Jackson
-|> mailto:richardjackson@richardjackson.net
-|> http://www.richardjacksonltd.com
-|> Voice: 1 (303) 808-8058
-|> Fax:   1 (303) 663-4325
-|>
-|+---
-|| 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 thread ...

Replies:

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.