View previous topic :: View next topic
|
Author |
Message |
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Hi all
I am getting invalid dataset name while processing the input file verifying the file with SYSDSN when the input gdg file is given with version (0)?
Thanks
Murali |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Correct, you would do, if my assumption is correct, but as there is insufficient information to verify that ..........
Either define the relative generation as zero in the JCL if you are running in batch mode, or - and there are some examples on doing this on the forum because both Enrico and I have posted different options to get the absolute generation of the latest GDS within the REXX code and then allocate it using said absolute generation.
pkmurali wrote: |
when the input gdg file is given with version (0)? |
N.B. I am sure that you really meant GENERATION rather than version didn't you, after all both are equally valid and have completely different usage, not to mention that you WOULD NOT code the version number as (0).
I won't go into the file / dataset thing again either
AND AGAIN Do try to give us at least the bare minimum information - because you have posted in the REXX section I can only assume that you have a problem with some REXX code. A snippet of code would help. Anything really !!!
Please try to help those willing to help you !!! |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
pkmurali wrote: |
Hi all
I am getting invalid dataset name while processing the input file verifying the file with SYSDSN when the input gdg file is given with version (0)?
Thanks
Murali |
As expat says, in this context (0) is a generation. It is not a version. Learn to use correct terminology. In a generation data group there are versions within a generation, but these are different and extremely difficult to use.
In sysdsn(xxx(0)), xxx is considered to be a partitioned data set. xxx(0) is invalid because 0 is not a valid member name.
If your Rexx EXEC wants to use relative generations, if must determine, very manually, the GnnnnVnn of generation 0 (or whatever generation you're interested in) and then use sysdsn(xxx.GnnnnVnn). |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Thanks expat. I get the Dataset using the below piece of code
Code: |
/******REXX****/
Say 'Enter the DSN:'
pull dsn1
z=SYSDSN("'dsn1'")
if z='OK' then
do
say 'valid dsn'
else
say 'invalid dsn'
end
exit
|
When i give gdg with generation i am getting invalid dsn. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
As I said yesterday, there is code on the forum that will give you what you exactly what you want.
If you know the GDG base then you can easily find the zero generation - I searched and found it on this very forum.
So a helpful hint - you need to translate the relative generation into the absolute generation.
Exactly the same response as my first post above.
and Steve-Myers has told you the reason that it is failing.
And yet again, you give absolutely minimal information in your post. Whooppee Dooppee Sooooooooo for the information that you get the dataset name from your REXX and still you get errors.
Quote: |
When i give gdg with generation i am getting invalid dsn. |
So would that be using a relative or absolute generation, or was there no generation specified by the entrant, who gave only the base.
Unless you start giving some useful information you will find that the topic is locked. And the amount of information that you do give, I think that some posters on the beginners forum post more meaningful information than you do.
Unless you can give a detailed and information loaded explanation of what you are trying to do, how information is entered into this code and absolutely anything that may be helpful I may as well close the thread to save the further waste of anyones time. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 743 Location: Denmark
|
|
|
|
for starters, this code is plain wrong:
you need to add two more double-quotes like so
Code: |
z=SYSDSN("'"dsn1"'") |
otherwise it doesnt matter whatever else you do. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Have you turned on tracing? If not, why not. If you have then post the output from the trace. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10891 Location: italy
|
|
|
|
after 13 ( THIRTEEN) years of hanging around
You should know that TSO commands DO NOT deal with GDGs
they deal only with REAL ( as they are stored in the catalog and the VTOC ) dataset names
it has been suggested for gaziliions of times that to find the real name of a GDG generation
the proper way is to use the IBM provided BPXWDYN
AMEN |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
As this is the pantomime season (maybe you have to be a Brit to get this ..... but)
enrico-sorichetti wrote: |
the proper way is to use the IBM provided BPXWDYN
|
Oh Noooooooooooo it isn't
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10891 Location: italy
|
|
|
|
Nope ...
it' s tragedy season
on another forum a Senior suggested that a program was failing
because of a missing end of file marker
but when they deleted the last record the program was ok
sometimes I wonder |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
In ISPF 3.4, if gdg with (0) is given then the whole gdg is shown. can i use edit macros to get the gdg with generation? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Quote: |
can i use edit macros to get the gdg with generation? |
Yes, but you would have to be editing a dataset - it is an edit macro after all - and the macro would be about the same as a Rexx program.
Why not just provide us with the information requested including the trace and we can analyse your problem properly? I have an idea as to what is wrong as, I am sure, do others but without the information we are only guessing. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
pkmurali wrote: |
In ISPF 3.4, if gdg with (0) is given then the whole gdg is shown. can i use edit macros to get the gdg with generation? |
Ye gods, and for how many more times must I repeat myself ....
There is code on this forum that will give you the absolute generation from a relative generation.
I found it easily ................ so can YOU !!!!
a clue, search for both keywords, absolute AND relative
TOPIC LOCKED |
|
Back to top |
|
|
|