Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

CPF4737 I/O Error when using INVITE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CPF4737 I/O Error when using INVITE

    We have a computer aided dispatch program which is used by 2-3 employees of a police department 24 hours a day. Every 5 seconds, we want the display to update with current unit status information, so in the program we use a WRITE followed by a READ, rather than an EXFMT. We have specified the INVITE keyword on the DDS for the record format we want to read/write, and 5 in WAITRCD when creating the display file. In the RPGLE program, we have the display file sepecified as MAXDEV(*FILE) (which in the display file is 1). In the CL which calls the program, we monitor for the CPF4737 error, and in the RPG program we use the (E) extender when using the WRITE. We WRITE the record format WRITE(E) CADOPF. After the WRITE, we do a check for an error... If %error followed by if %status = 01299...But no mater what we do, we cannot seem to get the program to monitor for the error message. Does anyone know what I am doing wrong? If we get this error, I want to take control in the program and allow the program to han dle it and go on, instead of having to cancel, and restart the program. Any sugestion? Thanks!

  • #2
    CPF4737 I/O Error when using INVITE

    Kevin, It's not as slick as the (e) extender, but what I did was write a CL program that has a DLYJOB DLY(10) (we use 10 seconds). Immediately after the write, call this CL and when the CL waits then ends, have the program re-calc and the write again with the call to the CL. alpha: pgm dlyjob dly(10) omega: endpgm Pretty simple, but simple is nice sometimes. -bret p.s. This'll work for now and give you a chance to test in the mean time.

    Comment


    • #3
      CPF4737 I/O Error when using INVITE

      Bret, Neat idea. One problem with our application however is that our dispatchers need to be able to have control of the program at all times. The 5 second wait is only a minimum time for the status diplay to be updated. If they do a function such as dispatching fire or police or ambulance before the 5 seconds, the program processes it without waiting the whole 5 seconds. The program does its thing, updates the display, then come back to wait (via the read/write). Does the DLYJOB allow for control to pass back to the program before the specified time if a keystroke is made? Thanks!

      Comment


      • #4
        CPF4737 I/O Error when using INVITE

        Kevin, Thanks for the compliment. Ego is everything!!! To answer your question "No". The CL will not capture the key stroke. The video will however 'remember' what key was pressed (I use the CFnn keys) and the program can take action on that. The problem is that if the video refreshes and they press CFnn, there could be up to a 5 second wait for the program to realise it. c write video_01 c call delay_pgm c parm 5 15 5 c if *inke = *on c do other stuff c endif Later, -bret

        Comment


        • #5
          CPF4737 I/O Error when using INVITE

          Kevin, Interrogate the major/minor return codes in the workstn INFDS, positions 401-404, after the WRITE(e). If (%Error = *On) And (MajMinCode=0412) then you must jettison the data in the workstn input buffer before continuing - perform a READ followed by another WRITE(e). Chris

          Comment


          • #6
            CPF4737 I/O Error when using INVITE

            As a thought why not try using a data queue ? Override the display file to the dataqueue and have the event movements sent to the same queue. That way as soon as something happens (either screen entry or status update) your screen will be updated. David

            Comment


            • #7
              CPF4737 I/O Error when using INVITE

              Chris, What do I read? If I do a READ, it will go back into the 5 second wait (at least I think it will.) Do I READ CADCTLFM (the display file) or READ CADOPF (the format)? I tried putting an inidcator on the INVITE in my DDS, and when the error message was recieved, I tried reading the format with the INVITE off, but it locked up my workstation, so badly that I have to wait until the next IPL or termination of QINTER to get it back... Thanks for your help! Kevin

              Comment


              • #8
                CPF4737 I/O Error when using INVITE

                David, I have never done work with Data Queues. Can you suggest a good (readable)reference work on them? Kevin

                Comment


                • #9
                  CPF4737 I/O Error when using INVITE

                  Kevin, I believe you can read either the F-spec name or the record format name, if you detect an '0412'. Why? The display file has sent data back to the program so I don't believe another 5 second wait will occur. Read that data in, do nothing with that data and issue another write(e). The problem is that the controller detected a timeout and then the user pressed a function key before your program got control. The program sees that a timeout occurred but yet there is data in the input buffer. You cannot issue a write when data is in the input buffer. You should not need to indicator the INVITE keyword. Chris

                  Comment

                  Working...
                  X