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

SYSDSN for VSAM not working


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

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Tue Aug 02, 2011 4:59 pm
Reply with quote

Im writing a CLIST program which reads a VSAM file and returns me the expansion source listing present in it.

But the CLIST always returns a False condition eventhough the member is present in the VSAM.
Code:


PROC 1 MEM
CONTROL SYMLIST CONLIST
SET &F = &STR('ABC.VSAM(&MEM)')
SET &F1 = &STR('ABC.VSAM1(&MEM)')

SET &LOCINLIB = &SYSDSN(&F)
IF &LOCINLIB = &STR(OK) THEN-
  DO
  CLEAR
 ISPEXEC VIEW DATASET(&F)
  END
ELSE-
  DO
  SET &LOCINLIB = &SYSDSN(&F1)
IF &LOCINLIB = &STR(OK) THEN-
  DO
 CLEAR
ISPEXEC VIEW DATASET(&F1)
 END
  ELSE-
   DO
    WRITE MEMBER &MEM NOT FOUND
   END
   END


The above code returns me MEMBER SPECIFIED, BUT DATASET IS NOT PARTITIONED.

Do we have any other command where equivalent to SYSDSN to see the VSAM file expanded.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Aug 02, 2011 5:14 pm
Reply with quote

rethink Your understanding of data management
what is Your definition of member for a vsam dataset ?

Quote:
MEMBER SPECIFIED, BUT DATASET IS NOT PARTITIONED.

what do You want from us, You invoked some function specific to PDS' s,
nothing more, nothing less... and You will have to learn to live with it icon_cool.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Aug 02, 2011 5:17 pm
Reply with quote

tecnokrat,

This post is wrong in so many ways.

1) Why are you writing something new in clist? Rexx is so much better and easier to code, read, and maintain.

2) This is a very small and so very ugly piece of code. Throw this in the trash.

3) Did you actually create a VSAM PDS file? I for one have never heard of one. Please show me.

4) Did this message give you a clue as to your problem? MEMBER SPECIFIED, BUT DATASET IS NOT PARTITIONED

5) What does
Quote:
to see the VSAM file expanded.
mean? Expanded from what? to what?

You have managed to make more errors in a small post that I have seen before.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Aug 02, 2011 5:28 pm
Reply with quote

tecnokrat wrote:
Im writing a CLIST program which reads a VSAM file and returns me the expansion source listing present in it.

[...]


In addition to daveporcelan's comments, if you have a VSAM file containing "source listing"s, to me it is likely a file from a software package in its own internal format.

The likelihood of your being able to read it if the product does not want you to is small. If the product wants you to be able to read it external to the product, then they would tell you how, not leave you to make blind guesses as to how.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Aug 02, 2011 5:33 pm
Reply with quote

This may not solve your partitioned vsam delima (I do not know how that can be solved), but this is to show you how much cleaner your logic can be done with Rexx.

This is assuming your datasets are of dsorg=po.


Code:

/* REXX EXEC TO DISPLAY MEMBER */
PARSE UPPER ARG MEM
F  = 'ABC.VSAM('MEM')'
F1 = 'ABC.VSAM1('MEM')'
LOCINLIB  = SYSDSN(F)
LOCINLIB1 = SYSDSN(F1)
SELECT
  WHEN LOCINLIB  = 'OK' THEN "ISPEXEC VIEW DATASET("F")"
  WHEN LOCINLIB1 = 'OK' THEN "ISPEXEC VIEW DATASET("F1")"
  OTHERWISE SAY 'MEMBER 'MEM' NOT FOUND'
END
EXIT


You see no &STR, IF, DO, ELSE, (only one END) statements.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Tue Aug 02, 2011 6:10 pm
Reply with quote

yeah i do agree with you , i was jus reusing the existing code so as to save time. But no matter REXX would have done so much better.

Thanks for that icon_smile.gif

But even with this i get the same MESSAGE 'DATASET NOT FOUND'
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Aug 02, 2011 6:19 pm
Reply with quote

You are still withholding vital information.

Please answer the following questions:

1) Did you create these vsam files or were they created for you?

2) What are the contents of these files?

3) Why do believe they are partitioned?

4) How do you currently view these files?

I think once you answer these questions, help can be attained.

I believe what Bill mentioned above may be a clue to help you.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Wed Aug 03, 2011 12:53 am
Reply with quote

Quote:
But even with this i get the same MESSAGE 'DATASET NOT FOUND'

Um...same as what? Your previous message was:
Quote:
MEMBER SPECIFIED, BUT DATASET IS NOT PARTITIONED.

This is completely different. And you are using 2 datasets - which one was not found?
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Aug 03, 2011 6:16 am
Reply with quote

Quote:
This post is wrong in so many ways.

Plus, you cannot VIEW a VSAM file.

I think the poster just has regular PDS dataset and has arbitrarily named it to have 'VSAM' in the dataset name.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Aug 03, 2011 5:10 pm
Reply with quote

Quote:
Plus, you cannot VIEW a VSAM file.


Nice addition Pedro, I forgot about that one.

Quote:
I think the poster just has regular PDS dataset and has arbitrarily named it to have 'VSAM' in the dataset name.


I am not so sure about this one. He eludes to it being vsam in the title.

This however is another case of the TS providing incomplete and inaccurate information, then dissapearing when brought to task.

This leaves the contributers to bounce back and forth guessing what the issues really are while the TS is long gone. We can only be saved when Enrico swoops in and locks the topic to save us from our misery. Enrico where are you when we need you?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Aug 03, 2011 5:22 pm
Reply with quote

I am here watching... and waiting just a bit more icon_biggrin.gif
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Aug 04, 2011 9:08 pm
Reply with quote

I have a guess...this VSAM file is really the repository for something like Librarian.

Perhaps what is missing is a read/writer name on the DD (rexx equivalent)
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Fri Aug 05, 2011 2:51 pm
Reply with quote

Quote:
1) Did you create these vsam files or were they created for you?

2) What are the contents of these files?


These VSAM files are not created by me , they hold the source listings of the Cobol programs

Quote:
3) Why do believe they are partitioned?

i thot of that SYSDSN could have opened in a View mode a VSAM file, but unchecking with the partitioned options on it.

Quote:
4) How do you currently view these files


Currently i use the Xpeditor tool to view these VSAM files.

So i thot of to simplify these by jus making a REXX code and relaxing a bit in easing not going thru the xpeditor options.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Aug 05, 2011 3:34 pm
Reply with quote

So, you have to look at the Xpeditor manual. If Xpeditor wants you to be able to see the sources externally, then it will tell you. Otherwise you are wasting yours, and others, time.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Aug 05, 2011 4:04 pm
Reply with quote

it is always a bad idea to try to process proprietary data without using the provided/defined/published/documented <public> interfaces
if none are provided/defined/published/documented You / Your organization will have to live with it


chances of getting help on such issues are pretty slim,
and if You had cared to tell the whole thing from the beginning we would not have wasted time trying to understand it icon_evil.gif

topic will be locked shortly and deleted in a few hours

and here for Your info the link to the zOS 1.10 TSO bookshelf
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK90

or to the IBM index for other zOS versions/releases
www-03.ibm.com/systems/z/os/zos/bkserv/index.html
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Fri Aug 05, 2011 4:37 pm
Reply with quote

Sorry for the wastage of time....i was beating around the bush
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Aug 05, 2011 4:39 pm
Reply with quote

OK. Next time, say more about the requirement in your intial post, please.
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 VSAM LISTCAT INFORMATION JCL & VSAM 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
Search our Forums:

Back to Top