RATE THIS ANSWER
0
Click to Vote:
0
0
AFAIK, no.
However, the result that you apparently want can be obtained in at least two different ways.
You can REDEFINE an area with multiple definitons. At run-time, choose which field will be the target for the data you MOVE into it.
You can also simply declare the field as PIC X(18) or however long the space is. Then use edit APIs to apply whatever edit word you want to a value and move the edited value into the field.
Tom
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Or have two edit patterns and move the appropriate one to your output line.
05 DEBIT-TRUE PIC ZZZZZZZ,ZZZ,ZZ9.99.
05 DEBIT-FALSE PIC ZZZ,ZZZ,ZZZ,ZZ9.99.
05 OP-LINE.
10 OP-DEBIT PIC x(18).
IF condition-is-true
MOVE debit-field TO DEBIT-TRUE
MOVE DEBIT-TRUE TO OP-DEBIT
ELSE
MOVE debit-field TO DEBIT-FALSE
MOVE DEBIT-FALSE TO OP-DEBIT.
WRITE op-file FROM OP-LINE.
Hi Your answer is good but my program is very big so i need to change so many lines instead of that only i asked is there any possibility by using single var... Thanks for ur reply..
Last Answered:
Oct 29 2009 3:54 AM GMT by Promodhss 
35 pts.