ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error while using Cobol copy book in message set

Post new topic  Reply to topic
 Error while using Cobol copy book in message set « View previous topic :: View next topic » 
Author Message
pkhajurgi123
PostPosted: Mon Jun 30, 2008 5:35 am    Post subject: Error while using Cobol copy book in message set Reply with quote

Newbie

Joined: 04 Jun 2008
Posts: 5

I am using following cobol copy book in MS :
01 TS-Q-AREA.
10 Q-NAME.
15 Q-TERM-ID PIC X(04).
15 FILLER PIC X(04) VALUE 'IPO1'.
10 Q-DATA.
15 Q-PO-RCVR-TRACK.
20 Q-PO-NO PIC X(16).
20 Q-PO-LINE-NO PIC X(04).
20 Q-RCPT-CTR PIC X(02).
20 Q-BUY CREATE-DTE PIC X(04).
20 Q-DOCUMENT-NO PIC X(10).
20 Q-RCPT-DTE PIC X(04).
20 Q-RCPT-ITEM-NO PIC X(02).
20 Q-RCPT-QTY PIC X(13).
20 Q-RCPT-RTN-IND PIC X(01).
20 Q-UOM PIC X(04).
10 Q-PO-LINE-ITEM REDEFINES Q-PO-HDR.
15 Q-PO-NO PIC X(16).
15 Q-PO-LINE-NO PIC X(04).
15 Q-MR-REF-NO PIC X(16).
15 Q-MR-LINE-NO PIC X(04).
15 FILLER PIC X(20).
10 MR-HDR REDEFINES Q-PO-LINE-ITEM.
15 Q-DEST-NAME PIC X(40).

When I use it in Message set I get the following error:-
IGYDS1022-E A data-name or file-name definition was found outside of the "DATA DIVISION". Scanning was resumed at the next area "A" item or the start of the next entry.

plz tell how to remove this error..
Back to top
View user's profile Send private message
vsr
PostPosted: Mon Jun 30, 2008 6:12 am    Post subject: Reply with quote

Centurion

Joined: 04 Apr 2006
Posts: 104

It's the alignment problem. If you open the copybook with 'LPEX Editor' it will show any mis-alignment ( you will see red colored one ). You will see Column numbers in the Editor pane. You can not exceed column 7 and should start at column 1 at position A. If any field exceeds it start in next line ending with a '.' (dot).
Back to top
View user's profile Send private message
Bill.Matthews
PostPosted: Mon Jun 30, 2008 7:02 am    Post subject: Reply with quote

Master

Joined: 23 Sep 2003
Posts: 232
Location: IBM (Retired)

If this is the complete copybook, then I see several problems:

1. The line
Quote:
10 Q-PO-LINE-ITEM REDEFINES Q-PO-HDR.
is a redefinition of a field Q-PO-HDR that is not defined in the copybook.

2. Since a Redefine must follow the field definition being redefined, the prior level 10 is Q-DATA - which is also 60 bytes

2. The next Redefine
Quote:
10 MR-HDR REDEFINES Q-PO-LINE-ITEM.
has 40 bytes of date defined, but the Q-PO-LINE-ITEM defines 60 bytes of data.

Thus, I would suggest that you change the first redefine to:
Quote:
10 Q-PO-LINE-ITEM REDEFINES Q-DATA.
and then add a
Quote:
15 FILLER PIC X(20).
following the second redefine.

Finally, do as vsr suggests - the COBOL importer requires that you supply a valid COBOL copybook. Hint: Never use tabs for spacing.
_________________
Bill Matthews
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error while using Cobol copy book in message set
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.