View previous topic :: View next topic
|
Author |
Message |
kumar_jalluri
New User
Joined: 02 Jun 2005 Posts: 24 Location: PUNE
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
kumar_jalluri
New User
Joined: 02 Jun 2005 Posts: 24 Location: PUNE
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Look for structures that are declared as
Code: |
DCL 1 WHATEVER_LAYOUT BASED(FILEPTR),
%INCLUDE COPYBOOK; |
|
|
Back to top |
|
|
|