|
CL does not have an INTEGER type, and C does not do PACKED DECIMAL well. However, you should be able to let CL convert an INTEGER paramarter back to PACKED DECIMAL. Define the variables as below. Put &wrkINT on your parameter list, where the C program will treat it as an INT. The first CHGVAR before the call zeroes out the field. The second CHGVAR after the call changes the INT to PD. If your using long ints, I believe you can define &wrkINT as TYPE(*CHAR) LEN(8) As long as the C program puts a 4 byte int in the parm, you should be golden. This should work in CLP as well as CLLE. (OPM CL & ILE CL) DCL VAR(&wrkINT ) TYPE(*CHAR) LEN( 4) DCL VAR(&RRN ) TYPE(*DEC ) LEN( 15 0) CHGVAR VAR(&wrkINT) VALUE(X'00000000') CALL PGM(C-PGM) PARM(parm1, pram2 . . . parmX &wrkINT) CHGVAR VAR(&RRN) VALUE(%BIN(&wrkINT))
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.