Author |
Message
|
agrawalamit166 |
Posted: Tue Nov 03, 2015 9:16 am Post subject: DFDL Message Model issue |
|
|
 Voyager
Joined: 17 Aug 2009 Posts: 78 Location: NY, US
|
Hi,
I have COBOL copybook, contains field name as "ID". if I try to generate DFDL message model it shows following error message.
Quote: |
IGYDS0017-E "ID" should begin in area "A". It was processed as if found in area "A".
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.
IGYDS1003-E A "PROGRAM-ID" paragraph was not found. Program-name "CBLNAM02" was assumed.
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.
IGYDS1082-E A period was required. A period was assumed before "PIC".
IGYDS1089-S "PIC" was invalid. Scanning was resumed at the next area "A" item, level-number, or the start of the next clause.
IGYDS1159-E A "PICTURE" clause was not found for elementary item "FILLER". "PICTURE X(1)" was assumed.
IGYDS1102-E Expected "DIVISION", but found "PIC". "DIVISION" was assumed before "PIC".
IGYDS1082-E A period was required. A period was assumed before "ID".
IGYDS1082-E A period was required. A period was assumed before "ID".
|
when I change field name "ID" to any other name ("ID1" or "IB"), it works fine....
so just wanted to check: are there any predefined field names, which are not supported by DFDL message model generation process from COBOL copybook.
I am using IIB 10.0.0.1 |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Nov 03, 2015 9:19 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It's not clear why your copybook has a DATA DIVISION... it should merely have the contents of the data division (well, a single structure from the data division).
The bit about area "A" is likely an indent or space problem. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
agrawalamit166 |
Posted: Tue Nov 03, 2015 9:31 am Post subject: |
|
|
 Voyager
Joined: 17 Aug 2009 Posts: 78 Location: NY, US
|
No, my COBOL copybook does not have DATA DIVISION.
Here is the COBOL copybook structure: (which does not work)
Quote: |
01 Employees.
05 ID PIC X(1).
05 Name PIC X(20).
05 Salary PIC 9(6).99.
|
and if i change ID to any other name, it works well.
below one works well for me.
Quote: |
01 Employees.
05 ID1 PIC X(1).
05 Name PIC X(20).
05 Salary PIC 9(6).99.
|
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Nov 03, 2015 9:37 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
.... hmmm...
Maybe ID is a reserved word somewhere... I wouldn't think so though.
If the copybook only has that one field
Code: |
01 Employees.
05 ID PIC X(1). |
do you have the same issue? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 03, 2015 9:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
agrawalamit166 wrote: |
No, my COBOL copybook does not have DATA DIVISION.
Here is the COBOL copybook structure: (which does not work) |
I would theorize 2 problems:
- the indentation is wrong. The COBOL importer expects the copybook to be in the correct layout, and it looks from how you've posted it that (for example) area A & area B are not being respected.
- the copybook has a .cob extension not a .cpy and so the importer thinks it's a COBOL program with an embedded structure not a copybook. It sees the field called "ID" and goes "ah, this is the start of the program I'm importing. Let's look for the data division and start importing structures!"
If it doesn't see "ID" but "ID1" it shrugs and picks up from the first 01 level it can see.
agrawalamit166 wrote: |
are there any predefined field names, which are not supported by DFDL message model generation process from COBOL copybook |
None that are not predefined names reserved by COBOL itself (like ID). I'm surprised that the COBOL complier didn't complain about that variable name. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
agrawalamit166 |
Posted: Tue Nov 03, 2015 10:48 am Post subject: |
|
|
 Voyager
Joined: 17 Aug 2009 Posts: 78 Location: NY, US
|
mqjeff wrote: |
If the copybook only has that one field
Code: |
01 Employees.
05 ID PIC X(1). |
do you have the same issue? |
Yes, i can see the same issue..
It's because of reserved keyword "ID" as you and Vitor mentioned....
Thanks Vitor, I tried with couple of reserved keywords, but none of them worked. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 03, 2015 11:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
agrawalamit166 wrote: |
Thanks Vitor, I tried with couple of reserved keywords, but none of them worked. |
On the plus side, they wouldn't work in a COBOL program either so the limitation shouldn't be a problem.
It's also the work of moments to rename them. Because COBOL is a positional structure (unlike XML which actually uses the names to navigate) you can easily edit:
Code: |
01 SOMEDATA.
03 ID PIC X(12).
03 COUNT PIC S9(9) COMP-3.
03 OMITTED PIC X.
88 IS-OMITTED VALUE 'Y'.
88 NOT-OMITTED VALUE 'N'.
...
|
into
Code: |
01 SOMEDATA.
03 THIS-IS-THE-ID PIC X(12).
03 COBOL-GUY-IQ-SCORE PIC S9(9) COMP-3.
03 BRAIN-OMITTED PIC X.
88 IS-OMITTED VALUE 'Y'.
88 NOT-OMITTED VALUE 'N'.
...
|
before you import it without loss of function. And the addition of much humor when the design is reviewed.
Or maybe that's just me. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|