How to access a VSAM?



IBM's Command List programming language & Restructured Extended Executor

Re: How to access a VSAM?

Postby Jikesh Patel » Thu Dec 03, 2009 3:14 pm

Thanks dick,

Its a good suggestion.
what I have thought to create an rexx utility is:
1) I will read an input file(which contains the vsam file names to be dump).
2) I will copy the content of this vsam file(which read from above step) to flat file(temp file).
3) I will read an output file(which contains the vsam file names which are to be created).
4) I will create this vsam file(which read from above step) with the same attribute to the vsam file read from input file.
5) I will copy the content of temp file created from step 2 to the new vsam file.

I have done above utility for flat and gdg ver files and the results are coming good.

Does my approach will work?

Thanks expat,
expat wrote:And it is untrue that you would need to run a Batch Job (NOT JCL) for every VSAM file.

Have you not looked at DFdss or even better if it is installed, FAVER.

You use ONE job to dump on the prod LPAR and ONE job to restore on the other LPAR


No I don't know about DFdss or FAVER.
Can you please tell me whats it? And how do I take benefit of it?

Thanks for all your kind help. :)
Jikesh Patel
 
Posts: 23
Joined: Mon Apr 06, 2009 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to access a VSAM?

Postby dick scherrer » Fri Dec 04, 2009 7:09 am

Hello,

Suggest you talk with your storage management people - DFDSS is on your system. FAVER may or may not be, but the storage management people would know.

DFDSS would let you backup (dump) many files in many formats and then this could be restored on a target syste. During the restore, the target files could be renamed to new names.

The process you mention could work, but would take more effort and machine resources. DFDSS will run much faster than multiple individual copy jobs/steps.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to access a VSAM?

Postby Jikesh Patel » Tue Dec 08, 2009 11:53 am

Thanks dick,

That would help me a lot.

But I never worked or get in hear for DFDSS or FAVER.
dick scherrer wrote:DFDSS would let you backup (dump) many files in many formats and then this could be restored on a target syste. During the restore, the target files could be renamed to new names.

Can you please give me hint or an example that how do I get started dumping from VSAM files.

Thank you very much for all your kind help. :)
Jikesh Patel
 
Posts: 23
Joined: Mon Apr 06, 2009 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to access a VSAM?

Postby expat » Tue Dec 08, 2009 1:29 pm

Click HERE to view the DFdss reference guide.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: How to access a VSAM?

Postby Jikesh Patel » Wed Dec 09, 2009 7:46 pm

Thanks expat,

It helped me a lot.

Now I can copy VSAM dataset without using intermediate flat file. I worte a jcl to copy a VSAM dataset with same attribute to new VSAM dataset.
//jdpatel  JOB (Jdpatel),'DFDSS',MSGCLASS=X,                   
//             MSGLEVEL=(1,1),CLASS=S,NOTIFY=&SYSUID                 
//COPYSTEP  EXEC PGM=ADRDSSU                                         
//SYSPRINT  DD SYSOUT=*                                             
//SYSIN     DD *                                                     
  COPY DATASET(INCLUDE(vsam-dataset))-                   
       RENAMEU((vsam-dataset, vsam-dataset1)) -
       SHARE                                                         
/*                                                                   
//*                                                                 

This will create a new vsam-dataset1 with a same data and attirbute used in vsam-dataset.
It will copy whole vsam cluster that means it copies data as well as index part.
But I am wondering if a vsam dataset will have an alternate index then we have to copy both vsam and alternate clusters but how about path which were there between original vsam and alternate clusters? Do we need to build separately for copied vsam and alternate clusters?

Thanks again dick and expat.
Thanks a lot for all your kind help. :)
Jikesh Patel
 
Posts: 23
Joined: Mon Apr 06, 2009 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to access a VSAM?

Postby expat » Wed Dec 09, 2009 8:40 pm

Look at the SPHERE keyword in the Dfdss reference materials.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: How to access a VSAM?

Postby Jikesh Patel » Wed Dec 09, 2009 10:13 pm

Thanks expat for very quick reply,

I have runned one job:
COPY DATASET(INCLUDE(input-vsam))-                     
     RENAMEU((input-vsam, output-vsam))-  --> output-vsam is exist and I am going to replace it.
     REPLACEU -                                                     
     SHARE                                                         

but it failed with return code 8 and an error message as:
ADR412E (001)-DYNA (02), DATA SET input-vsam COMPONENT input-vsam.DATA IN CATALOG CATALOG.VCENT00 ON VOLUME DQLTJ5 FAILED SERIALIZATION

Can you please help me in this problem.

thank you. :)
Jikesh Patel
 
Posts: 23
Joined: Mon Apr 06, 2009 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to access a VSAM?

Postby dick scherrer » Thu Dec 10, 2009 2:41 am

Hello,

Someone/something had the dataset allocated.

From the documentation - the bolding is mine. . .
ADR412E (ttt)-mmmmm(yy), DATA SET {dsname |
cluster_name COMPONENT
component_name} [IN CATALOG
catalog_name] ON VOLUME
volume_serial_number FAILED
SERIALIZATION
Explanation: An ENQ(EXCLUSIVE), ENQ(SHARE), or
dynamic allocation with DISP=OLD or SHR failed after a
specified (or defaulted) number of retries.
TOLERATE(ENQF) was not specified by the user, or the
user specified an operation that does not allow
TOL(ENQF). TOL(ENQF) is ignored for logical
processing of an HFS data set. This message is
received for an HFS data set if the data set cannot be
enqueued and is ineligible for quiesce. An HFS data set
is ineligible for quiesce if any of the following is true:
v UNIX System Services is unavailable.
v The data set is unmounted.
v The data set is a target data set.
System Action: The data set is not processed. The
return code is 8.
Operator Response: None.
Application Programmer Response: Rerun the job
when the data set is not in use by other users.
You can
increase the WAIT parameters, and if you are not using
the COMPRESS command to compress a PDS, you
can specify TOL(ENQF).
Source: DFSMSdss
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to access a VSAM?

Postby Jikesh Patel » Fri Dec 11, 2009 2:46 pm

Thanks Dick,

I have tried it copying couple of times but it fails with return code 8 with the same reason.

Then i tried copying with fileaid and it copied that file successfully. and there were total 13378154 records.
I don't understand why DFDSS and IDCAMS fails to copy that vsam dataset and fileaid did it? :(

Thank you. :)
Jikesh Patel
 
Posts: 23
Joined: Mon Apr 06, 2009 12:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to access a VSAM?

Postby dick scherrer » Sat Dec 12, 2009 12:45 am

You're welcome :)

Possibly because fileaid had it allocated preventing the others from running. . .

Possibly because cics or some other process had it allocated for the early attempts and the fileaid copy was done when whatever process ended. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

PreviousNext

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post