On 18 Feb 2013 08:30:24 -0800, in bit.listserv.ibm-main you wrote:

>The plumbing needed to implement Paul Gilmartin's suggestion is more
>complex than he perhaps implies it to be.  An implementation is
>straightforward in PL/I, e.g.,
>
>declare infile file record sequential buffered ;
>...
>declare read_file aligned bit ; /* boolean */
>...
>on endfile(infile) read_infile = '0'b ;
>...
>open file(infile) input ;
>...
>read_infile = '1'b ;
>do while(read_infile) repeat(read_infile) ;
>  read file(infile) set(inrecp) ;
>end ;
>
>Unfortunately there is nothing in COBOL corresponding to the
>asynchronously entered ON unit here.  COBOL is resolutely synchronous.

If you add status codes to the SELECT statement for a file, you can
code 
IF HOLD-FILE-A-KEY not = HIGH-VALUE
  READ FILE-A
  IF FILE-STATUS = '00' '97'
    PERFORM PROCESS-FILE-A
  ELSE
    MOVE HIGH-VALUE to HOLD-FILE-A-KEY
  END-IF
END-IF

There also are declaratives which are separate and that I never
bothered figuring out how to use.

Clark Morris   
>
>John Gilmore, Ashland, MA 01721 - USA
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to