|
I plead guilty as charged and ask for mercy! Yes, I suggested the hex approach, but only for the right circumstances: In a pinch, a one-timer deal, maybe a couple of times for testing purposes. Only a programmer, never end-users. As far as always defining numeric parameters as 15,5, I guess that was a habit I never picked up. ("Alright, new habit: 15,5 for parameters!") - Dan Bale -----Original Message----- From: Jon.Paris@halinfo.it [mailto:Jon.Paris@halinfo.it] Sent: Thursday, March 23, 2000 7:56 PM To: rpg400-l@midrange.com Subject: RE: Passing Parms to an RPG Program Am I the only one horrified by all the suggestions of passing numeric parms as hex etc. that have appeared in response to this question? There is only one correct answer - any program called from the command line should define numeric parms as 15,5 packed. That is how the system passes them! While using hex may provide a quick hack for testing purposes it is open to error since you always have to ensure that the field is padded to the full length. For example if the field is 5S 0 then anything passed that is other than ten hex digits will be incorrect. If 15,5 doesn't work well for the person who raised the question, then the best answer is probably to define a command to handle the interface when calling from the command line - after all - it is the "command line" <vbg> +--- | 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.