How do I identify concatenated files within a Cobol Program



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

How do I identify concatenated files within a Cobol Program

Postby rriley » Fri Jan 29, 2010 6:20 pm

RE: IBM OS/VS COBOL RELEASE 2.4

I have several gdg's concatenated as input to an application.

When the input file is read, is there a way of identifing which file (gdg) is being accessed from within the COBOL application?

IE: jcl
//INFIL DD DISP=&DSP,UNIT=&UNIT,DSN=&DSN(-00)
// DD DISP=&DSP,UNIT=&UNIT,DSN=&DSN(-01)
// DD DISP=&DSP,UNIT=&UNIT,DSN=&DSN(-02)
// DD DISP=&DSP,UNIT=&UNIT,DSN=&DSN(-03)

IE: Cobol
SELECT DOC-FL ASSIGN TO UT-S-INFIL.
FD DOC-FL
LABEL RECORDS ARE STANDARD
RECORDING MODE IS F
RECORD CONTAINS 450 CHARACTERS
BLOCK CONTAINS 0 RECORDS.
01 DOC-RECD PIC X(450).

READ DOC-FL INTO WORK-INPUT
rriley
 
Posts: 2
Joined: Fri Jan 29, 2010 5:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How do I identify concatenated files within a Cobol Program

Postby Robert Sample » Fri Jan 29, 2010 6:54 pm

I am not aware of any COBOL way to identify which file in a concatenation is being accessed. You could probably chase the file block chains to locate this data, but that may be a lot of trouble for a very little bit of knowledge.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How do I identify concatenated files within a Cobol Program

Postby rriley » Fri Jan 29, 2010 6:58 pm

Thanks, RRiley
rriley
 
Posts: 2
Joined: Fri Jan 29, 2010 5:39 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post