[Root: [Cheryl Gross: Program names back to calling process while doing a perform screen]]
Posted in 1991
Subject: Program names back to calling process while doing a perform screen
In Response to the message from cbruce@wvus.org
about returning functions names called from 4GL.
I don't know if 4GL screens are like perform screens in 2.10 but here
is how we have done what you are asking in a perform screen.
On each screen I create a 50(?) character display only field.
[mg ]
mg = displayonly type char, queryclear; [inside the .per perform screen]
For any access to the database that creates an error, while in the function
the pf_putval() function is used to pass the errors messages back to the
perform screen.
pf_putval(element, CCHARTYPE, "mg") [inside the .ec function]
This may not work in your version, but it works here.
/* Brings up the next sequential number out of the nbr table
and increments it after this record is written */
valueptr writennbr()
{
$ long wgnnbr;
$ select nxtnbr into $wgnnbr from nbr where recno = "1";
if (sqlca.sqlcode == 0)
{
pf_putval(&wgnnbr, CLONGTYPE, "f000");
$ update qnbr set nxtnbr = nxtnbr + 1 where recno = "1";
}
if (sqlca.sqlcode != 0)
pf_putval("INVALID NEXT NBR", CCHARTYPE, "mg");
}
Cheryl Gross
(903) 334-3518