How to copy data from VSAM to PS ?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to copy data from VSAM to PS ?

Postby gauthamnagpur18 » Sat Sep 10, 2011 8:29 am

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 .
gauthamnagpur18
 
Posts: 93
Joined: Sat Oct 23, 2010 1:28 pm
Location: Chennai, India
Has thanked: 3 times
Been thanked: 2 times

Re: How to copy data from VSAM to PS ?

 

Re: How to copy data from VSAM to PS ?

Postby gauthamnagpur18 » Sat Sep 10, 2011 9:19 am

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:
gauthamnagpur18
 
Posts: 93
Joined: Sat Oct 23, 2010 1:28 pm
Location: Chennai, India
Has thanked: 3 times
Been thanked: 2 times

Re: How to copy data from VSAM to PS ?

Postby dick scherrer » Sat Sep 10, 2011 9:42 am

Hello,

Why does the output dataset have no blksize / lrecl? It should be allocated with the proper attributes. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: How to copy data from VSAM to PS ?

Postby MrSpock » Sat Sep 10, 2011 7:33 pm

I still can't figure out why shops don't prefer to use their SORT product instead of IDCAMS REPRO?
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: How to copy data from VSAM to PS ?

Postby gauthamnagpur18 » Sun Sep 11, 2011 1:33 pm

Hi MrSpock ,

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

Thanks,
Gautham
gauthamnagpur18
 
Posts: 93
Joined: Sat Oct 23, 2010 1:28 pm
Location: Chennai, India
Has thanked: 3 times
Been thanked: 2 times

Re: How to copy data from VSAM to PS ?

Postby enrico-sorichetti » Sun Sep 11, 2011 1:36 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: How to copy data from VSAM to PS ?

Postby dick scherrer » Mon Sep 12, 2011 12:04 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: How to copy data from VSAM to PS ?

Postby steve-myers » Mon Sep 12, 2011 9:20 am

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.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: How to copy data from VSAM to PS ?

Postby dick scherrer » Mon Sep 12, 2011 9:43 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: How to copy data from VSAM to PS ?

Postby mongan » Mon Sep 12, 2011 11:53 am

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.
User avatar
mongan
 
Posts: 212
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post