|
Gosh... You didn't show your PLIST so I'm assuming your fields in the D spec are your parms... Basically, if you call a program from CL or the Command Entry, they numeric fields are ALWAYS passed as Packed(15,5). You can't change this. So in your program your parameters will need to also be 15P5. However, if you call a program from CL, you can declare numeric variables and then pass those numeric variables as parameters. Then they get passed to your program as whatever they're defined as. You can work-around this by creating a Command definition that defines the parameters with the attributes you like. For example, to define a field as 7P0 in a Command you would code: PARM InOrder TYPE(*DEC) LEN(7 0) PROMPT('Order number') -Bob -----Original Message----- From: rpg400-l-bounces@midrange.com [mailto:rpg400-l-bounces@midrange.com] On Behalf Of Bill Sent: Friday, January 17, 2003 11:41 AM To: RPG400-L@midrange.com Subject: Unsigned Numbers I have a program where I'd like to feed, as a parameter, an unsigned number. For some reason, I can't figure out how to do it. I thought I could use field type S, zoned-decimal, but that doesn't work. Here's what I do now: D cInAction S 1 D cInOrder S 6 D cInLine S 3 C Eval XORD = %Uns(cInOrder) C Eval XLINE = %Uns(cInLine) The call: CALL PGM(ORD42A) PARM(D '249196' '001') I'd like to call like this: CALL PGM(ORD42A) PARM(D 249196 001) How would I define the second and third parameters to accomplish this? Bill _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.