Page 1 of 2

How to copy data from VSAM to PS ?

PostPosted: Sat Sep 10, 2011 8:29 am
by gauthamnagpur18
Hi ,

I am getting following error :

REPRO IFILE(DD1) OFILE(DD2) REUSE -
FROMKEY(GFPCMM00420135) TOKEY(GFPCMM00420135)

IDC3302I ACTION ERROR ON TEST.LOAD.FILE
IDC3309I ** RECORD X'C7C6D7C3D4' NOT WRITTEN. LENGTH INVALID

IDC3302I ACTION ERROR ON TEST.LOAD.FILE
IDC3309I ** RECORD X'C7C6D7C3D4' NOT WRITTEN. LENGTH INVALID

IDC3302I ACTION ERROR ON TEST.LOAD.FILE
IDC3309I ** RECORD X'C7C6D7C3D4' NOT WRITTEN. LENGTH INVALID

IDC3302I ACTION ERROR ON TEST.LOAD.FILE
IDC3309I ** RECORD X'C7C6D7C3D4' NOT WRITTEN. LENGTH INVALID


Jcl :

//STEP03   EXEC PGM=IDCAMS                                       
//NFASTVSM    DD  DUMMY                                           
//SYSPRINT DD SYSOUT=*                                           
//IAMINFO  DD SYSOUT=*                                           
//IAMDEBUG DD DUMMY                                               
//SYSABEND DD SYSOUT=*                                           
//DD1      DD DSN=TEST.ABB.CLUSTER,DISP=SHR     
//DD2      DD DSN=TEST.LOAD.FILE,DISP=SHR     
//SYSIN   dd *
REPRO IFILE(DD1) OFILE(DD2) REUSE -         
FROMKEY(GFPCMM00420135) TOKEY(GFPCMM00420135)
//*               



My requirement is to copy the data from VSAM cluster to PS file . Could you please help me out .

Re: How to copy data from VSAM to PS ?

PostPosted: Sat Sep 10, 2011 9:19 am
by gauthamnagpur18
Parameters Info :

Organization: SEQUENTIAL
Record format:
Option code: NONE
Key length: 0
Record length: 0
Block size: 0
1st extent tracks: 1
Secondary tracks: 640
Dataset name type:

Re: How to copy data from VSAM to PS ?

PostPosted: Sat Sep 10, 2011 9:42 am
by dick scherrer
Hello,

Why does the output dataset have no blksize / lrecl? It should be allocated with the proper attributes. . .

Re: How to copy data from VSAM to PS ?

PostPosted: Sat Sep 10, 2011 7:33 pm
by MrSpock
I still can't figure out why shops don't prefer to use their SORT product instead of IDCAMS REPRO?

Re: How to copy data from VSAM to PS ?

PostPosted: Sun Sep 11, 2011 1:33 pm
by gauthamnagpur18
Hi MrSpock ,

Do you know how to copy thru sort ? Could you please help me . :roll:

Thanks,
Gautham

Re: How to copy data from VSAM to PS ?

PostPosted: Sun Sep 11, 2011 1:36 pm
by enrico-sorichetti
what about doing a bit of research and manual reading Yourself !

if there is something You do not understand
it will be enough to post/quote/link the offending sentence[s]
and somebody will be happy to explain it

Re: How to copy data from VSAM to PS ?

PostPosted: Mon Sep 12, 2011 12:04 am
by dick scherrer
Hello,

In the manual, read about SORT FIELDS=COPY. SORTIN will be your VSAM file; SORTOUT will be the sequential file you want to create.

As Enrico suggests - if you find something that is not clear, post what you found and your doubt. Someone will be able to clarify.

Re: How to copy data from VSAM to PS ?

PostPosted: Mon Sep 12, 2011 9:20 am
by steve-myers
Just a comment here. It's all well and good to say, "Use sort to perform the copy," but we do not know what sort product is installed at the IP's site, so we can't reliably say how it's to be done. I know DFSORT and Syncsort both provide a fast copy. but they aren't all of the sort products, and I'd bet not all of them provide a copy capability.

Another possible issue here is I think most of us agree the copy failed because the IP did not provide DCB attributes for the output dataset, but no one offered comments about appropriate values, though this was partly dictated by the IP's failure to discuss the intended use of the output dataset, which factors into appropriate DCB attributes. No one asked the IP for clarification about this issue.

Re: How to copy data from VSAM to PS ?

PostPosted: Mon Sep 12, 2011 9:43 am
by dick scherrer
Hi Steve,

but we do not know what sort product is installed at the IP's site, so we can't reliably say how it's to be done.
As far as i know (or remember) the bit of gtuidance i provided works with the 3 main mainframe sort products (DFSORT. Syncsort, and CA-Sort - been quite a while since i had a client using CA-Sort<g>).

I did not address the fix to the idcams job (i did mention what was wrong, just not specific directions to fix it) as i believe this is no longer a good alternative. If something is already running, fine, but i believe whatever sort product is in use is a better choice these days.

Re: How to copy data from VSAM to PS ?

PostPosted: Mon Sep 12, 2011 11:53 am
by mongan
Steve, how can you make a suggestion for the output data set without seeing the values for the input data set? This could very well be a variable record Vsam data set. So, gauthamnagpur18 needs to post information about the input data set and the way he allocated the output data set, which was preallocated previously.