I have a CL program that calls RPGLE procedure.
RPGLE procedure has field defined as 5S 0 (zoned decimal). In CL, i have a file variable which is of 10 characters (though value cannot exceed 5 characters). I need a way to pass this to the RPGLE procedure. I tried %BIN, %DEC, etc but then end with error. When i tried to copy 10 digit character field to 5 digit character field, the field "100" from file becomes "100__" (2 spaces at end). This causes decimal data crash at RPGLE procedure.
Any efficient way to handle this?
RPGLE procedure has field defined as 5S 0 (zoned decimal). In CL, i have a file variable which is of 10 characters (though value cannot exceed 5 characters). I need a way to pass this to the RPGLE procedure. I tried %BIN, %DEC, etc but then end with error. When i tried to copy 10 digit character field to 5 digit character field, the field "100" from file becomes "100__" (2 spaces at end). This causes decimal data crash at RPGLE procedure.
Any efficient way to handle this?
Comment