|
Hello Jim,
Despite Buck's very well explained append, because you are expecting Zoned
Decimal values you
can simply invoke the program with:
CALL PGM(JIMCONEX/CHGAPOPEN) PARM('51' '990110' '51' '000120')
Note the 'quotation' marks -- yeah, I know they're apostrophes.
Note that no 'conversions' are neccessary. The character values 'magically'
become numbers.
Why does this work?
Regards,
Simon Coulter.
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software AS/400 Technical Specialists «»
«» Eclipse the competition - run your business on an IBM AS/400. «»
«» «»
«» Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 «»
«» Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au «»
«» «»
«» Windoze should not be open at Warp speed. «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
//--- forwarded letter -------------------------------------------------------
> X-Mailer: Mozilla 4.7 [en] (WinNT; I)
> Date: Wed, 19 Jan 2000 12:04:53 -0800
> From: "Jim Langston" <jlangston@conexfreight.com>
> To: "RPG400-L@midrange.com" <RPG400-L@midrange.com>
> Reply-To: RPG400-L@midrange.com
> Subject: Entry Parameters
>
> V3R7M0 RPGLE
>
> I wrote an RPGLE program that is supposed to accept four
> numeric values as parameters.
>
> D FromCompNum S 2S 0
> D FromBatch S 6S 0
> D ToCompNum S 2S 0
> D ToBatch S 6S 0
>
> C *Entry PList
> C Parm FromCompNum
> C Parm FromBatch
> C Parm ToCompNum
> C Parm ToBatch
>
> C If APComp = FromCompNum And
> C APBatc = FromBatch
> <SNIP>
>
> I call it thustly:
>
> CALL PGM(JIMCONEX/CHGAPOPEN) PARM(51 990110 51 000120)
>
> The If statement bombs with a Decimal Data Error. Putting it in Debug
> Mode, I see that my four parameters contain garbage. How am I supposed
> to call this thing? Do I have to pass them as character strings? If
> so, I would
> create a Data Structure Like:
>
> D DS
> D FromCompNum 1 2S 0
> D FromCompAsStr 1 2
>
> Then put FromCompAsStr in my Parm statement. Is this what I have to do?
>
> I know this will work, I have done it in the past, and will do it now
> while
> waiting for a response, but isn't there another way?
>
> Regards,
>
> Jim Langston
>
+---
| 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.