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

How to differentiate PS & PDS files in COBOL programming


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Avinash Kumar
Warnings : 1

New User


Joined: 20 Feb 2007
Posts: 9
Location: Noida

PostPosted: Tue Mar 13, 2007 8:43 am
Reply with quote

Hi Friends.
I have a file consisting a list of some 20 datasets. I am using this file in a COBOL program. Then please help me to differentiate the PS & PDS datasets from the list in my program.

Thanks.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Mar 13, 2007 8:50 am
Reply with quote

Avinash Kumar wrote:
help me to differentiate the PS & PDS datasets from the list in my program.
Wy would/do you need to know the difference?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Mar 13, 2007 11:19 am
Reply with quote

You will have to get the DSNAME using your COBOL or a REXX function.

O.
Back to top
View user's profile Send private message
Avinash Kumar
Warnings : 1

New User


Joined: 20 Feb 2007
Posts: 9
Location: Noida

PostPosted: Tue Mar 13, 2007 11:45 am
Reply with quote

I already have the DSNAME in a file. I can read the file and get the DSNAME in program. Now tell me how can i identify the dataset its PS or PDS?
Back to top
View user's profile Send private message
rakesh.in.in

New User


Joined: 01 Mar 2007
Posts: 5
Location: Pune

PostPosted: Tue Mar 13, 2007 12:39 pm
Reply with quote

In PS there is no directory block---None
But in Pds the directory block---Some value
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue Mar 13, 2007 1:43 pm
Reply with quote

In SAS you can get info using JFCB.
But not sure how to get this in COBOL?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Mar 13, 2007 2:03 pm
Reply with quote

JFCB can be mapped in COBOL. The relevant field for your need is probably JFCDSORG.

An example of JFCB in COBOL can be found here.

The full mapping of JFCB can be found in the fine manual.

O.
Back to top
View user's profile Send private message
Suryanarayana.tadala

New User


Joined: 03 Nov 2005
Posts: 43
Location: St.Louis

PostPosted: Fri Mar 16, 2007 4:10 am
Reply with quote

Go thru ISPF view (3.4) and give the initial view option as Attrib , it would show/sort you with the PS/PD
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Mar 16, 2007 4:26 am
Reply with quote

But how is 3.4 coing to help him "in my program"?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Mar 16, 2007 12:59 pm
Reply with quote

You can simulate 3.4 programmatically by using the ISPF service LMDLIST.

O.
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Tue Apr 03, 2007 1:05 pm
Reply with quote

ofer71 wrote:
You can simulate 3.4 programmatically by using the ISPF service LMDLIST.

O.

Got a link to an example calling LMDLIST from cobol? I searched but didn't see one.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 03, 2007 1:11 pm
Reply with quote

You would be invoking ISPF services from your COBOL program, and it is the ISPF manaual(s) that contain this information.

Hit the "manuals" button at the top of the page and look at the ISPF book(s).
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top