× 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: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Thu, 20 Jan 2000 08:10:15 -0800
  • Organization: Conex Global Logistics Services, Inc.

Hmm... Okay, it was my assumption that when passing variables
to an RPGLE program from the command line with parameters,
that the system checked the data types of the parameters to make
sure they were the same, I guess not.  Which is good in this
case.

And, yes, I understand why it works, but didn't think to try it
given my experience with parameter types in other things.  Yes,
negative numbers could be a pain, but I actually have the list
written down as to what symbol is what negative number.  It is
actually not that hard to remember.  } is 0, J is 1 and it goes to
R is 9.  Capital J and Capital R.

Okay, this is doable, although I could not expect my users to
know how to put in a negative number, in this case it doesn't
matter since there will never be a negative number for the
parameters.

Er, or there should never be a negative number <g>

Hmm... this being the case, it seems that any number passed as
a parameter to an RPG program will always have to be passed
as a character?  I attempted to do a CMD for the program, but
it failed with same error, but at that point it is possible that I had
the variables defined differently that 15P 2.

Regards,

Jim Langston

Simon Coulter wrote:

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

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