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
 
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: 154
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: 8629
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 Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm

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