×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Jim,

Decimal constants passed as parameters on the CALL command are ALWAYS passed
with a length of 15,5. Refer to the CL Programmers Guide, Chapter 3. It is
definitely a PITA.

Regards,

John Taylor
Canada


----- Original Message -----
From: "Jim Langston" <jlangston@conexfreight.com>
To: <RPG400-L@midrange.com>
Sent: Wednesday, January 19, 2000 13:04
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
> +---
>

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