Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!caen!uwm.edu!src.honeywell.com!cim-vax.honeywell.com!tdoyle From: tdoyle@cim-vax.honeywell.com Newsgroups: comp.databases Subject: Re: Variables in 4gl Message-ID: <1991Apr1.103455.55@cim-vax.honeywell.com> Date: 1 Apr 91 16:34:55 GMT References: <13799@pbhya.PacBell.COM> Followup-To: comp.databases Distribution: ca,world Organization: Honeywell CIS Lines: 22 In article <13799@pbhya.PacBell.COM>, mspayer@PacBell.COM (Mike Payer) writes: > I am looking for a little bit of help with the small 4gl report below. > This report as written works very well an did exactly what we wanted > it to so at the time. OK so now the problem is that our database has > gotten so large that we want to be able to limit the output by npa. What I > am asking is how do you go about get a prompt in this report that will set > a variable for npa.. > This is obviously Informix-4GL. There are two ways to do this (I prefer the first one). 1. Use the argument supplied to this report (after testing arg_cnt) as the NPA. Set variable value. Use the variable name in the DEFINE CURSOR command. Get the nps value in a shell script that call the 4GL with the arguments. 2. Use PROMPT command to obtain the value of the variable var_npa. This should be done BEFORE the cursor is opened. Bipin Prasad (bprasad@honcim1.honeywell.com)