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
 

 

How to differentiate PS & PDS files in COBOL programming

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to differentiate PS & PDS files in COBOL programming
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: 3158
Location: Tucson AZ

PostPosted: Tue Mar 13, 2007 8:50 am    Post subject: Re: How to differentiate PS & PDS files in COBOL program
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: 2360
Location: Israel

PostPosted: Tue Mar 13, 2007 11:19 am    Post subject:
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    Post subject: Re: How to differentiate PS & PDS files in COBOL program
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    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Mar 13, 2007 2:03 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Fri Mar 16, 2007 4:26 am    Post subject:
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: 2360
Location: Israel

PostPosted: Fri Mar 16, 2007 12:59 pm    Post subject:
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

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Tue Apr 03, 2007 1:05 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 03, 2007 1:11 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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