I do not know if this is a valid solution - but something I have done
In the jcl - between each dsn in the dd concatenation,
Place a dd * with some literal value like END OF DD 1

FILE1 DD DISP=SHR,DSN=MYDSN
        DD *
END OF 1
       DD DISP=SHR,DSN=MYDSN2
DD *
END OF 2
       DD DISP=SHR,DSN=MYDSN3
DD *
END OF 3

In the program
If input-lit = "end of 1"
Move 2 to which-dd-am-i-on


Now I am certain this is not the approach the OP was looking for - 

I have used this when reading 2 sets of data that build a many-to-many grid - 
but want to read them  in thru 1 DD
I want to know if I am on the first set of data (that is thrown into an 
in-memory table) or the second set of data
Which is compared to that in-memory table

Chris hoelscher
Technology Architect 
Database Infrastructure Services
Technology Solution Services

123 East Main Street
Louisville, KY 40202
[email protected]
Humana.com
(502) 714-8615
(502) 476-2538

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Lizette Koehler
Sent: Monday, September 14, 2015 10:55 AM
To: [email protected]
Subject: Re: [IBM-MAIN] Concatenated datasets read information.

Could you explain what problem you are trying to solve with this technique?

How does it help your process to know which concatenated  dataset the data came 
from?  Why can you not use multiple DD Statements instead?

Lizette


> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] 
> On Behalf Of Massimo Biancucci
> Sent: Monday, September 14, 2015 4:15 AM
> To: [email protected]
> Subject: Concatenated datasets read information.
> 
> 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.
> 
> Thanks a lot in advance.
> Massimo

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

The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material.  If you receive this 
material/information in error,
please contact the sender and delete or destroy the material/information.


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

Reply via email to