- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cobol variable truncated to 30 characters
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 09:35 PM
тАО02-03-2005 09:35 PM
Cobol variable truncated to 30 characters
We are using a new cobol compiler, but now the names of variables are truncated to 30 characters. So the cobol compiler is giving the following message:
F-VOR-VOORWAARDE-CRITERIUM-COD IN
........^
%COBOL-F-UNDEFSYM, Undefined name
because it has to be F-VOR-VOORWAARDE-CRITERIUM-CODE
Where can we change the lengthvalue of variables?
Wijnand van Riel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 09:51 PM
тАО02-03-2005 09:51 PM
Re: Cobol variable truncated to 30 characters
can you please provide:
Operating System Version
Compiler name and version
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 10:09 PM
тАО02-03-2005 10:09 PM
Re: Cobol variable truncated to 30 characters
for example:
http://docs.hp.com/cgi-bin/doc3k/B3150090013.11820/14
states for HP COBOL II/XL on MPE:
"Each word is limited to a maximum length of 30 characters. Certain types
of words, such as user-defined words, may be restricted to a shorter
length."
More documents halfway down the page at:
http://docs.hp.com/en/dev.html
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 10:58 PM
тАО02-03-2005 10:58 PM
Re: Cobol variable truncated to 30 characters
Our operating system is OpenVMS 7.3
We used Pro*COBOL: Release 1.8.4 with
COBOL V2.5-980. With those compilers we didn't get truncated variables.
Now we are testing Pro*COBOL 9.2.0.5 with COBOL V2.7-1209. Is the length of words changed with the newer version, and what can we do as workaround without changing our sourcecode?
greetings
Wijnand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 11:27 PM
тАО02-03-2005 11:27 PM
Re: Cobol variable truncated to 30 characters
can we establish whether the variable is truncated by the Pro*Cobol pre-compiler?
Have a look for the file after the SQL has been translated. In Pro*C the file extension would change from '.pc' to '.c'.
If the varibale name is complete there we can eliminate the pre-compiler.
Please let us know what you find.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 11:42 PM
тАО02-03-2005 11:42 PM
Re: Cobol variable truncated to 30 characters
Declaring and Referencing Host Variables
Every program variable used in a SQL statement must be declared according to the
rules of the COBOL language. Normal rules of scope apply. COBOL variable names
can be any length, but only the first 30 characters are significant for Pro*COBOL..
Any valid COBOL identifier can be used as host variables, including those beginning with
digits.
The external datatype of a host variable and the internal datatype of its source or
target database column need not be the same, but they must be compatible.
Table 4├в 6, ├в Conversions Between Internal and External Datatypes├в shows the compatible
datatypes between which Oracle8 converts automatically when necessary.
live free or die
harry d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 11:49 PM
тАО02-03-2005 11:49 PM
Re: Cobol variable truncated to 30 characters
In the .PCO we have following:
05 F-VOR-VOORWAARDE-CRITERIUM-CODE
and
MOVE F-VOR-VOORWAARDE-CRITERIUM-CODE(VOR-INDEX)
In the .COB the last statement is generated by the Pro*COBOL compiler (notice the missing -E at COD)
05 F-VOR-VOORWAARDE-CRITERIUM-CODE
MOVE F-VOR-VOORWAARDE-CRITERIUM-CODE(VOR-INDEX)
CALL "SQLADR" USING
F-VOR-VOORWAARDE-CRITERIUM-COD IN
regards,
Wijnand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2005 11:54 PM
тАО02-03-2005 11:54 PM
Re: Cobol variable truncated to 30 characters
If Harry was right I would expect the pre-compiler to leave the statement as is and only use the first 30 chars. This may result in a duplicate varibale declaration if two variables were used with the first 30 characters mathing.
What seems to happen here is that SOME of the variables are truncated,while elsewhere the same variable is left as is.
Any Pro*Cobol gurus present to confirm?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2005 12:00 AM
тАО02-04-2005 12:00 AM
Re: Cobol variable truncated to 30 characters
fyi for those that didn't know that pro*cobol is an oracle precompiler.
Do you have any other variables that start with F-VOR-VOORWAARDE-CRITERIUM-COD ? (note I didn't say F-VOR-VOORWAARDE-CRITERIUM-CODE)
If you do, then you need to make some variable name changes.
If you don't, then I would report this as a BUG to Oracle.
btw, I remember the the 30 character limit from my youthful programming days in the late 70's early 80's.
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2005 12:28 AM
тАО02-04-2005 12:28 AM
Re: Cobol variable truncated to 30 characters
I finally found the pre-compiler doc at
http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96109/toc.htm
and the section to read is:
http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96109/pco02prc.htm#5795
Regards