add dummy record to VSAM (MVS) files 
Author Message
 add dummy record to VSAM (MVS) files

 Dear All

I need to open 600 empty VSAM files (MVS mainframe) and add a dummy record
to all 600. I am fairly experienced in REXX, but have not done any VSAM work
in REXX. Can anybody help? Any example would be much appreciated.

Thanx & a belated happy new year to all

Amy



Thu, 01 Jul 2004 04:28:05 GMT  
 add dummy record to VSAM (MVS) files
On Sat, 12 Jan 2002 12:28:05 -0800, "A Farzanegan"

Quote:

> Dear All

>I need to open 600 empty VSAM files (MVS mainframe) and add a dummy record
>to all 600. I am fairly experienced in REXX, but have not done any VSAM work
>in REXX. Can anybody help? Any example would be much appreciated.

>Thanx & a belated happy new year to all

>Amy

Allocate a source DD name to a temporary data set and EXECIO the dummy
record to that data set.  Allocate SYSIN to another temporary data set
and EXECIO the appropriate IDCAMS control cards (REPRO, etc) to it.
Loop through the data set names:  allocate the current DSN to the
target DD name specified on the control card; invoke IDCAMS; free the
target DD name; repeat DSN loop.  Free SYSIN and source DD name.

<<Remove the del for email>>



Thu, 01 Jul 2004 04:08:09 GMT  
 add dummy record to VSAM (MVS) files

Amy -

The easy way is to use 'file tailoring' within your rexx program to submit jcl,
like this:

/* assuming that these are the values you want changed in your jcl*/
usr  = userid()
dt   = date(N)
tm   = time(C)
vsamname = 'T0XXX.MYVSAM.FILE'

/* note single quotes surrounding double quotes, for full qualification */
jcljob = '"T0XXX.LIB.JCL(myjob)"'

 ADDRESS ISPEXEC
     "FTOPEN TEMP"
     "FTINCL " jcljob
     "FTCLOSE"
     "VGET ZTEMPF"
  /* "EDIT DATASET('"ZTEMPF"')"   [if you want to see what your jcl now looks
like]*/

     ADDRESS TSO "SUBMIT '"ZTEMPF"'"
     "ISPEXEC CONTROL DISPLAY REFRESH"

Your pds member "T0XXX.LIB.JCL(myjob)" or whatever, has your generic jcl (doing
vsam create and repro commands, most likely), and each parameter you want to
change is prefixed by an ampersand - in the example above, the member would
contain &usr, &dt, &tm, and &vsamname. The 'FTINCL' command will change all
those values to whatever you set in your rexx program.

Once you get one working, it should be easy to put the above in a loop, and do
the 600.

I hope this is clear - please ask again if I have left you puzzled.

Ian

Quote:

>  Dear All

> I need to open 600 empty VSAM files (MVS mainframe) and add a dummy record
> to all 600. I am fairly experienced in REXX, but have not done any VSAM work
> in REXX. Can anybody help? Any example would be much appreciated.

> Thanx & a belated happy new year to all

> Amy



Thu, 01 Jul 2004 11:08:48 GMT  
 add dummy record to VSAM (MVS) files
Lessee......   The original post was 17 lines; this one added (maybe)
30.  Why does Agent tell me it's 107 lines?  Could that useless
signature file have tacked on twice as many lines as Ian used to give
his answer?  

On Sat, 12 Jan 2002 22:08:48 -0500, Ian

Quote:

>Amy -

>The easy way is to ...

>Ian


>>  Dear All

>> I need to open 600 empty VSAM files (MVS mainframe) and add a dummy record
>> to all 600. I am fairly experienced in REXX, but have not done any VSAM work
>> in REXX. Can anybody help? Any example would be much appreciated.

>> Thanx & a belated happy new year to all

>> Amy

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn
Join us at www.rexxla.org


Fri, 02 Jul 2004 05:33:13 GMT  
 add dummy record to VSAM (MVS) files


Quote:
>Lessee......   The original post was 17 lines; this one added (maybe)
>30.  Why does Agent tell me it's 107 lines?  Could that useless
>signature file have tacked on twice as many lines as Ian used to give
>his answer?  

He posted using HTML.
Your Agent probably convert it automaticaly to ordinary text, stripped
out of HTM codes.


Fri, 02 Jul 2004 06:59:06 GMT  
 add dummy record to VSAM (MVS) files


Quote:
>  Dear All
> I need to open 600 empty VSAM files (MVS mainframe) and add a dummy
> record to all 600. I am fairly experienced in REXX, but have not done
> any VSAM work in REXX. Can anybody help? Any example would be much
> appreciated.

Is this not a good example of trying to use the wrong tool?  Surely all
that's needed is to repro a file (eg named ONE.RECORD.FILE) containing
only the dummy record to each of the target files.  How about a single
idcams step like:

  //STEP1 EXEC PGM=IDCAMS
  //SYSPRINT DD SYSOUT=*
  //SYSIN DD *
    REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE1)
    REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE2)
    REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE3)
    REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE4)
    REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE5)
    REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE6)

etc etc

--
Jeremy C B Nicoll - my opinions are my own.



Sat, 03 Jul 2004 08:41:14 GMT  
 add dummy record to VSAM (MVS) files
Jeremy

You are absolutely right. I had to go your way eventually. However, this was
only part of the task, & I'd hoped to do it all in one neat exec.

Thanks everyone for all the suggestions. As an almost new user of this
group, it was
heart warming to get all the help

Thanx

Amy



Quote:


> >  Dear All

> > I need to open 600 empty VSAM files (MVS mainframe) and add a dummy
> > record to all 600. I am fairly experienced in REXX, but have not done
> > any VSAM work in REXX. Can anybody help? Any example would be much
> > appreciated.

> Is this not a good example of trying to use the wrong tool?  Surely all
> that's needed is to repro a file (eg named ONE.RECORD.FILE) containing
> only the dummy record to each of the target files.  How about a single
> idcams step like:

>   //STEP1 EXEC PGM=IDCAMS
>   //SYSPRINT DD SYSOUT=*
>   //SYSIN DD *
>     REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE1)
>     REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE2)
>     REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE3)
>     REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE4)
>     REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE5)
>     REPRO IFILE(ONE.RECORD.FILE) OFILE(OUTPUT.FILE6)

> etc etc

> --
> Jeremy C B Nicoll - my opinions are my own.



Sun, 04 Jul 2004 13:17:44 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. MVS/TSO REXX accessing VSAM KSDS Files (?)

2. Record Count On VSAM File Under CICS

3. Trouble accessing records on VSAM file

4. APPC/MVS VSAM data sets

5. Adding a picture to Client File Records

6. MEMO FIELD TO STING: Then add strings as records to item file

7. Automatically adding record to related file in 1-1 relationship

8. Add record from One file to another

9. CW20 add record with data form other file

10. CW20 add record with data form other file

11. TopSpeed File Format ADD() Performance With High Volume Records

12. Adding Child Record to a Child file during Update

 

 
Powered by phpBB® Forum Software