Display File For a Limited Time Period - IBM AS400

This is a discussion on Display File For a Limited Time Period - IBM AS400 ; I want to display a window record format of a display file for some specified time period on the screen and after that the screen should go off and the next screen should come. So i don't know how to ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Display File For a Limited Time Period

  1. Display File For a Limited Time Period

    I want to display a window record format of a display file for some
    specified time period on the screen and after that the screen should go
    off and the next screen should come. So i don't know how to achieve
    this.
    eg - I am calling a cobol program and in this i'm calling a display
    file which should display
    "Processing.........." for some time and after that that screen should
    go without pressing any key. then the next screen should come in which
    i have the reports.

    how to do this?


  2. Re: Display File For a Limited Time Period


    Arka wrote:

    > I want to display a window record format of a display file for some
    > specified time period on the screen and after that the screen should go
    > off and the next screen should come. So i don't know how to achieve
    > this.
    > eg - I am calling a cobol program and in this i'm calling a display
    > file which should display
    > "Processing.........." for some time and after that that screen should
    > go without pressing any key. then the next screen should come in which
    > i have the reports.
    >
    > how to do this?

    It seems a bit of an odd thing to do but if you want the screen to
    timeout if a user has not entered anything then you will need:Invite in
    your dspf & a setting for waitrcd and in RPG maxdev & read/write with
    error checking not exfmt. Not sure what the equivalents are for these
    in cobol.
    Search Google for more details.
    However if you want simply to display a message for a short time you
    can use frcdta with an indicator to force the display out when you
    write then call qcmdexc with the command dlyjob to wait for a bit then
    just continue processing as normal.

    HTH
    Jonathan.


  3. Re: Display File For a Limited Time Period

    There are a number of ways to go about this. Is the program that
    displays "Processing" the same program that creates the reports?

    If you have 2 programs:

    If you have no user input (not even a Quit / Exit option) on the
    "Processing" screen, a simple DLYJOB should do the trick.
    If you have user input then you will need do something similar to the
    technique outlined in
    http://groups.google.com/group/comp....9a3386b228d381

    If you have 1 program:

    If you have no user input (not even a Quit / Exit option) on the
    "Processing" screen, simply displaying the screen, creating the
    reports, then displaying the reports should do the trick.
    If you have user input then the simplest thing might be to split this
    into 2 programs.


  4. Re: Display File For a Limited Time Period


    Arka wrote:
    > I want to display a window record format of a display file for some
    > specified time period on the screen and after that the screen should go
    > off and the next screen should come. So i don't know how to achieve
    > this.
    > eg - I am calling a cobol program and in this i'm calling a display
    > file which should display
    > "Processing.........." for some time and after that that screen should
    > go without pressing any key. then the next screen should come in which
    > i have the reports.
    >
    > how to do this?


    you can write to the display file with dfrwrt(*no). This will put the
    screen immediately to terminal. Your code could then come along in
    another minutes time and write another screen. It is only once you do
    a read for keyboard input that the program will block until the user
    presses an enter or command key.

    also, look at using SETATNPGM. If the user wants to gain control of the
    terminal session while your "processing ...." message is displayed they
    could press the attention key which would call a program in the
    interactive job. That program could then use a data queue to
    communicate with the the program that is writing the "processing"
    messages to the display.

    -Steve


  5. Re: Display File For a Limited Time Period

    Arka wrote:
    > I want to display a window record format of a display file for some
    > specified time period on the screen and after that the screen should go
    > off and the next screen should come. So i don't know how to achieve
    > this.
    > eg - I am calling a cobol program and in this i'm calling a display
    > file which should display
    > "Processing.........." for some time and after that that screen should
    > go without pressing any key. then the next screen should come in which
    > i have the reports.
    >
    > how to do this?
    >


    Not exactly what you are asking, but in addition to what others have
    suggested, another way to show ongoing status is using CL SNDPGMMSG ..
    TOPGMQ(*EXT) MSGTYPE(*STATUS). There are things to manage such as the
    "status message" setting of the job, but google can find past
    discussions in this newsgroup (eg examples) if interested.

    --
    Karl Hanson

  6. Re: Display File For a Limited Time Period

    Arka wrote:
    > I want to display a window record format of a display file for some
    > specified time period on the screen and after that the screen should go
    > off and the next screen should come. So i don't know how to achieve
    > this.
    > eg - I am calling a cobol program and in this i'm calling a display
    > file which should display
    > "Processing.........." for some time and after that that screen should
    > go without pressing any key. then the next screen should come in which
    > i have the reports.
    >
    > how to do this?


    By default, when you compile a DSPF, the "Maximum record wait time
    (WAITRCD)" is *NOMAX, which means when you display the DSPF, it will
    wait indefinitely for some input. You can change this to a finite time
    when you compile the DSPF, or issue an override before displaying it.
    If no records are received, a CPF0889 message is issued and control
    will pass back to your program.


  7. Re: Display File For a Limited Time Period

    jsev99@yahoo.co.nz wrote:
    > Arka wrote:
    >> I want to display a window record format of a display file for some
    >> specified time period on the screen and after that the screen should
    >> go off and the next screen should come. So i don't know how to
    >> achieve this.
    >> eg - I am calling a cobol program and in this i'm calling a display
    >> file which should display
    >> "Processing.........." for some time and after that that screen
    >> should go without pressing any key. then the next screen should come
    >> in which i have the reports.
    >>
    >> how to do this?

    >
    > By default, when you compile a DSPF, the "Maximum record wait time
    > (WAITRCD)" is *NOMAX, which means when you display the DSPF, it will
    > wait indefinitely for some input. You can change this to a finite
    > time when you compile the DSPF, or issue an override before
    > displaying it. If no records are received, a CPF0889 message is
    > issued and control will pass back to your program.


    This is how we wait 10 seconds:

    ********
    O E SA1
    O K7 '$$TIMER'
    O 6 '000010'



  8. Re: Display File For a Limited Time Period


    "Arka" wrote in message
    news:1165899735.845813.223660@l12g2000cwl.googlegr oups.com...
    >I want to display a window record format of a display file for some
    > specified time period on the screen and after that the screen should
    > go
    > off and the next screen should come. So i don't know how to achieve
    > this.
    > eg - I am calling a cobol program and in this i'm calling a display
    > file which should display
    > "Processing.........." for some time and after that that screen should
    > go without pressing any key. then the next screen should come in which
    > i have the reports.
    >
    > how to do this?
    >


    1. You must specify WAITRCD on the display file
    2. On those record formats that you want to time out the display you
    must specify the INVITE keyword
    3. In your Cobol program you must WRITE to the record format then READ
    from it. A time out will cause an I/O error in your Cobol program that
    you must trap.



+ Reply to Thread