I have julian and year in seperate fields..I need to copy that to a single field.
Julian-date is of PIC S9(03) comp-3 redefined to PICx(02).
Year is of PIC 9(04)..
and my o/p fileds is of length PIC s9(07) COMP-3 redefined to PIC x(04).
I have tried defining the 2 fields in a gropu var. and made move accordingly,
01 WS-TEMP-JDYEAR.
03 WS-TEMP-JULIAN-DATE PIC X(02).
03 WS-TEMP-YEAR PIC S9(05) COMP-3.
03 WS-TEMP-YEAR-C REDEFINES
WS-TEMP-YEAR PIC X(03).
03 WS-TEMP-JULIAN-DATE PIC X(02).
03 WS-TEMP-YEAR PIC S9(05) COMP-3.
03 WS-TEMP-YEAR-C REDEFINES
WS-TEMP-YEAR PIC X(03).
Now in the group field am getting as
WS-TEMP-JDYEAR
10001------------ 10 0 0 1
1F21C 1F 2 1 C
1F21C 1F 2 1 C
here 110 is the JD and 2011 is the year,,, this field is of lenth x(05)...
But my o/p field is of length PIC X(04).
How can I define fields so that I can get
1001
121C