Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Converting PD to ZDF using OUTREC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Converting PD to ZDF using OUTREC
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us