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

How to copy online allocated vsam to qsam


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Manigandan Aravindhan

New User


Joined: 09 Oct 2007
Posts: 81
Location: India

PostPosted: Tue Sep 16, 2008 8:50 pm
Reply with quote

Hi all,
I had used the below command to copy the VSAM in to QSAM.
"REPRO INDATASET('"VSAM-FILE"') OUTDATASET('"QSAM-FILE"')"

But if the VSAM file is allocated in the online region the above command is getting failed by throwing the message that dataset is in use. icon_sad.gif

But im just trying to only take a copy of it.

Is there any other way to copy VSAM in to QSAM even if it allocated in online regions?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Sep 17, 2008 12:06 am
Reply with quote

Hello,

Does your jcl have disp=old? If so, you might try disp=shr.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Sep 17, 2008 3:21 am
Reply with quote

Hi,

I don't work with CICS much, so got a concern here, does this
Quote:
allocated in online regions
really make a difference in working with VSAM ? Please advise.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Sep 17, 2008 7:12 am
Reply with quote

Hi Anuj,

If "something" has disp=old, it has "locked" the dataset. Nothing special about vsam and cics that i'm aware of.

This is similar to the "dataset in use" that happens fairly often in tso/ispf.
Back to top
View user's profile Send private message
Manigandan Aravindhan

New User


Joined: 09 Oct 2007
Posts: 81
Location: India

PostPosted: Wed Sep 17, 2008 3:05 pm
Reply with quote

Hi Dick,
Thanks for your response.. icon_smile.gif

The same VSAM file i can copy through Fileaid tool. But if try to repro it using the REXX it is throwing the message that file in use. Is there any other way to copy the VSAM using REXX?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Sep 17, 2008 4:02 pm
Reply with quote

Hi,

try using
Code:
  REPRO INFILE(FILEIN) OUTFILE(FILEOUT)


When using INDATASET I'm pretty sure it wants exclusive access to the file.


Don't forget you now need to add the 2 DD names to the JCL

//FILEIN DD DSN=input file
//FILEOUT DD DSN=output file

Gerry
Back to top
View user's profile Send private message
Manigandan Aravindhan

New User


Joined: 09 Oct 2007
Posts: 81
Location: India

PostPosted: Wed Sep 17, 2008 4:10 pm
Reply with quote

Thanks Gcicchet,
Is there anyway to do this without JCL....??
Back to top
View user's profile Send private message
Manigandan Aravindhan

New User


Joined: 09 Oct 2007
Posts: 81
Location: India

PostPosted: Wed Sep 17, 2008 4:15 pm
Reply with quote

Note: The command "REPRO INDATASET('"VSAM-FILE"') OUTDATASET('"QSAM-FILE"')" i didnt used it in JCl....I used it in REXX without the help of JCL.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Sep 17, 2008 4:51 pm
Reply with quote

gcicchet wrote:
When using INDATASET I'm pretty sure it wants exclusive access to the file.


Gerry, you're right. I just double-checked with the IDCAMS manual.

Quote:

INDATASET(entryname)
specifies the name of the entry to be copied or user catalog to be merged. If INDATASET is specified, the entryname is dynamically allocated with a disposition of OLD.


Manigandan Aravindhan, it appears that you'll have to allocate VSAM-FILE so you can specify a disposition of SHR, and then use INFILE instead of INDATASET.
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Sat Oct 04, 2008 10:35 pm
Reply with quote

Hi all,

You people might have heard about SYSB utility which is used to repro a VSAM file when it is being used in CICS region.
I'hv done it somedays back but i dont remember its actual syntax.
in that we need to give region name and some other info.

Please correct me if i'm wrong.

Thanks n Regards,
ajay
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Oct 05, 2008 12:29 am
Reply with quote

Hello,

Do you have a question?

It is not clear if you are looking for something or are just mentioning some site-specific utility?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Oct 05, 2008 1:22 am
Reply with quote

Hi Dick,

I was also curious about that (SYSB utility )..it seems to be a third party tool rather..

www.hwcs.com/software/specifications/sysb.asp

I didn't dig much though as I dont' work on CICS.
Back to top
View user's profile Send private message
aparicio esteves

New User


Joined: 17 Sep 2008
Posts: 4
Location: Lisbon

PostPosted: Sun Oct 05, 2008 2:47 am
Reply with quote

I think that you must close the vsam file in CICS, because I remember doing this 10 years ago, when we need to access the same vsam file outside CICS region.

The comand to do this is:

Code:

CEMT I FILE (FIAVMNT)



Where FIAVMNT is the name that is associated with the DSName that you want to access

Or if you don't know the external name you could put an * between () and look for the pair of lines that contains the DSName of the file that you want

Then in the statement below you must override Ope with Clo and Ena with Dis and press Enter

Code:

I FILE (FIAVMNT)                                           
STATUS:  RESULTS - OVERTYPE TO MODIFY                     
 Fil(FIAVMNT ) Vsa Ope Ena Rea Upd Add Bro Del     Sha     
        Dsn( XXXX.YYYYST.FIAVMNT                            )
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Oct 05, 2008 4:47 am
Reply with quote

Hello,

Earlier in this topic, Gerry posted a way to do this without closing the file. . .
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Tue Oct 07, 2008 1:01 pm
Reply with quote

Hi all,
following is the syntax of SYSB utility

SUBSYS=(SYSB,'CICS=CICSREGION','FCT=FCTENTRYNAME',
HPO,'STATUS=CE','BUFFER=AUTO','SYNC=900')

this i have got, check will it work or not.

Thanks,
Ajay
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Allocated cylinders of a dataset DB2 12
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
Search our Forums:

Back to Top