Home > Archive > Cobol > July 2007 > MF COBOL/DB2 Error
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
MF COBOL/DB2 Error
|
|
| Steve Rainbird 2007-07-20, 7:55 am |
| I am trying to compile a cobol program using the DB2 extensions to MF cobol.
I am getting the following error.
Micro Focus Server Express V4.0 revision 000 20-Jul-07 11:32 Page
1
* casc_source_dates_to_iconmetro.cbl
* Options: int("casc_source_dates_to_iconmetro.int") anim csi verbose
* reentrant nolist DB2(BIND DB=PEACH validate=bind multi-nested)
endp
* list(casc_source_dates_to_iconmetro.lst)
1 IDENTIFICATION DIVISION. Dts
ICMP
* 801-S (
0)
** External Compiler Module message
** DB0121 Package name is too long, max=8 chars, use ACCESS directive to
** fix.
I have no idea what it is talking about.
Any ideas??
TIA
--
Steve
| |
| Simon Tobias 2007-07-20, 7:55 am |
| Hello Steve,
( It's probably best to post such questions to the Micro Focus Forum under
http://www.cobolportal.com ).
The default package name is derived from the program name. Your program name
(casc_source_dates_to_iconmetro) exceeds the maximum package name size supported
of 8 characters. You will need to compile your application with the DB2(ACCESS=shorter_name)
directive, where "shorter_name" is 8 characters or less.
If you try to precompile your app, casc_source_dates_to_iconmetro.sqb, using
the IBM-provided embprep script (which invokes DB2 prep...), and then query
the list of packages on the database, you will see that it the name has been
truncated to CASC_SOU.
Regards,
Simon.
> I am trying to compile a cobol program using the DB2 extensions to MF
> cobol.
>
> I am getting the following error.
>
> Micro Focus Server Express V4.0 revision 000 20-Jul-07 11:32
> Page
> 1
> * casc_source_dates_to_iconmetro.cbl
> * Options: int("casc_source_dates_to_iconmetro.int") anim csi verbose
> * reentrant nolist DB2(BIND DB=PEACH validate=bind
> multi-nested)
> endp
> * list(casc_source_dates_to_iconmetro.lst)
> 1 IDENTIFICATION DIVISION.
> Dts
> ICMP
> * 801-S
> (
> 0)
> ** External Compiler Module message
> ** DB0121 Package name is too long, max=8 chars, use ACCESS
> directive to
> ** fix.
> I have no idea what it is talking about.
>
> Any ideas??
>
> TIA
>
| |
| Steve Rainbird 2007-07-20, 7:55 am |
| "Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
news:dab96b19e4f98c998e3ef91a2c4@news.altohiway.com...
> Hello Steve,
>
> ( It's probably best to post such questions to the Micro Focus Forum under
> http://www.cobolportal.com ).
>
> The default package name is derived from the program name. Your program
> name (casc_source_dates_to_iconmetro) exceeds the maximum package name
> size supported of 8 characters. You will need to compile your application
> with the DB2(ACCESS=shorter_name) directive, where "shorter_name" is 8
> characters or less.
>
> If you try to precompile your app, casc_source_dates_to_iconmetro.sqb,
> using the IBM-provided embprep script (which invokes DB2 prep...), and
> then query the list of packages on the database, you will see that it the
> name has been truncated to CASC_SOU.
>
> Regards,
> Simon.
>
>
>
Thanks Simon.
--
Steve
| |
| Steve Rainbird 2007-07-20, 7:55 am |
| "Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
news:dab96b19e4f98c998e3ef91a2c4@news.altohiway.com...
> Hello Steve,
>
> ( It's probably best to post such questions to the Micro Focus Forum under
> http://www.cobolportal.com ).
>
> The default package name is derived from the program name. Your program
> name (casc_source_dates_to_iconmetro) exceeds the maximum package name
> size supported of 8 characters. You will need to compile your application
> with the DB2(ACCESS=shorter_name) directive, where "shorter_name" is 8
> characters or less.
>
> If you try to precompile your app, casc_source_dates_to_iconmetro.sqb,
> using the IBM-provided embprep script (which invokes DB2 prep...), and
> then query the list of packages on the database, you will see that it the
> name has been truncated to CASC_SOU.
>
> Regards,
> Simon.
>
>
>
Simon,
Does it matter what I call it?
What is it used for?
If I am doing my compiling in a script can I always have it as
ACCESS==xxxxx?
TIA
--
Steve
| |
| Simon Tobias 2007-07-20, 6:55 pm |
| Hello Steve,
> Simon,
>
> Does it matter what I call it?
As long as it doesn't clash with existing packages in the DB2 database being
used, then no.
>
> What is it used for?
Quoted from DB2 Information Center:
Application, Bind File, and Package Relationships
A package is an object stored in the database that includes information needed
to execute specific SQL statements in a single source file. A database application
uses one package for every precompiled source file used to build the application.
Each package is a separate entity, and has no relationship to any other packages
used by the same or other applications. Packages are created by running the
precompiler against a source file with binding enabled, or by running the
binder at a later time with one or more bind files.
Database applications use packages for some of the same reasons that applications
are compiled: improved performance and compactness. By precompiling an SQL
statement, the statement is compiled into the package when the application
is built, instead of at run time. Each statement is parsed, and a more efficiently
interpreted operand string is stored in the package. At run time, the code
generated by the precompiler calls run-time services database manager APIs
with any variable information required for input or output data, and the
information stored in the package is executed.
>
> If I am doing my compiling in a script can I always have it as
> ACCESS==xxxxx?
Yup, that should work just fine.
>
> TIA
>
| |
| Steve Rainbird 2007-07-20, 6:55 pm |
| "Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
news:dab96b19e5068c998f559392b96@news.altohiway.com...
> Hello Steve,
>
> As long as it doesn't clash with existing packages in the DB2 database
> being used, then no.
>
>
> Quoted from DB2 Information Center:
>
> Application, Bind File, and Package Relationships
>
> A package is an object stored in the database that includes information
> needed to execute specific SQL statements in a single source file. A
> database application uses one package for every precompiled source file
> used to build the application. Each package is a separate entity, and has
> no relationship to any other packages used by the same or other
> applications. Packages are created by running the precompiler against a
> source file with binding enabled, or by running the binder at a later time
> with one or more bind files.
>
> Database applications use packages for some of the same reasons that
> applications are compiled: improved performance and compactness. By
> precompiling an SQL statement, the statement is compiled into the package
> when the application is built, instead of at run time. Each statement is
> parsed, and a more efficiently interpreted operand string is stored in the
> package. At run time, the code generated by the precompiler calls run-time
> services database manager APIs with any variable information required for
> input or output data, and the information stored in the package is
> executed.
>
> Yup, that should work just fine.
>
>
>
Cheers you have been a great help.
--
Steve
|
|
|
|
|