Automaticall Refresh Display (COBOL)

90 pts.
Tags:
AS/400
COBOL
CRTDSPF
I have a need to have the screen do an Automatic Refresh. I have created a working sample using CLP and setting the Display file to waitrcd(5). CRTDSPF WAITRCD(5). So I know it can work. I have found several examples using RPG. I need to do it using COBOL. Can any one help? I have taken everything I have seen about RPG and tried to make it work with COBOL.  It's just not working. Any help would be appreciated

Software/Hardware used:
V5R4M0

Answer Wiki

Thanks. We'll let you know when a new response is added.

From: WebSphere Development StudioILE COBOL Language Reference Version 5 SC09-2539-05

This READ can complete without returning any data in the following cases:

1. There are no invited devices and the timer function is not in effect. (This is the AT END condition.)

2. A controlled cancellation of the job occurs. This results in a file status value of 0A and a major-minor return code value of 0309.

3. The NO DATA phrase is omitted and the specified wait time expires. This results in a file status value of 00 and a major-minor return code value of 0310. The specified wait time is the value entered on the WAITRCD parameter for the file or the time interval specified on the timer function.

4. The NO DATA phrase is specified and there is no data immediately available when the READ is executed.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    You do it essentially the same way in COBOL as in CL or RPG. AFAIK, the only notable difference is that CL has SNDRCVF and RPG has EXFMT, where COBOL requires a separate WRITE followed by a READ. What are you having trouble with? Tom
    125,585 pointsBadges:
    report
  • KSC
    I have a CL and RPG working (returns to the program after the screen times out). But just can not get the COBOL to work. All of the code we want this to work in is COBOL. The program displays the screen but never times out in the read statement. I have the INVITE in the DDS
           File-Control.
    
               select screenFile
                   assign to workstation-POCTOSCS5-si
                   organization is transaction
                   access mode is dynamic
                   relative key is subf1-pos
                   file status is screenFileStatus
                   control-area is ds-Control-Area.
    
           Data Division.
    
           File Section.
    
           fd  screenFile.
           01  screenRec.
               05  filler               pic x(2500).  
    
               open i-o screenFile
               .
               write screenRec
                   from POCSCR5A
                   format is "POCSCR5A"
               end-Write
               .
    
               read screenFile
                   into POCSCR5A
                   format is "POCSCR5A"
                   at end
                       continue
               end-read
               .  
    
    Thanks
    90 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following