for   
Save 
Save 
   Join IIUG  

Informix News
14 August 08 - IIUG.org - Sellout Expected for the 2009 IIUG Informix Conference... Read
29 April 08 - IntelligentEnterprise.com - IBM Informix Upgrade Enhances Clustering, Database Management... Read
29 April 08 - itweek.com - IBM 'Cheetah 2' mauls data costs... Read
28 April 08 - eWeek.com - IBM Uncages Cheetah 2 Data Server... Read
28 April 08 - CNNMoney.com - IBM Helps Clients Reduce Data Management Costs With New Informix Dynamic Server... Read
09 April 08 - CNNMoney.com - MediaSpan Embeds IBM Informix Dynamic Server Software for Delivering News to Print, Web and Wireless Devices... Read
08 April 08 - IT-Director.com - Informix seeks developers... Read
18 February 08 - marketwire.com - Icarus Studios Partners With IBM to Upgrade Performance, Availability for Its Online Games... Read
17 January 08 - eWeek.com - IBM Adds Mac Support to IDS for Higher Education... Read
17 January 08 - informationweek.com - Lotus Notes For iPhone Signals Closer Ties Between IBM, Apple... Read
16 January 08 - marketwire.com - IBM Informix Dynamic Server to Deliver Support for Mac OS X... Read
16 January 08 - internetnews.com - IBM's IDS to Support Mac Platform... Read
28 June 07 - REG Developer - IBM and Informix tie down Cheetah... Read
27 June 07 - CBRonline.com - IBM corrects its own Informix customer figures... Read
14 June 07 - vnunet.com - IBM changes spots with Informix 'Cheetah' database... Read
14 June 07 - eChannelLine - IBM expands scope for IDS... Read
14 June 07 - Resellernews - IBM: Informix database alive and kicking... Read
13 June 07 - DB2 Magazine - Cheetah is now out of the gate... Read
12 June 07 - IBM - IDS 11 release announcement (pdf)... Read
12 June 07 - ChannelWeb Network - IBM Uncages IDS 11, Aka Cheetah, Database... Read
12 June 07 - eWeek.com - IBM's 'Cheetah' Ready to Pounce... Read
12 June 07 - InformationWeek - IBM Unleashes 'Cheetah' Database... Read
12 June 07 - WebWire - IBM Strengthens Database Portfolio With New Informix Dynamic Server... Read
12 June 07 - Intelligent Enterprise - IBM Unveils Informix Upgrade... Read
12 June 07 - ComputerWeekly.com - IBM's Cheetah IDS makes leap to better data centre clustering... Read
12 June 07 - ebiz - IBM Unveils Next Generation Informix Dynamic Server... Read
12 June 07 - computerworld.com - Will 'Cheetah' help IBM's Informix chase down market share?... Read
12 June 07 - Internetnews.com - No Data Can Outrun This 'Cheetah'... Read
12 June 07 - de.internet.com - IBM neuer Datenbank-Server mit Codenamen Cheetah ist fertig... Read
12 June 07 - verifox.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - golem.de - Informix 11 vorgestellt... Read
12 June 07 - Computerwoche.de - IBM stellt neue Informix-Version vor... Read
12 June 07 - IBM.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - Heise - IBM gibt Informix 11 frei... Read
25 May 07 - Taiwan.CNET.com - Local Taiwan Informix user group established... (Chinese language) ... Read
18 May 07 - ChannelWeb Network - IBM Musters Partners For Cheetah Release... Read
18 May 07 - eWeek.com - IBM Looks to 'Cheetah' to Speed Up Blade Servers... Read
7 May 07 - DB2 Magazine - SQL Shortcuts - Use these tricks to generate IDS SQL scripts... Read

Previous news items
 

Home Member Area About IIUG


Resources
IIUG Insider
IIUG Hotspots
IBM-Informix Links
IIUG RSS Feeds
Software Repository
Informix Products
Online Resources
Informix Library
Informix Books
IIUG Banners
Discussion
Technical Special
  Interest Groups

Other Discussion
Community
Events
Webcasts/Chat w Lab
IIUG TV
IIUG Sponsors
Informix Business Directory
IIUG Press Partners
Local User Groups
Job Board
Fun Stuff

[ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Informix Forum - Read-only Archive

Re: Help: Calling 4GL from C code

Posted By: Jonathan Leffler
Date: Thursday, 6 April 2006, at 12:27 a.m.

On 4/4/06, informix-forum@iiug.org <informix-forum@iiug.org> wrote:
> #105: Help: Calling 4GL from c code (THANARAJ KA....)

> MESSAGE: (#105) Help: Calling 4GL from c code
> <http://www.iiug.org/forums/informix-forum/index.cgi?rev=105>
> AUTHOR: THANARAJ KA....
> DATE: Tuesday, 4 April 2006, at 7:29 a.m.
>
> i get segmentation fault while using poping character string from argument
> stack, i know this is with pointer conversion type
>
> i dont know where exactly is the problem
> ------------------------------------------------------------------
> well i am working on Redhat Linux platform
>
> **************************C code ***************************************
>
> #include<fglapi.h>
> #include<fglsys.h>
> #include<stdio.h>
> #include<varchar.h>
>
> main()
> {
> long cust_id,cust_age,cust_result;
>
> char cust_name[30];
>
> printf("Enter customer ID:");
>
> scanf("%ld",&cust_id);
>
> printf("Enter customer Name:");
>
> scanf("%s", cust_name);
>
> printf("Enter customer Age:");
>
> scanf("%ld",&cust_age);
>
> pushlong(cust_id);
>
> ////////////////////////////////////////////Error happens when i pop
>
> pushvchar( cust_name , len);
>
> /////////////////////////////////////////////
>
> pushlong( cust_age );
>
> fgl_call(customer_insert,3);
>
> poplong(&cust_result);
>
> if(cust_result == 1)
>
> printf("Insertion into customer table successful");
>
> else
>
> printf("Insertion into customer table failed");
>
> break;

Syntax error - not in a loop or switch.

> default:

Probably not a syntax error - C is a funny language.

> exit();

Exit expects a value - you should provided it with a small integer
(conventionally zero for success and non-zero for failure).
> }
>
> }

Syntax error - not in a function (any more).

> fgl_end();
> }

More syntax errors - if you strip code before posting, please do it
more carefully, leaving syntactically valid code.

Q: You included fgl_end(), but why not the initialization code -
fgl_start() IIRC?

>********************************* 4GL *********************************
>
>FUNCTION customer_insert(id,age,name)
>
>DEFINE id,result,age INTEGER,
>
>name CHAR(40)

Q: You pushed the values on the stack in order - don't you have to pop
them off in the reverse order? That's my recollection, though I'm
rusty enough that I could be misremembering.

--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/

[ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Informix Forum - Read-only Archive is maintained by Administrator with WebBBS 5.12.

©2001 - 2007 International Informix Users Group.   All rights reserved.     Terms of use    
*** Powered By IBM Informix Dynamic Server V10.00 ***