Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to process gdg in rexx program when i/p given with vers?

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

Active User


Joined: 15 Dec 2005
Posts: 261

PostPosted: Thu Dec 13, 2018 10:08 am    Post subject: How to process gdg in rexx program when i/p given with vers?
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: 8752
Location: Welsh Wales

PostPosted: Thu Dec 13, 2018 12:54 pm    Post subject:
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: 696
Location: The Universe

PostPosted: Thu Dec 13, 2018 8:37 pm    Post subject: Re: How to process gdg in rexx program when i/p given with vers?
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: 261

PostPosted: Fri Dec 14, 2018 9:25 am    Post subject: Reply to: How to process gdg in rexx program when i/p given with vers?
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: 8752
Location: Welsh Wales

PostPosted: Fri Dec 14, 2018 12:54 pm    Post subject:
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 User


Joined: 01 Sep 2015
Posts: 257
Location: Denmark

PostPosted: Fri Dec 14, 2018 3:00 pm    Post subject:
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: 2130
Location: UK

PostPosted: Fri Dec 14, 2018 3:59 pm    Post subject: Reply to: How to process gdg in rexx program when i/p given with vers?
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

Senior Member


Joined: 14 Mar 2007
Posts: 10552
Location: italy

PostPosted: Fri Dec 14, 2018 4:01 pm    Post subject: Reply to: How to process gdg in rexx program when i/p given with vers?
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: 8752
Location: Welsh Wales

PostPosted: Fri Dec 14, 2018 4:40 pm    Post subject: Re: Reply to: How to process gdg in rexx program when i/p given with vers?
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

Senior Member


Joined: 14 Mar 2007
Posts: 10552
Location: italy

PostPosted: Fri Dec 14, 2018 5:05 pm    Post subject: Reply to: How to process gdg in rexx program when i/p given with vers?
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: 261

PostPosted: Fri Dec 14, 2018 6:17 pm    Post subject: Reply to: How to process gdg in rexx program when i/p given with vers?
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: 2130
Location: UK

PostPosted: Fri Dec 14, 2018 6:37 pm    Post subject: Reply to: How to process gdg in rexx program when i/p given with vers?
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: 8752
Location: Welsh Wales

PostPosted: Mon Dec 17, 2018 12:50 pm    Post subject: Re: Reply to: How to process gdg in rexx program when i/p given with vers?
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.    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. how to write a REXX to see whether da... javen777 CLIST & REXX 3 Wed Dec 19, 2018 11:36 am
No new posts Error when compiling a REXX exec with... Ricardo Viegas CLIST & REXX 2 Tue Dec 18, 2018 5:44 am
No new posts CICS program with Delay question MSTP CICS 2 Tue Dec 11, 2018 11:18 pm
No new posts COBOL D2 program execution without us... dipsybaby DB2 3 Mon Dec 10, 2018 2:08 pm
No new posts Need advise in calling DFSORT from REXX ajithajt CLIST & REXX 9 Thu Nov 29, 2018 10:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us