Loading ...
Sorry, an error occurred while loading the content.

first CGI try

Expand Messages
  • robjok2000
    Hello *all what is wrong ? PGMA is called by the browser (xxx.xxx.xxx.xxx/lib/PGMA) PGMA: ... eval VAR1 = Who are you call PGMB Parm(VAR1) PGMB: write
    Message 1 of 2 , Nov 1, 2002
    • 0 Attachment
      Hello *all
      what is wrong ?

      PGMA is called by the browser (xxx.xxx.xxx.xxx/lib/PGMA)
      PGMA: ...
      eval VAR1 = 'Who are you'
      call PGMB Parm(VAR1)

      PGMB: write HTML-CODE to a string
      write String to the Browser (wrtsection *fini)
      seton LR
      return
      PGMA: wait 30 sec
      seton lr
      return

      if i do that, i have to wait 30 sec until the browser show the HTML-
      CODE.
      normaly, i will read the Browser input string, check the name against
      database and say 'ok' or 'not ok'
      instead of the wait instruction

      how can i do that ?

      thanks
      Robert
    • tomjedrz@yahoo.com
      I ll give this a whirl! Robert -- You are mistaken in your concept of how the web/CGI process works. See the Persistent CGI thread about a week ago for more
      Message 2 of 2 , Nov 1, 2002
      • 0 Attachment
        I'll give this a whirl!

        Robert --

        You are mistaken in your concept of how the web/CGI process works. See
        the "Persistent CGI" thread about a week ago for more about a variation
        of this topic.

        A (vastly) simplified version of the browser/server/CGI flow is below.
        I suggest that you study the demos and DO THE TUTORIAL. Once you do
        the tutorial (and make your own working example) you will get it.

        Demos -- http://www-922.ibm.com/cgidev2o/demos.htm
        Tutorial -- http://www-922.ibm.com/cgiclass2/start

        Back to your problem . . . the HTML code is not returned to the browser
        until PGMA returns. All the wrtsection *fini does is load the closing
        HTML code to the buffer.

        See the "opinion" demo (http://www-922.ibm.com/cgidev2o/opinion.htm)
        for a something very similar.

        Take Care -- Tom J.

        Browser/Server/CGI Flow
        -----------------------
        1> A *.pgm URL is entered in the browser, and the request is passed to
        the web server along with any variables submitted. The browser waits.

        2> The web server parses the variables into a "buffer", and calls the
        program.

        3> The CGI program pulls the variables from the buffer. The function
        zhbgetvar function provided by Mel and Giovanni is one way to do this.

        4> The CGI program loads HTML into another buffer. The wrtsection
        program does this.

        5> When the CGI program ends, the output buffer is passed back to the
        web server, which in turn returns it to the browser.
        -----------------


        --- robjok2000 <robert.jokisch@...> wrote:
        > Hello *all
        > what is wrong ?
        >
        > PGMA is called by the browser (xxx.xxx.xxx.xxx/lib/PGMA)
        > PGMA: ...
        > eval VAR1 = 'Who are you'
        > call PGMB Parm(VAR1)
        >
        > PGMB: write HTML-CODE to a string
        > write String to the Browser (wrtsection *fini)
        > seton LR
        > return
        > PGMA: wait 30 sec
        > seton lr
        > return
        >
        > if i do that, i have to wait 30 sec until the browser show the HTML-
        > CODE.
        > normaly, i will read the Browser input string, check the name against
        > database and say 'ok' or 'not ok'
        > instead of the wait instruction
        >
        > how can i do that ?
        >
        > thanks
        > Robert
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > Easy400Group-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do you Yahoo!?
        HotJobs - Search new jobs daily now
        http://hotjobs.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.