View previous topic :: View next topic
|
Author |
Message |
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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
But even with this i get the same MESSAGE 'DATASET NOT FOUND' |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
I am here watching... and waiting just a bit more |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
Sorry for the wastage of time....i was beating around the bush |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK. Next time, say more about the requirement in your intial post, please. |
|
Back to top |
|
|
|