- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Pro*C - PERCENT_RANK() compilation issue
Operating System - HP-UX
1753666
Members
6216
Online
108799
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-25-2010 01:50 AM
02-25-2010 01:50 AM
Pro*C - PERCENT_RANK() compilation issue
Hello,
I have a pro*C compilation issue, while using PERCENT_RANK() in-built function.
Here are the details :
The Pro*C code :
================================================== ========
int srccct2_insert()
{
EXEC SQL
select * from (
select
trad_code,
comp_code,
file_code,
insp_yymm,
poly_numb,
entr_numb,
data_code,
caus_date,
insd_code,
rule_ordr,
sex_code,
entr_age,
resd_numb,
entr_name,
hire_date,
entr_date,
work_year,
hire_grad,
datt_entr,
ijry_entr,
wkdt_entr,
base_saly,
expt_amnt,
rsrv_rato,
rsrv_amnt,
PERCENT_RANK() OVER (ORDER BY base_saly) pr
FROM SRCCCT2
where trad_code = 'N' AND
comp_code = '01' AND
insp_yymm = '200403' AND
data_code = 'B' AND
hire_grad = '2' AND
base_saly > 0)
where pr > 0.05 and pr < 0.95 and base_saly > 641840;
return SUCCESS;
}
================================================== ======
I am compiling it like this :
/oracle/product/10.2.0/bin/proc iname=srascs01.pc ireclen=320 oreclen=320 sqlcheck=full userid=retr/rteru maxopencursors=32 dbms=v8 char_map=varchar2 release_cursor=yes include=/oracle/product/10.2.0/precomp/public include=/ihome/hp/../common/include include=/ihome/retr/include include=/usr/include include=/ihome/hp/portlib DEFINE=HPUX
I have put the same sql statements in the sql promt and it works fine. But in Pro*C when i compile it using above options, here is the error :
================================================== ======
Pro*C/C++: Release 10.2.0.4.0 - Production on Thu Feb 25 00:57:42 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
System default option values taken from: /oracle/product/10.2.0/precomp/admin/pcscfg.cfg
Syntax error at line 192, column 28, file srascs01.pc:
Error at line 192, column 28 in file srascs01.pc
PERCENT_RANK() OVER (ORDER BY base_saly) pr
...........................1
PCC-S-02201, Encountered the symbol "(" when expecting one of the following:
, into, from,
Error at line 0, column 0 in file srascs01.pc
PCC-F-02102, Fatal error while doing C preprocessing
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
================================================== =======
The Pro*C precompiler might not be recognizing the PERCENT_RANK() function for some reason, so it is expecting "into" "from" for the SELECT statement above.
Please help me in solving this issue.
Thanks a ton in advance.
Thanks,
-Kumar
I have a pro*C compilation issue, while using PERCENT_RANK() in-built function.
Here are the details :
The Pro*C code :
================================================== ========
int srccct2_insert()
{
EXEC SQL
select * from (
select
trad_code,
comp_code,
file_code,
insp_yymm,
poly_numb,
entr_numb,
data_code,
caus_date,
insd_code,
rule_ordr,
sex_code,
entr_age,
resd_numb,
entr_name,
hire_date,
entr_date,
work_year,
hire_grad,
datt_entr,
ijry_entr,
wkdt_entr,
base_saly,
expt_amnt,
rsrv_rato,
rsrv_amnt,
PERCENT_RANK() OVER (ORDER BY base_saly) pr
FROM SRCCCT2
where trad_code = 'N' AND
comp_code = '01' AND
insp_yymm = '200403' AND
data_code = 'B' AND
hire_grad = '2' AND
base_saly > 0)
where pr > 0.05 and pr < 0.95 and base_saly > 641840;
return SUCCESS;
}
================================================== ======
I am compiling it like this :
/oracle/product/10.2.0/bin/proc iname=srascs01.pc ireclen=320 oreclen=320 sqlcheck=full userid=retr/rteru maxopencursors=32 dbms=v8 char_map=varchar2 release_cursor=yes include=/oracle/product/10.2.0/precomp/public include=/ihome/hp/../common/include include=/ihome/retr/include include=/usr/include include=/ihome/hp/portlib DEFINE=HPUX
I have put the same sql statements in the sql promt and it works fine. But in Pro*C when i compile it using above options, here is the error :
================================================== ======
Pro*C/C++: Release 10.2.0.4.0 - Production on Thu Feb 25 00:57:42 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
System default option values taken from: /oracle/product/10.2.0/precomp/admin/pcscfg.cfg
Syntax error at line 192, column 28, file srascs01.pc:
Error at line 192, column 28 in file srascs01.pc
PERCENT_RANK() OVER (ORDER BY base_saly) pr
...........................1
PCC-S-02201, Encountered the symbol "(" when expecting one of the following:
, into, from,
Error at line 0, column 0 in file srascs01.pc
PCC-F-02102, Fatal error while doing C preprocessing
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
================================================== =======
The Pro*C precompiler might not be recognizing the PERCENT_RANK() function for some reason, so it is expecting "into" "from" for the SELECT statement above.
Please help me in solving this issue.
Thanks a ton in advance.
Thanks,
-Kumar
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP