Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!decwrl!pacbell.com!pacbell!pbhya!mspayer From: mspayer@PacBell.COM (Mike Payer) Newsgroups: comp.databases,pb.informix Subject: Variables in 4gl Message-ID: <13799@pbhya.PacBell.COM> Date: 27 Mar 91 18:03:34 GMT Reply-To: mspayer@PacBell.COM (Mike Payer) Followup-To: comp.databases Distribution: ca Organization: Pacific * Bell, San Ramon, CA Lines: 76 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.. Any help would be appreciated. Thank You. ========================================================================== DATABASE cee MAIN DEFINE p_sap RECORD LIKE sap.* DECLARE q_curs CURSOR FOR SELECT npa,nnx,inhour,outhour,misci FROM sap WHERE npa = SOMETHING ORDER BY npa,nnx START REPORT sap_list FOREACH q_curs INTO p_sap.npa, p_sap.nnx, p_sap.inhour, p_sap.outhour, p_sap.misci OUTPUT TO REPORT sap_list (p_sap.npa, p_sap.nnx, p_sap.inhour, p_sap.outhour, p_sap.misci) END FOREACH FINISH REPORT sap_list END MAIN REPORT sap_list (npa, nnx, inhour, outhour, misci) DEFINE npa char(3), nnx char(3), inhour char(12), outhour char(120), misci char(50) OUTPUT LEFT MARGIN 0 FORMAT PAGE HEADER print "NPA/NNX",column 12, "IN HOURS", column 24,"OUT OF HOURS",column 45,"MISCELLANEOUS INFORMATION" print "================================================================================" ON EVERY ROW print npa,"-",nnx, column 10,outhour clipped, 2 spaces, inhour clipped,2spaces,misci page trailer skip 1 line print column 30,pageno using "Page ##" END REPORT ____________________________________________________________ /\ Michael S Payer Jr \ \_| Administrator FAX 415-867-0344 | | Emergency Control Center pacbell!pbecc!msp | | pacbell!pbhya!mspayer | | | | ____________SOMETIMES THE DRAGON WINS__________________|__ \_/_________________________________________________________/