I have to send a X digit (less than or equal to 8 digits) number from JCL to Cobol Program through SYSIN Statement.
But the COBOL program is receiving spaces in the trailing part
Below is the details.
COBOL PROGRAM VARIABLE DECLARATION in Working Storage Section:
000078 * VARIABLE TO ACCEPT DATA (IMEI RANGE AND QUANTITY ) FROM JCL
000079 01 WR-CPN-GROUP.
000080 05 WR-CPN-NUMBER PIC 9(8) VALUE ZEROES.
000081 05 FILLER PIC X(10) VALUE SPACES.
000082 05 WR-CPN-QUANTITY PIC 9(3) VALUE ZEROES.
The Values are accepted in Cobol program using the below accept statement:
the Display staement used in COBOL to display the data received
Values are passed from JCL Using JCL SYSIN Statement:
//SYSIN DD *
Output after running the JCL:
22291bbb (where 'bbb' is spaces)
I want the output to be 00022291. Is there any solution for this. please let me know if extra details are needed.