🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Mike Payer Wed, 27 Mar 1991 18:03
Variables in 4gl
#1
Author: Mike Payer
Date: Wed, 27 Mar 1991 18:03
77 lines
3176 bytes
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__________________|__
        \_/_________________________________________________________/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads