Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Rexx to create VSAM define statements

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Dinesh Mani

New User


Joined: 29 Nov 2019
Posts: 3
Location: India

PostPosted: Fri Nov 29, 2019 9:26 pm    Post subject: Rexx to create VSAM define statements
Reply with quote

Hi , I need to create the Define statements of an existing VSAM files, Is there any way to do this using a program or rexx code
Back to top
View user's profile Send private message

enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10638
Location: italy

PostPosted: Fri Nov 29, 2019 10:56 pm    Post subject: Reply to: Rexx to create VSAM define statements
Reply with quote

see
File # 726 Generate VSAM DEFINE statements from VSAM file
http://cbttape.org/ftp/cbt/CBT726.zip

here is the readme

Code:
//***FILE 726 is from Ted MacNeil, and contains a REXX exec to      *   FILE 726
//*           generate DEFINE statements for VSAM files, directly   *   FILE 726
//*           from the file itself.  Details are explained below.   *   FILE 726
//*                                                                 *   FILE 726
//*     This code either displays a VSAM entry or writes the        *   FILE 726
//*     IDCAMS control statement needed to define a VSAM file.      *   FILE 726
//*     (MUST run under ISPF.)                                      *   FILE 726
//*                                                                 *   FILE 726
//*     From ISPF 3.4, type VC3 next to a VSAM data set             *   FILE 726
//*                                                                 *   FILE 726
//*     Further modified by Philippe Simon.  Please see members     *   FILE 726
//*     VCP and VCP$$ for his version and explanation thereof.      *   FILE 726
//*                                                                 *   FILE 726
//*     email for Philippe Simon:  philippe_simon_55@yahoo.fr       *   FILE 726
//*                                                                 *   FILE 726
//*     Originally Written by Jim Connelley.  Jim's version is      *   FILE 726
//*     included here as member VC.                                 *   FILE 726
//*                                                                 *   FILE 726
//*     No copyright.                                               *   FILE 726
//*     If you want to, send your enhancements to                   *   FILE 726
//*                                                                 *   FILE 726
//*             email:  tedmacneil@bell.blackberry.net              *   FILE 726
//*                                                                 *   FILE 726
//*     Reason for this REXX:                                       *   FILE 726
//*             I needed a method to clean up our old               *   FILE 726
//*             VSAM with the keywords: REPLICATE, IMBED            *   FILE 726
//*             and KEYRANGE. This was the fastest way.             *   FILE 726
//*             Those parameters are caught but not                 *   FILE 726
//*             written to control cards.                           *   FILE 726
//*             I also added a few lines to do a:                   *   FILE 726
//*             DELETE ------ PURGE at the front                    *   FILE 726
//*             (Optional)                                          *   FILE 726
//*                                                                 *   FILE 726
//*     There are bugs, such as handling multi-volume files, but    *   FILE 726
//*     that's where YOU come in.                                   *   FILE 726
//*     (-- Ted MacNEIL -- I believe I fixed this bug, but I did    *   FILE 726
//*                        not have any multi-volumes to test       *   FILE 726
//*                        with.)                                   *   FILE 726
//*                                                                 *   FILE 726
//*     (-- The dependency on STEMVIEW was removed to either write  *   FILE 726
//*      -- out to a file or stay inside a loop)                    *   FILE 726
//*                                                                 *   FILE 726
//*   Syntax:                                                       *   FILE 726
//*                                                                 *   FILE 726
//*     %VC3 VSAMDSN pds member DELETE                              *   FILE 726
//*                                                                 *   FILE 726
//*       VSAMDSN -- the VSAM FILE you wish to CLONE                *   FILE 726
//*                  (if you specify quotes, they are removed)      *   FILE 726
//*                                                                 *   FILE 726
//*       pds     -- where to output the control cards (Optional)   *   FILE 726
//*                - default: <userid>.VSAM.CONTROL.CARDS           *   FILE 726
//*                                                                 *   FILE 726
//*       member  -- the member name used to output the statements  *   FILE 726
//*                  (Optional)                                     *   FILE 726
//*                                                                 *   FILE 726
//*       DELETE  -- Insert DELETE <entry> PURGE                    *   FILE 726
//*               -- (Optional)                                     *   FILE 726
//*                                                                 *   FILE 726
//*     NOTE: 1. if PDS does not exist, this outputs to the screen  *   FILE 726
//*                                                                 *   FILE 726
//*           2. The only entry types supported are:                *   FILE 726
//*              ignored and only the DEFINE ALIAS ... RELATE       *   FILE 726
//*              will be output. There is not enough information    *   FILE 726
//*              in the LISTCAT output to rebuild the catalogue.    *   FILE 726
//*                                                                 *   FILE 726



might not be the full solution but a good starting point
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 632
Location: Maryland

PostPosted: Wed Dec 04, 2019 6:07 pm    Post subject: Re: Rexx to create VSAM define statements
Reply with quote

Dinesh Mani wrote:
Hi , I need to create the Define statements of an existing VSAM files, Is there any way to do this using a program or rexx code

The answer exactly in the style of given question should be:
"Yes, there is such way; and even multiple ways of doing this"
Or more simple:
"Yes"
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10638
Location: italy

PostPosted: Wed Dec 04, 2019 7:14 pm    Post subject: Reply to: Rexx to create VSAM define statements
Reply with quote

in other words ...

if You do not want to receive Yes/No answers
do NOT ask Yes/No questions

icon_biggrin.gif
Back to top
View user's profile Send private message
Dinesh Mani

New User


Joined: 29 Nov 2019
Posts: 3
Location: India

PostPosted: Wed Dec 04, 2019 7:59 pm    Post subject:
Reply with quote

Sorry guys. Could you please suggest me the ways in which we can create Vsam define statements by retrieving their properties using REXX
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 632
Location: Maryland

PostPosted: Wed Dec 04, 2019 9:15 pm    Post subject:
Reply with quote

Dinesh Mani wrote:
Sorry guys. Could you please suggest me the ways in which we can create Vsam define statements by retrieving their properties using REXX

In this forum people really can suggest you possible ways of doing this, but usually (with rare exceptions) they do not do your job for you.
For those who does not demonstrate any minor attempt to get result by himself, the ready-to-use solution is deliberately not presented.

One of the "ways of doing this using REXX" might be like this:

1) From your REXX code, issue some command to get existing VSAM file attributes; it could be
"LISTCAT ALL ENTRIES('existing VSAM dataset name')"
or some other methods.

2) Parse the list of returned attributes, and find those values critical for your future DEFINE statement.

3) Create required code of DEFINE statement either as string variable, or text file.

Voila. That's it.
Back to top
View user's profile Send private message
Dinesh Mani

New User


Joined: 29 Nov 2019
Posts: 3
Location: India

PostPosted: Wed Dec 04, 2019 10:13 pm    Post subject:
Reply with quote

I am currently working on creating this in Rexx. Just wanted to make sure there is no easier way around this.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10638
Location: italy

PostPosted: Thu Dec 05, 2019 12:03 am    Post subject: Reply to: Rexx to create VSAM define statements
Reply with quote

the easiest way is to look at the ready to run tool I pointed You to
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10638
Location: italy

PostPosted: Thu Dec 05, 2019 12:11 am    Post subject: Reply to: Rexx to create VSAM define statements
Reply with quote

since I am in a very good mood find attached the content of the XMIT file
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 632
Location: Maryland

PostPosted: Thu Dec 05, 2019 12:12 am    Post subject:
Reply with quote

The easiest way always is: clicking the button "Start" in a ready-to-use product/tool/program/gadget, and get the message like
"All the job has been done for you. Now go and get your prize!"

I call these specialists "Senior Computer Games Experts".
Nowadays there are tons of them.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    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
No new posts how to show the class of an ims trans... Renato Zangerolami CLIST & REXX 6 Fri Dec 06, 2019 6:50 pm
No new posts Retrieving IMS message processing reg... tneelakandan CLIST & REXX 7 Fri Nov 22, 2019 7:23 pm
No new posts Running rexx on zOS with JCL Rajesh_98 CLIST & REXX 3 Wed Nov 20, 2019 5:19 pm
No new posts Can you manually set an EOF marker in... Don Allard CLIST & REXX 5 Sat Nov 02, 2019 12:30 am
No new posts Running a REXX exec program using ZOSMF Sakthi344 CLIST & REXX 3 Tue Oct 15, 2019 3:13 pm

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