Save 
Join IIUG
 for   
 

Informix News
13 Jan 12 - MC Press online - Informix Dynamic Server Entices New Users with Free Production Edition ... Read
11 Jan 12 - Computerworld - Ecologic Analytics and Landis+Gyr -- Suitors Decide to Tie the Knot... Read
9 Jan 12 - planetIDS.com - DNS impact on Informix / Impacto do DNS no Informix... Read
8 Sep 11 - TMCnet.com - IBM Offers Database Solution to Enable Smart Meter Data Capture... Read
1 Aug 11 - IBM Data Management Magazine - IIUG user view: Happy 10th anniversary to IBM and Informix... Read
8 Jul 11 - Database Trends and Applications - Managing Time Series Data with Informix... Read
31 May 11 - Smart Grid - The meter data management pitfall utilities are overlooking... Read
27 May 11 - IBM Data Management Magazine - IIUG user view: Big data, big time ( Series data, warehouse acceleration, and 4GLs )... Read
16 May 11 - Business Wire - HiT Software Announces DBMoto for Enterprise Integration, Adds Informix. Log-based Change Data Capture... Read
21 Mar 11 - Yahoo! Finance - IBM and Cable&Wireless Worldwide Announce UK Smart Energy Cloud... Read
14 Mar 11 - MarketWatch - Fuzzy Logix and IBM Unveil In-Database Analytics for IBM Informix... Read
11 Mar 11 - InvestorPlace - It's Time to Give IBM Props: How many tech stocks are up 53% since the dot-com boom?... Read
9 Mar 11 - DBTA - Database Administration and the Goal of Diminishing Downtime... Read
2 Feb 11 - DBTAs - Informix 11.7 Flexible Grid Provides a Different Way of Looking at Database Servers... Read
27 Jan 11 - exactsolutions - Exact to Add Informix Support to Database Replay, SQL Monitoring Solutions... Read
25 Jan 11 - PR Newswire - Bank of China in the UK Works With IBM to Become a Smarter, Greener Bank... Read
12 Oct 10 - Database Trends and Applications - Informix 11.7: The Beginning of the Next Decade of IBM Informix... Read
20 Sep 10 - planetIDS.com - ITG analyst paper: Cost/Benefit case for IBM Informix as compared to Microsoft SQL Server... Read
20 Jul 10 - IBM Announcements - IBM Informix Choice Edition V11.50 helps deploy low-cost scalable and reliable solutions for Apple Macintosh and Microsoft Windows... Read
20 Jul 10 - IBM Announcements - Software withdrawal: Elite Support for Informix Ultimate-C Edition... Read
24 May 10 - eWeek Europe - IBM Supplies Database Tech For EU Smart Grid... Read
23 May 10 - SiliconIndia - IBM's smart metering system allows wise use of energy... Read
21 May 10 - CNET - IBM to help people monitor energy use... Read
20 May 10 - ebiz - IBM Teams With Hildebrand To Bring Smart Metering To Homes Across Britain... Read
19 May 10 - The New Blog Times - Misurare il consumo energetico: DEHEMS è pronto... Read
19 May 10 - ZDNet - IBM software in your home? Pact enables five-city smart meter pilot in Europe... Read
17 March 10 - ZDNet (blog) David Morgenstern - TCO: New research finds Macs in the enterprise easier, cheaper to manage than... Read
17 March 2010 - Virtualization Review - ...key components of Big Blue's platform to the commercial cloud such as its WebSphere suite of application ser vers and its DB2 and Informix databases... Read
10 February 2010 - The Wall Street Journal - International Business Machines is expanding an initiative to win over students and professors on its products. How do they lure the college crowd?... Read


End of Support Dates

IIUG on Facebook IIUG on Twitter


[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Classics Forum

Cant Debug .ec code

Posted By: FELIX MWANGO MUTALE
Date: Friday, 14 December 2007, at 10:03 a.m.

Hello All,

Could any one with .ec or .c experience help me what the following codes mean ?
I need to understand why my i4gl programs are crushing>

#include <sqlfm.h>
_FORM *_FMi_userable;
_EFwindow *_Wwin_userable;

#include <decimal.h>
#include <locator.h>
#include <datetime.h>
#include <stdio.h>
#include <stdlib.h>
#include <fglrep.h>
#define I4GL_SQLCA /* I4GLC1 */
$extern struct
{

int4 sqlcode;

char sqlerrm[72];

char sqlerrp[8];

int4 sqlerrd[6];

char sqlawarn[8];
} sqlca;
$extern int4 status;
extern mint ibm_efm_statusCode;
extern mint ibm_lib4gl_expressionCode;
extern int2 ibm_lib4gl_anyError;
$extern int4 int_flag;
$extern int4 quit_flag;
static char fgl_modname[] = "/srs-prps/ppsys/phaseI/src/CeaseUser.4gl";
$extern char g_runyear[5];
$extern short g_runmonth;
$extern char g_runind[2];
$extern short g_payrollmonth;
$extern short payrollmonth;
$extern char g_yearmonth[7];
$extern date g_paydate;
$extern short g_taxmonth;
$extern short g_run_number;
$extern decimal(20,2) g_taxcredit;
$extern decimal(20,2) g_taxcredit_tm;
$extern decimal(20,2) g_taxcredit_ytd;
$extern char g_prevtaxyear[5];
$extern char g_prevtaxyr_end[11];
$extern short g_staff_count;
$extern short g_negpay_count;
$extern datetime year to second g_lastlog_time;
$extern short g_neg_pays;
$extern decimal(25,2) g_payroll_cost;
$extern decimal(20,3) g_commission;
$extern char g_longrunmth[10];
$extern char g_shortrunmth[4];
$extern struct
{

short band;

decimal(20,2) width;

decimal(12,2) rate;
} ga_taxbands[4];
$extern char g_manno[7];
$extern decimal(20,2) g_min_levy_salary;
$extern decimal(20,2) g_max_levy;
$extern decimal(20,2) g_max_znpf;
$extern datetime year to second g_recent_log;
$extern int4 g_chequeno;
$extern short g_levymonth1;
$extern short g_levymonth2;
$extern char g_salarycode[4];
$extern char g_c2000bal[2];
$extern short getinput;
$extern char question[81];
$extern char answer[2];
$extern short invalidresponse;
$extern short stringsearch;
$extern short foundind;
$extern short w_matches;
$extern short w_valid;
$extern char partentry[81];
$extern char h1line[133];
$extern char h2line[133];
$extern char h3line[133];
$extern char h4line[133];
$extern char h5line[133];
$extern char h6line[133];
$extern char h7line[133];
$extern char selecttext[1201];
$extern char w_reportname[21];
$extern char printer[11];
$extern char cmdline[81];
$extern short copies;
$extern short getprinter;
$extern char esc[2];

enabledisableuser(fgl_pcnt)
int fgl_pcnt;

$char w_userid[16];
$char w_username[31];
$short w_valid;
$char w_endisable[2];
ibm_lib4gl_anyError = 0;
ibm_lib4gl_recordTssAndHwmState((char *)0);
ibm_lib4gl_recordDynArrStack();
if (fgl_pcnt != 0) ibm_lib4gl_fglFatalError(fgl_modname, 9, -1318);

{
ibm_efm_openWindow(&_Wwin_userable, (char*)0, 5, 2, 19, 77, 1, -1, -1, -1, -1, -1,0);
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 11, status);
}
}

/*
* $ open form i_userable from "/srs-prps/ppsys/phaseI/forms/i_userable";
*/
{
ibm_efm_openForm(&_FMi_userable, "/srs-prps/ppsys/phaseI/forms/i_userable");
}
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 12, status);
}

/*
* $ display form i_userable;
*/
{
ibm_efm_displayForm(_FMi_userable, (mlong)-1);
}
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 14, status);
}

/*
* $ input $w_userid , $w_endisable without defaults from userid , endisable;
*/
{
_EFICB _sqicb;
_EFFIELD _sqfldlst[3];
struct sqlvar_struct _sqobind[3];

_sqfldlst[0]._EFfldname = ".userid";

_sqfldlst[0]._EFfldsub = 0;

_sqfldlst[1]._EFfldname = ".endisable";

_sqfldlst[1]._EFfldsub = 0;

byfill(&_sqfldlst[2], sizeof(_EFFIELD), 0);

byfill(&_sqobind[0], sizeof(struct sqlvar_struct), 0);

_sqobind[0].sqltype = 100;

_sqobind[0].sqllen = sizeof(w_userid);

byfill(&_sqobind[1], sizeof(struct sqlvar_struct), 0);

_sqobind[1].sqltype = 100;

_sqobind[1].sqllen = sizeof(w_endisable);

byfill(&_sqobind[2], sizeof(struct sqlvar_struct), 0);
_sqobind[0].sqldata =(w_userid);
_sqobind[1].sqldata =(w_endisable);
byfill(&_sqicb, sizeof(_EFICB), 0);
_sqicb._EFflags = ICB_INIT;
_sqicb._EFaction = 0;
_sqicb._EFoattr = -1;
_sqicb._EFiattr = -1;
_sqicb._EFextattr = 0;
_sqicb._EFbatab = NULL;
_sqicb._EFmaxcount = 0;
for (;;)
{
switch (_sqicb._EFaction)
{
case -2: /* error */
if (1) goto _ef1exit;
default:

/*
* $ after field userid;
*/
break;
case 1:
ibm_lib4gl_anyError = 0;
ibm_lib4gl_pushQuotedStr(w_userid,15);
ibm_lib4gl_pushQuotedStr( " " , 1);
ibm_lib4gl_doOperNotEqualto();

{

/*
* $ close form i_userable;
*/
{
ibm_efm_closeForm(&_FMi_userable);
}
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 83, status);
}
ibm_efm_closeWindow(&_Wwin_userable);
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 84, status);
}
ibm_lib4gl_pushInt2(w_valid);

CeaseUser.c

#define SQLCA_INCL /* I4GLC4 */
#include <sqlhdr.h>
#include <sqliapi.h>
#line 1 "CeaseUser.ec"
#include <sqlfm.h>
_FORM *_FMi_userable;
_EFwindow *_Wwin_userable;

#include <decimal.h>
#include <locator.h>
#include <datetime.h>
#include <stdio.h>
#include <stdlib.h>
#include <fglrep.h>
#define I4GL_SQLCA /* I4GLC1 */
/*
* $extern struct
* {
* int4 sqlcode;
* char sqlerrm[72];
* char sqlerrp[8];
* int4 sqlerrd[6];
* char sqlawarn[8];
* } sqlca;
*/
#line 12 "CeaseUser.ec"
#line 12 "CeaseUser.ec"
extern struct
{

int4 sqlcode;

char sqlerrm[72];

char sqlerrp[8];

int4 sqlerrd[6];

char sqlawarn[8];
} sqlca;
/*
* $extern int4 status;
*/
#line 20 "CeaseUser.ec"
#line 20 "CeaseUser.ec"
extern int4 status;
extern mint ibm_efm_statusCode;
extern mint ibm_lib4gl_expressionCode;
extern int2 ibm_lib4gl_anyError;
/*
* $extern int4 int_flag;
*/

{
ibm_efm_openWindow(&_Wwin_userable, (char*)0, 5, 2, 19, 77, 1, -1, -1, -1, -1, -1,0);
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 11, status);
}
}

/*
* $ open form i_userable from "/srs-prps/ppsys/phaseI/forms/i_userable";
*/
{
ibm_efm_openForm(&_FMi_userable, "/srs-prps/ppsys/phaseI/forms/i_userable");
}
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 12, status);
}

/*
* $ display form i_userable;
*/
{
ibm_efm_displayForm(_FMi_userable, (mlong)-1);
}
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 14, status);
}

/*
* $ input $w_userid , $w_endisable without defaults from userid , endisable;
*/
{
_EFICB _sqicb;
_EFFIELD _sqfldlst[3];
struct sqlvar_struct _sqobind[3];

_sqfldlst[0]._EFfldname = ".userid";

_sqfldlst[0]._EFfldsub = 0;

_sqfldlst[1]._EFfldname = ".endisable";

_sqfldlst[1]._EFfldsub = 0;

byfill(&_sqfldlst[2], sizeof(_EFFIELD), 0);

byfill(&_sqobind[0], sizeof(struct sqlvar_struct), 0);

_sqobind[0].sqltype = 100;

_sqobind[0].sqllen = sizeof(w_userid);

byfill(&_sqobind[1], sizeof(struct sqlvar_struct), 0);

_sqobind[1].sqltype = 100;

_sqobind[1].sqllen = sizeof(w_endisable);

byfill(&_sqobind[2], sizeof(struct sqlvar_struct), 0);
_sqobind[0].sqldata =(w_userid);
_sqobind[1].sqldata =(w_endisable);
byfill(&_sqicb, sizeof(_EFICB), 0);
_sqicb._EFflags = ICB_INIT;
_sqicb._EFaction = 0;
_sqicb._EFoattr = -1;
_sqicb._EFiattr = -1;
_sqicb._EFextattr = 0;
_sqicb._EFbatab = NULL;
_sqicb._EFmaxcount = 0;
for (;;)
{
switch (_sqicb._EFaction)
{
case -2: /* error */
if (1) goto _ef1exit;
default:

/*
* $ after field userid;
*/
break;
case 1:
ibm_lib4gl_anyError = 0;
ibm_lib4gl_pushQuotedStr(w_userid,15);
ibm_lib4gl_pushQuotedStr( " " , 1);
ibm_lib4gl_doOperNotEqualto();

{
int fgl_if1;
ibm_lib4gl_popBoolean(&fgl_if1);
ibm_lib4gl_relUnwantedTssEntries();
if (fgl_if1)
{
{

;

{
int fgl_if1;
ibm_lib4gl_popBoolean(&fgl_if1);
ibm_lib4gl_relUnwantedTssEntries();
if (fgl_if1)
{

/*
* $ prompt $w_userid , "Does not access the PPS System - Press Return "
*/
{
_EFICB _sqicb;
struct sqlvar_struct _sqobind[2];
struct sqlvar_struct _sqibind[3];

byfill(&_sqobind[0], sizeof(struct sqlvar_struct), 0);

_sqobind[0].sqltype = 100;

_sqobind[0].sqllen = sizeof(answer);

byfill(&_sqobind[1], sizeof(struct sqlvar_struct), 0);

byfill(&_sqibind[0], sizeof(struct sqlvar_struct), 0);

_sqibind[0].sqltype = 100;

_sqibind[0].sqllen = sizeof(w_userid);

byfill(&_sqibind[1], sizeof(struct sqlvar_struct), 0);

_sqibind[1].sqltype = 109;

_sqibind[1].sqllen = 0;

byfill(&_sqibind[2], sizeof(struct sqlvar_struct), 0);
_sqobind[0].sqldata =(answer);
_sqibind[0].sqldata =(w_userid);
_sqibind[1].sqldata =("Does not access the PPS System - Press Return ");
byfill(&_sqicb, sizeof(_EFICB), 0);
_sqicb._EFflags |= ICB_FORCHAR;
_sqicb._EFaction = 0;
_sqicb._EFoattr = 196608;
_sqicb._EFiattr = -1;
_sqicb._EFextattr = 0;
_sqicb._EFbatab = NULL;
_sqicb._EFmaxcount = 0;
for (;;)
{
switch (_sqicb._EFaction)
{
case -2: /* error */
if (1) goto _ef2exit;
default:

/*
* $ end prompt;
*/
break;
case -1:
if (1) goto _ef2exit;
}
{
ibm_efm_promptC(2, _sqibind, 1, _sqobind, &_sqicb);
}}}
_ef2exit:;
;

/*
* $ next field endisable;
*/

{
_sqicb._EFnext = ".endisable";
if (1) goto _ef1continue;
}
}
}
ibm_lib4gl_anyError = 0;
}
else
{
ibm_lib4gl_anyError = 0;

/*
* $ prompt "Please Enter Userid - Press Return" attribute ( bold ) for
*/
{
_EFICB _sqicb;
struct sqlvar_struct _sqobind[2];
struct sqlvar_struct _sqibind[2];

byfill(&_sqobind[0], sizeof(struct sqlvar_struct), 0);

_sqobind[0].sqltype = 100;

_sqobind[0].sqllen = sizeof(answer);

byfill(&_sqobind[1], sizeof(struct sqlvar_struct), 0);

byfill(&_sqibind[0], sizeof(struct sqlvar_struct), 0);

_sqibind[0].sqltype = 109;

_sqibind[0].sqllen = 0;

byfill(&_sqibind[1], sizeof(struct sqlvar_struct), 0);
_sqobind[0].sqldata =(answer);
_sqibind[0].sqldata =("Please Enter Userid - Press Return");
byfill(&_sqicb, sizeof(_EFICB), 0);
_sqicb._EFaction = 0;
_sqicb._EFoattr = 196608;
_sqicb._EFiattr = -1;
_sqicb._EFextattr = 0;
_sqicb._EFbatab = NULL;
_sqicb._EFmaxcount = 0;
for (;;)
{

ibm_lib4gl_anyError = 0;

/*
* $ close form i_userable;
*/
{
ibm_efm_closeForm(&_FMi_userable);
}
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 83, status);
}
ibm_efm_closeWindow(&_Wwin_userable);
status = ibm_efm_statusCode;
if (status < 0)
{
ibm_lib4gl_fglFatalError(fgl_modname, 84, status);
}
ibm_lib4gl_pushInt2(w_valid);

{
int fgl_if1;
ibm_lib4gl_popBoolean(&fgl_if1);
ibm_lib4gl_relUnwantedTssEntries();
if (fgl_if1)
{
ibm_lib4gl_pushQuotedStr(w_endisable,1);
ibm_lib4gl_pushQuotedStr( "E" , 1);
ibm_lib4gl_doOperEqualto();

{
int fgl_if1;
ibm_lib4gl_popBoolean(&fgl_if1);
ibm_lib4gl_relUnwantedTssEntries();
if (fgl_if1)
{
/*
* $ update userrec set accountstate = "Y" where userid = $w_userid;
*/
#line 906 "CeaseUser.ec"
{
#line 906 "CeaseUser.ec"
static const char *sqlcmdtxt[] =
#line 906 "CeaseUser.ec"

{
#line 906 "CeaseUser.ec"

" update userrec set accountstate = \"Y\" where userid = ?",

0

};
#line 906 "CeaseUser.ec"
static ifx_statement_t _SQ0 = {0};
static ifx_sqlvar_t _sqibind[] =

{

{ 100, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
#

I would quite grateful if some one can interpret it for me.

Thanking you in advance

Bye

Felix Mwango Mutale

University of Zambia

Messages In This Thread

  • Cant Debug .ec code
    FELIX MWANGO MUTALE -- Friday, 14 December 2007, at 10:03 a.m.

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Classics Forum is maintained by Administrator with WebBBS 5.12.