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

How to process gdg in rexx program when i/p given with vers?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Thu Dec 13, 2018 10:08 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 13, 2018 12:54 pm
Reply with quote

Correct, you would do, if my assumption is correct, but as there is insufficient information to verify that .......... icon_evil.gif

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 icon_wink.gif

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Dec 13, 2018 8:37 pm
Reply with quote

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
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Fri Dec 14, 2018 9:25 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Dec 14, 2018 12:54 pm
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Fri Dec 14, 2018 3:00 pm
Reply with quote

for starters, this code is plain wrong:
Code:
z=SYSDSN("'dsn1'")

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
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Fri Dec 14, 2018 3:59 pm
Reply with quote

Have you turned on tracing? If not, why not. If you have then post the output from the trace.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Dec 14, 2018 4:01 pm
Reply with quote

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 icon_cool.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Dec 14, 2018 4:40 pm
Reply with quote

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

icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Dec 14, 2018 5:05 pm
Reply with quote

Nope ...
it' s tragedy season

on another forum a Senior suggested that a program was failing
because of a missing end of file marker icon_eek.gif
but when they deleted the last record the program was ok

sometimes I wonder
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Fri Dec 14, 2018 6:17 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Fri Dec 14, 2018 6:37 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Dec 17, 2018 12:50 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top