|
Thanks Dave, This is perfect.... Regards, Matthias David.X.Kahn@gsk.com wrote: > > Matthias wrote: > > > These keyvalues have to be passed as an ARRAY(*) of > > binary(4). Can this be done with RPGIII? How? > > Yes, a number of ways. First, define your array as character length 4 (the > called program doesn't care that the calling program hasn't defined the > array as numeric) and initialise it to binary zeroes by moving low values > like this: > > E @BN 50 4 > * > C MOVE *LOVAL @BN > > If you want to pass numeric values for which you know the decimal value > it's probably easiest to work through a data structure like this: > > I DS > I B 1 40WRKBIN > I 1 4 WRKHEX > * > C Z-ADD123 WRKBIN > C MOVE WRKHEX @BN,1 > C Z-ADD345 WRKBIN > C MOVE WRKHEX @BN,2 > > If you already know the hexadecimal key values you can move them straight > in as literals. The following achieves the same result as the code above: > > C MOVE X'007B' @BN,1 > C MOVE X'0159' @BN,2 > > Dave... -- --------------------------------------------------------------------- Matthias Oertli <oertlim@s054.aone.net.au>
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.