|
>Booth, thanks for the response. That's what I ended up doing. To me, it >seems "klutzy" to have to do CHGVAR alpha VALUE(numeric) for every numeric >variable being passed in the CL SBMJOB, then have to either use data >structures on the parms in the RPG program or move alpha to numeric >stand-alone variables. Then pass the hex. If you want to pass a 5,2 parm with the value 123.45 as a parameter on the call you can either define it in the callED program as a 15,5 or you can pass if from the callING program as x'12345f' and the callED program will receive it correctly. In the callING program define a character field that is as long as the decimal field (a 7,2 is 7 an 11,4 is 11, etc). Fill the field with zeros and then move in the numeric value. You should end up with 00000012345 in the character field. Then concat "x'" to the front and "f'" to the end and you're all set. Remember, the total number of hex digits must be even including the 'f' at the end. So, if you're using an odd number of characters you're all set. If you're using an even number you'll have to prepend "x'0" instead of "x'" so you get an even number once you add the 'f' at the end. This is also helpful to know when you're trying to call a program that takes a 7,2 packed for example from the command line to test it. Call PGM1 PARM('ABC' x'0012345f') Would call PGM1 passing a 3 byte character field with ABC in it and a 7 digit numeric that the callED program saw as 123.45. -Walden ------------ Walden H Leverich III President & CEO Tech Software (516) 627-3800 x11 WaldenL@xxxxxxxxxxxxxxx http://www.TechSoftInc.com Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.)
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.