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

To find DISP parameter


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
padmasriprasad

New User


Joined: 22 Feb 2008
Posts: 5
Location: Hyderabad

PostPosted: Sun Aug 24, 2008 10:18 am
Reply with quote

Hi ,
How can we find the DISP parameter of a Given DATASET using REXX.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Aug 24, 2008 10:31 am
Reply with quote

Take a look at the JFCDISP field within the JFCB Data Area.

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

New User


Joined: 22 Feb 2008
Posts: 5
Location: Hyderabad

PostPosted: Mon Aug 25, 2008 11:01 pm
Reply with quote

Thanks ofer..

I have gone through the link which you have provided, could you please explain how can i use them in my REXX program...or else provide me a link where i can have the related info.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Aug 25, 2008 11:42 pm
Reply with quote

Quote:
How can we find the DISP parameter of a Given DATASET using REXX.


could You please elucubrate on your requirement

... are You trying to find out how the dataset is allocated to Your job step ?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Aug 26, 2008 1:03 am
Reply with quote

If you can run it in TSO, you can use the LISTA ST command.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 26, 2008 2:10 am
Reply with quote

Hello,

Quote:
I have gone through the link which you have provided, could you please explain how can i use them in my REXX program...or else provide me a link where i can have the related info.
That is the link to the related info. . .

You need to more clearly explain what you are looking for. What is your meaning of "a given dataset"? Any example would probably help clarify what you want to know.
Back to top
View user's profile Send private message
padmasriprasad

New User


Joined: 22 Feb 2008
Posts: 5
Location: Hyderabad

PostPosted: Tue Aug 26, 2008 10:00 am
Reply with quote

Given dataset means
Suppose i have a dataset called "savt.i1.temp.data"
i will read this dataset name into a variable say DSN
By using this variable(DSN) in REXX Program i want to know the DISP PARAMETER of the dataset "savt.i1.temp.data" whether it is new old shr or mod
i have a requirement to process according to the DISP parameter
Thanks for your reply
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 26, 2008 10:05 am
Reply with quote

Hello,

A dataset that is on a dasd volume and is not in use has no DISP. It merely exists.

Disposition is determined by the task(s) allocating the dataset. Depending on how a dataset is to be used, it may be allocated using different DISP parameters.

You cannot use a dataset name as "input" this way.

If you explain your requirement, someone may have a suggestion. What will your code do depending on the DISP?
Back to top
View user's profile Send private message
padmasriprasad

New User


Joined: 22 Feb 2008
Posts: 5
Location: Hyderabad

PostPosted: Tue Aug 26, 2008 9:52 pm
Reply with quote

Iam copying datasets...if a dataset with the DISP parameter as N C D then no need to copy the dataset ...simply i can change the name of the dataset...Based on the disp parameter i need to decide whether i need to copy the contents of one dataset to other or i have to replace it with new name...
EX savt.new.dataset disp=N C D i need to replace the dataset with new name say ISDN777.dataset ...to do this i need to know the disp parameter of the dataset "savt.new.dataset" through rexx
This is my requirement.. plse help
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 26, 2008 10:02 pm
Reply with quote

Hello,

While your question/requirement is completely clear to you it is not to others.

Please post the complete jcl from an example execution of how your process would be submitted. I realize it does not yet exist, but you can post what you intend to submit once you have code to support it.

Keep in mind that if you are copying an existing dataset, the DISP cannot be (new, cat, del) . . .
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Aug 26, 2008 10:53 pm
Reply with quote

<wild_guess>
I think you have confused everyone by using DISP as a parameter to your rexx program. It is a common parameter in JCL.

You can use the PARSE ARG command to get the parameters passed to a rexx program. But instead of an equals sign, such as DISP=, you will probably want to use parenthesis, such as DISP(N C D)
</wild_guess>
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
Search our Forums:

Back to Top