On Mon, 14 Sep 2015 13:14:49 +0200, Massimo Biancucci <mad4...@gmail.com> wrote:

>Hi everybody,
>
>is there any way to know which concatenated dataset I've read the current
>record from ?
>
>To be clear:
>
>FILE1 DD DISP=SHR,DSN=MYDSN1
>      DD DISP=SHR,DSN=MYDSN2
>      DD DISP=SHR,DSN=MYDSN3
>
>From a COBOL program:
>
>READ FILE1 INTO MY-RECORD AT END GO E-O-P.
>
>CALL "MYPGM to know the file I've read from".
>
>MYPGM should be assembler I suppose.
>
>I was not able to find anything in TIOT nor JFCB.

From COBOL I'm not sure if you can do it. If you were doing the reading in an 
assembler program, then it's possible if I remember correctly. As I recall, 
there's a flag you can set in the DCB that indicates the concatenation may 
contain data sets with different characteristics (block size, primarily), and 
when that flag is set the system will call your EOF (?) exit as it's crossing 
into the next data set in the concatenation. That allows you to do appropriate 
control block adjustments.

(These are all very old memories, as I haven't used that technique in decades.)

-- 
Walt

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to