Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2504
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: 2504
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: 1060
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us