× 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: Entry Parameters
  • From: "Scott Klement" <infosys@xxxxxxxxxxxx>
  • Date: 19 Jan 2000 15:01:58 -0600

If you're going to call it from the command line, and pass the parms,
the parms either have to be 15P 5, or they have to be character
variables.   This has nothing to do with RPG IV (or "RPGLE") but
rather is just the way that the command interpreter deals with
numbers.  (In other words, you'd have the same problem in CL or
RPG III, as well)

IMHO, if you want to pass things from the command line, the best
solution is to create a command.

If you're just doing this for testing purposes, you might consider
passing them as hex values... i.e. instead of:
PARM(51)   you'd do    PARM(x'F5F1')

Another thing you might want to reconsider is whether you truly
need to pass "Zoned Decimal" parms instead of packed.   CL can't
do zoned...  I may be wrong, but I also don't think that commands
are capable of passing zoned...   You can do it in RPG III, but its
slightly more difficult than packed.   So, in my opinion, passing
parms as zoned isnt usually a good policy...

Have fun...



Jim Langston <jlangston@conexfreight.com> wrote:
> 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 Deb
> 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?  I
> 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 no
> 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 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.