- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: long strings generated by ProC/C++
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
тАО05-15-2003 11:30 AM
тАО05-15-2003 11:30 AM
long strings generated by ProC/C++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2003 12:17 PM
тАО05-15-2003 12:17 PM
Re: long strings generated by ProC/C++
can you please post the exact warning message?
thanks
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2003 03:17 AM
тАО05-16-2003 03:17 AM
Re: long strings generated by ProC/C++
I'm not sure, but I guess you mix several things together. Refreshing my adventures with ProC I'm _guessing_ that:
1. I'm not sure if you don't mix 'preprocessing' with 'precompiling'. I always used 'preprocessing' for C preprocessor and 'precompiling' for ProC.
2. ProC does not produce strings concatenated at runtime, as it would involve dynamic buffer managment, which would be complicated and sensless in this situation, as all queries have to be completely defined in precompilation stage.
3. ProC can divide long strings into several smaller parts, but it does it only for estetical reasons. As between these strings should be no operator it will be concatenated by the C compiler again in _compilation_ stage.
Example:
puts( "This "
"is "
"divided "
"string." );
4. Warning about implicitly depreciation to (char*) comes from the fact, that strings generated by the ProC (and any other such string) is predeclared by the compiler to (const char *) - I guess even to (const char[]). The functions that are used are declared as having (char *) argument and this implicitly omited const gives you the warning.
Hope I helped.
HTH
Good luck.
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2003 07:22 AM
тАО05-16-2003 07:22 AM
Re: long strings generated by ProC/C++
"Warning 829: "BFBPI_Account_Iterator.c", line 800 # Implicit conversion of string literal to 'char *' is deprecated.
"select C.BILL_ITEM_SEQ_ID ,C.SVC_DESC_TX ,C.VPN_ID ,TO_CHAR(C.S"
I am attaching two fragments of code generated by the precompiler (sorry, Adam) from the same ProC/C++ program. The difference in two source codes was only in the number of fields being selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2003 01:37 PM
тАО05-16-2003 01:37 PM
Re: long strings generated by ProC/C++
Warning 829: "small.c", line 25 # Implicit conversion of string literal to
'char *' is deprecated.
portname = "/dev/ttypa";
The problem is with the select(2) statement and the second parameter.
As per the 10.10 Release Notes some of select(2) parameters have been
changed from an "int *" to a "fd_set" which is a struct. You can see the
prototype definition in sys/time.h and view the new man page as in
man 2 select.
The problem comes from the fact that /opt/dce/include/dce/cma_ux.h,
which
is referenced because of the inclusion of pthread.h, still has the "old"
prototype definiton of select(2).
If using libcma.1 and user threads a potential work-around is to use a
cast as in "(int*) fd_set" but this must be done with care.
There is a current bug report filed for this problem. It is:
JAGad24804:
"The definition of cma_select() in cma_ux.h needs to be corrected"
ALT KEYWORDS
cma_select cma_ux.h warning 604: Pointers are not assignment compatable bad argument 2 type for cma_select(): Argument type 'fd_set *' does not match select(2)
--------------------------------------------------------------------------------
You may provide feedback here
To help us improve our content, please provide feedback and any additional comments below. If you have a problem or a question that needs immediate attention, please submit a call or contact your HP Response Center instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 04:08 AM
тАО05-19-2003 04:08 AM
Re: long strings generated by ProC/C++
ad.1.
No problem. I just wanted to be sure what's the problem. C preprocessor can also have its limits.
ad.2.
Looks like it really does things differently, so I was wrong. I've never produced a query longer than 1024 bytes. However in the second case in your attached source I cannot find the definition of the ctx object nor sq0001 - does it contain the full query or only the rest of it?
ad.3.
I was wrong. As can be seen string division is made with usage of backslash.
ad.4.
Looks like I was wrong. The warning comes because usage of new function was introduced. I guess ProC assumes that Literal strings are predeclared as (char*), not (const char*). As there is no casting and as the function seems to be declared with (char*) for the second parameter you receive this warning.
To be sure you could try to look for the declaration of the function (I guess it could be in sqlca.h). Even more - I think you could even modify the declaration of this function from (char* to (const char*) and have no warning any more. Declaring arguments this way is supposed to tell the C compiler that function will not modify the string via this pointer.
Hope it helps.
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 04:11 AM
тАО05-19-2003 04:11 AM
Re: long strings generated by ProC/C++
I meant that ad.4. I was right, of course...
I got used too much to be wrong. :)
As this was your primar question I hope it will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 08:38 AM
тАО05-19-2003 08:38 AM
Re: long strings generated by ProC/C++
static const char *sq0001 and
static const char *sq0002 were generated
I am not sure that my precompiler generates correct code and that it will always give correct results at run time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 09:35 AM
тАО05-19-2003 09:35 AM
Re: long strings generated by ProC/C++
From the practical point of view:
If the query is not rejected it means it is valid and I guess query which ends with 'T.STAT' would be rejected. So I guess if you receive correct result once there should be no reason not receiving it in the future. Other more probabile case would be not receiving any data and having error on executing query.
Another thing, which I must repeat: You did not attach sq0001 in the second case. So what can anyone say without knowing it?
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2003 10:18 AM
тАО05-19-2003 10:18 AM