IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting PD to ZDF using OUTREC


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harish_2480

New User


Joined: 07 Jun 2007
Posts: 23
Location: USA

PostPosted: Thu Aug 05, 2010 3:12 am
Reply with quote

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.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Aug 05, 2010 3:35 am
Reply with quote

harish_2480,

Post the INPUT COBOL definition layout(with PIC clauses) of the following fileds

ORD5ITEM-RECORD-ID
ORD5ITEM-LOT-NBR
ORD5ITEM-SKU-NBR
ORD5ITEM-DISP
ORD5ITEM-ITEM-STATUS
ORD5ITEM-KIT-ID
ORD5ITEM-QUAN
Back to top
View user's profile Send private message
harish_2480

New User


Joined: 07 Jun 2007
Posts: 23
Location: USA

PostPosted: Thu Aug 05, 2010 5:42 am
Reply with quote

Hi,

This is the COBOL structure for the above fields:

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.

Please let me know if require more information.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts Converting S9(18) value to a decimal ... DFSORT/ICETOOL 6
Search our Forums:

Back to Top