Is there an easy way to concatenate three strings and ignore leading zeros in the concatenation?
For example:
05 PC-L-PAR PIC X(01) VALUE '('.
05 PC-R-PAR PIC X(01) VALUE ')'.
05 PV-STR-CNT PIC S9(10) VALUE ZEROES.
05 HDR06-SALES-01 PIC 9(10) VALUE ZEROS.
PV-STR-CNT = 0000000056
Here is what I have tried.
STRING PC-L-PAR DELIMITED BY SIZE
PV-STR-CNT DELIMITED BY ZEROS
PC-R-PAR DELIMITED BY SIZE
INTO HDR06-SALES-01
I get ()00000000
I have also tried
STRING PC-L-PAR DELIMITED BY SIZE
PV-STR-CNT DELIMITED BY ' '
PC-R-PAR DELIMITED BY SIZE
INTO HDR06-SALES-01
and I get (000000056
and I want (56)
Thanks for the help in advance.
For example:
05 PC-L-PAR PIC X(01) VALUE '('.
05 PC-R-PAR PIC X(01) VALUE ')'.
05 PV-STR-CNT PIC S9(10) VALUE ZEROES.
05 HDR06-SALES-01 PIC 9(10) VALUE ZEROS.
PV-STR-CNT = 0000000056
Here is what I have tried.
STRING PC-L-PAR DELIMITED BY SIZE
PV-STR-CNT DELIMITED BY ZEROS
PC-R-PAR DELIMITED BY SIZE
INTO HDR06-SALES-01
I get ()00000000
I have also tried
STRING PC-L-PAR DELIMITED BY SIZE
PV-STR-CNT DELIMITED BY ' '
PC-R-PAR DELIMITED BY SIZE
INTO HDR06-SALES-01
and I get (000000056
and I want (56)
Thanks for the help in advance.