harish_2480
New User
Joined: 07 Jun 2007 Posts: 23 Location: USA
|
|
|
|
Hi,
I am trying to select records whose rec id is "40" from input file (VB File and lrecl is 604) and along with this selection, i am reformatting (taking few fields at different positions). This i have done successfully but i am trying yo convert COMP3 field to a ZDF format. I am getting some problem.
Input file structure: (VB file - Lrecl - 604)
1 01 ORD5ITEM G 1 493
2 05 VB-FILE-FILL Z 4 1 4
3 05 ORD5ITEM-RECORD-ID Z 2 5 2
4 05 ORD5ITEM-UPDATE-IND C 1 7 1
5 05 ORD5ITEM-WAITING-RESPONSE Z 1 8 1
6 05 ORD5ITEM-NR B 4 9 2
7 05 ORD5ITEM-LOT-NBR PS 7 11 4
8 05 ORD5ITEM-SKU-NBR PS 3 15 2
9 05 ORD5ITEM-SIZE C 5 17 5
10 05 ORD5ITEM-SIZE-COLOR C 5 17 5
REDEFINES ORD5ITEM-SIZE
11 05 ORD5ITEM-COLOR C 5 22 5
12 05 ORD5ITEM-DISP C 1 27 1
13 05 ORD5ITEM-ITEM-STATUS C 2 28 2
14 05 ORD5ITEM-ERRORS G 30 10
15 10 ORD5ITEM-ERROR-CODE Z 2 30 10
OCCURS 5 TIMES
20 05 ORD5ITEM-INPUT-MEDIA C 2 40 2
21 05 ORD5ITEM-SELL-MEDIA C 2 42 2
22 05 ORD5ITEM-SUFFIX C 2 44 2
23 05 ORD5ITEM-WAREHOUSE-CLASS C 2 46 2
24 05 ORD5ITEM-DESC C 31 48 31
25 05 ORD5ITEM-FILL-DATE PS 5 79 3
26 05 ORD5ITEM-PROMISE-DATE PS 5 82 3
27 05 ORD5ITEM-REPROMISE-DATE PS 5 85 3
28 05 ORD5ITEM-LAST-PROM-DATE PS 5 88 3
29 05 ORD5ITEM-PROCESS C 1 91 1
30 05 ORD5ITEM-KIT-ID PS 1 92 1
31 05 ORD5ITEM-QUAN B 6 3 93 4
AND So on for length of 604 (LRECL). I am taking the fields (reformat) from above list only and not beyond ORD5ITEM-QUAN field hence i am not copying the full structure.
Please see my output file structure: (Lrecl is 20 - VB file)
01 ORD5ITEM.
05 VB-FILE-FILL PIC 9999.
05 ORD5ITEM-RECORD-ID PIC 99.
05 ORD5ITEM-LOT-NBR PIC S9(7) COMP-3.
05 ORD5ITEM-SKU-NBR PIC S9(3) COMP-3.
05 ORD5ITEM-DISP PIC X.
05 ORD5ITEM-ITEM-STATUS PIC XX.
05 ORD5ITEM-KIT-ID PIC S9 COMP-3.
05 ORD5ITEM-QUAN PIC S9(6)V999 COMP.
My control card is:
INCLUDE COND=(5,2,CH,EQ,C'40')
SORT FIELDS=COPY
OUTREC FIELDS=
(1:1,4,5:5,2,7:11,4,TO=ZDF,LENGTH=8,11:15,2,TO=ZDF,LENGTH=4,
13:27,1,14:28,2,15:92,1,TO=ZDF,LENGTH=2,16:93,4,EDIT=(IIT.TTT))
Please let me knos can i do like this conversion or not? Can i convert the COMP3 values to some characters as i need to download the output file to an XLS or text document and the values should be plain text and not in Hex or PD format.
Please let me know if require more information. |
|