IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

PLI - How to find out the copy book name for a dataset


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Thu May 27, 2010 9:33 pm
Reply with quote

Hi,

I am new to PL/I. I am having experience in COBOL but nit in PL/I. But currently in one of the project which I am working, I come accross some PL/I modules. In these modules in some analysis I had to get copy book name for particular datasets. How to find out the copy book name for a dataset.

If there is syntax READ FILE(XXXX) INTO(YYYY), then I can easil;y findout that copy book for XXXX is YYYY.

But in some cases POINTERs areused as below

READ FILE(XXXX) SET(FILEPTR), but in that case I don't know the copy book layout for this file.. Please do the needful by giving some overview about these pointers in PL/I
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu May 27, 2010 10:46 pm
Reply with quote

How did you find out the copybooks associated with a file in COBOL?

POINTER is PL/I is the same as POINTER in COBOL. After a READ, it will contain the address of the data and INTO is INTO, regardless of the language.

Apply the same method(s) in PL/I as you did in COBOL to resolve the copybook name(s) and it will require analysis on your part.

Seems like that you're on the right track.

Seek and ye shall find....

Bill
Back to top
View user's profile Send private message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Fri May 28, 2010 1:53 am
Reply with quote

But I have never seen POINTERS in COBOL. Here in PL/I it is bit tricky in finding out the copy books.. The file is divided into sections, I am really wondering how to find out the copy book.

READ FILE(XXXX) SET(FILEPTR)

FILEPTR is defined as FILEPTR POINTER

but when READ executed where te data goes??
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri May 28, 2010 2:13 am
Reply with quote

POINTER's were introduced with VS/COBOL II in the mid/late 1980's. PL/I had them long before this.

When a POINTER is used in COBOL, the address found in the POINTER (after the READ) is where you can find the data.

Both COBOL and PL/I operate the same way. But, having said this, I don't know if you can use POINTER's in Batch COBOL (CRS ya know), so that's something you need to verify. You can definitely use POINTER's in CICS/COBOL.

As far as matching the copybooks with the File's, you have some analysis in front of you.

I'm not too sure how much more I can help?

Perhaps another member with more PL/I experience than I, would like to jump in?

Bill
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri May 28, 2010 4:17 am
Reply with quote

Look for structures that are declared as

Code:
DCL 1 WHATEVER_LAYOUT BASED(FILEPTR),
      %INCLUDE COPYBOOK;
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top