|
Just to clarify - The only time I'd call a program with numeric parameters being passed as hexadecimal from the command line would be in testing mode. If this is a program that is used often from the command line, it should be called from a command, especially if there are any parameters to be passed to it. My .02 - Dan Bale -----Original Message----- From: Tom Tufankjian [mailto:Tom_Tufankjian@hbltd.com] Sent: Thursday, March 23, 2000 9:56 AM To: RPG400-L@midrange.com Subject: Re: Passing Parms to an RPG Program You'd have to pass the value from the command line in hexadecimal format. I wouldn't go there. However there are easier ways. 1. Create a command with the numeric parm and with your RPG program as the command processing program . 2. If you're just testing, create a cl program with the numeric variable declared with an initial value, then call your program using that declared value: DCL VAR(&NUMBER) TYPE(*DEC) LEN(5 0) VALUE(1234) call pgma parm(&number) 3. Whenever possible always use character parms to hold your numeric value. MUCH EASIER. This works well with dates, option numbers, etc. You can always move them to numeric in your rpg program. You must enclose the number in single quotes though: call pgma parm('000323' ) If not possible to use a character parm, follow example 1 or 2. Hope this helps, Tom T. Hope this helps. +--- | 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-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.