Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: PLI - How to find out the copy book name for a dataset
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu May 27, 2010 10:46 pm    Post subject: Reply to: PLI Copy book
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri May 28, 2010 2:13 am    Post subject: Reply to: PLI Copy book
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: 1028
Location: Oostende, Belgium

PostPosted: Fri May 28, 2010 4:17 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us