venkat2003
Programmer
Hi
Pleas let me know any other simple apporach apart from this.
I want to append C OR D indicator for my amount filed based on negative and postive
For example
01 WS-AMT PIC S9(16)V99 COMP-3
01 WS-TEMP1 PIC Z(16).ZZ.
01 WS-SIGN-IND PIC X.
01 WS-TEMP2 PIC X(19)
01 FINALAMT PIC X(20)
IF WS-AMT IS NEGATIVE
MOVE 'D' TO WS-SIGN-IND
ELSE
MOVE 'C' TO WS-SIGN-IND
END-IF
MOVE WS-AMT TO WS-TEMP1
MOVE WS-TEMP1 TO WS-TEMP2
STRING WS-TEMP2 WS-SIGN-IN DELIMITED BY SIZE INTO FINAL-AMT
Pleas let me know any other simple apporach apart from this.
I want to append C OR D indicator for my amount filed based on negative and postive
For example
01 WS-AMT PIC S9(16)V99 COMP-3
01 WS-TEMP1 PIC Z(16).ZZ.
01 WS-SIGN-IND PIC X.
01 WS-TEMP2 PIC X(19)
01 FINALAMT PIC X(20)
IF WS-AMT IS NEGATIVE
MOVE 'D' TO WS-SIGN-IND
ELSE
MOVE 'C' TO WS-SIGN-IND
END-IF
MOVE WS-AMT TO WS-TEMP1
MOVE WS-TEMP1 TO WS-TEMP2
STRING WS-TEMP2 WS-SIGN-IN DELIMITED BY SIZE INTO FINAL-AMT