arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
Hi
I need to convert to PD to edited format. I have done below layout:
Code: |
01 GSKN-IN.
05 GSKN-KEY.
10 STATE PIC S9(5) COMP-3.
10 CATG-DESC PIC S9(5)V99 COMP-3.
05 GSKN-NO-OF-TIMES OCCURS 0 TO 40 TIMES DEPENDING ON WS-ENTRIES
INDEXED BY WS-INDX.
10 RTL-CODE PIC S9(7) COMP-3.
10 PERC PIC S9(3)V99 COMP-3.
10 RTL-DESC PIC X(30).
|
I have already done PD to EDIT conversion using SYNCSORT but that file layout was straight forward without OCCURS clause as shown below
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(01:01,48,
49:49,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
53:53,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
57:57,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
61:61,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
65:65,04,PD,EDIT=(SIIIIT.TT),SIGNS=(,-),
70:70,03,PD,EDIT=(SIIIIT),SIGNS=(,-),
|
can anyone help me how to implement the conversion. |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
There may be a way to do this with sort, but if you need this soon, i suggest writing the COBOL code as something like it probably already exists. . .
The code (given that the record layout already exists) should take only minutes. . . |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You can, but that won't give the result you want (if i understand). . .
I suspect you'd want pic zzzzz9.99- for the output picture.
Also, testing this would be very simple and you'd have had an answer faster than the post could have been made. . . |
|