Author |
Message
|
berguss22 |
Posted: Mon Dec 06, 2004 2:51 am Post subject: Problem importing cobol book |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
I have a very simple copybook
01 StockItem.
03 TranType PIC X(3).
88 TranUpdate VALUE "UPD".
88 TransAdd VALUE "ADD".
88 TransDelete VALUE "DEL".
88 TransRead VALUE "RET".
03 ItemDetails.
05 ItemNo PIC X(10).
05 ItemDescr PIC X(20).
I have defined a messageSet imported the cobol book with extension .cbl in the wizard no source strutures are generated and the definition turns out empty. Any suggestions
Thanx in advance |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 06, 2004 5:44 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What version are you running?
There should be an import log file that will tell you what the problem is. Where it is depends on what version you have.
Look at your Application Log in Event Viewer on your machine to see what it says. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
berguss22 |
Posted: Mon Dec 06, 2004 5:56 am Post subject: |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
i am running 5.0.2
the log produced mentions no errors and says 0 warnings No errors in the event log and no message output either the wizard doesnt obtain any impoorted structures from the copy book. I can import dtd files normally |
|
Back to top |
|
 |
JT |
Posted: Mon Dec 06, 2004 6:19 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
It's hard to tell from your sample, but you must ensure the 01-level element starts in column 8, and all other elements are properly aligned. When using a COBOL copybook to generate a message definition, the elements will not be recognized if you do not have them in the proper columns. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 06, 2004 6:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Look in <wbimb install root>/log for a .log file that has your message set name or your copybook name, I forget which.
It should include a step by step field level import trace that will tell you where it went wrong. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
berguss22 |
Posted: Mon Dec 06, 2004 6:28 am Post subject: |
|
|
Apprentice
Joined: 10 Mar 2004 Posts: 31
|
There is no log file produced in the log directory for my import.
Im new to this cobol import feature so What do u mean exactly that level 01 elements must start at column 8 |
|
Back to top |
|
 |
JT |
Posted: Mon Dec 06, 2004 6:51 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
In a valid Cobol copybook, the "01" is positioned in column 8, with subsequent elements properly aligned. For example:
Code: |
column
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 . . . . .
0 1 S t o c k I t e m
0 3 T r a n T y p e
8 8 T r a n U p
|
Code: |
01 StockItem.
03 TranType PIC X(3).
88 TranUpdate VALUE "UPD".
88 TransAdd VALUE "ADD".
88 TransDelete VALUE "DEL".
88 TransRead VALUE "RET".
03 ItemDetails.
05 ItemNo PIC X(10).
05 ItemDescr PIC X(20). |
|
|
Back to top |
|
 |
shanson |
Posted: Mon Dec 06, 2004 10:31 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Try wrapping the COBOL in the usual form that a .cbl file would contain:
EG:
Code: |
Identification division.
Program-id. valueck.
Data division.
Working-storage section.
1 gval.
2 ihigh-value pic x(10) value high-value.
2 ihigh-values pic x(10) value high-values.
Procedure division.
stop run.
End program valueck. |
|
|
Back to top |
|
 |
chenulu |
Posted: Mon Dec 06, 2004 2:17 pm Post subject: |
|
|
Voyager
Joined: 27 Mar 2002 Posts: 87 Location: Research Triangle Park, NC
|
Hi,
Make sure you check the check box to allow 88 level elements when creating the message definition file.
-- Chenulu |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 10, 2004 6:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I just double-checked my own system, which I should have done a while ago.
The log file from an import is now in <WBIMB_workspace>/<MessageSetProject>/log/, not in <WBIMB_installRoot>/logs.
Sorry.  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|