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... _________ ,___o __________ _\ <;_ ___________ (_)/ (_) http://www.twickenhamcc.co.uk ======================================================= The opinions expressed in this communication are my own and do not necessarily reflect those of my employer.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.