MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
dragone_007 Beginner Joined: 18 Mar 2008 Posts: 24 Topics: 6
Posted: Thu Apr 02, 2009 6:52 am Post subject: Copy VSAM to VSAM help !
Hello,
I've tryed the following JCL for creating and copying into a VSAM file the content of another VSAM:
Code:
//VSAMDEF$ JOB 'A-ASSI-SPG-AS-C',REGION=0M,CLASS=4,MSGLEVEL=(1,1),
// MSGCLASS=Y,NOTIFY=&SYSUID
//*--------------------------------------------------------------------*
//DEFINE EXEC PGM=IDCAMS
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TASV.TAA03MA1.NEWRE.PTADPORT CLUSTER PURGE
SET MAXCC=0
DEFINE CLUSTER (NAME(TASV.TAA03MA1.NEWRE.PTADPORT) -
RECSZ(15 25) -
REC(100) -
KEYS(17 1) -
SHR(1 3) -
CISZ(4089) -
FREESPACE(5 5) -
INDEXED) -
DATA (NAME(TASV.TAA03MA1.NEWRE.PTADPORT.DATA)) -
INDEX (NAME(TASV.TAA03MA1.NEWRE.PTADPORT.INDEX))
//*--------------------------------------------------------------------*
//* COPIA CONTENUTO FILE VIA SORT *
//*--------------------------------------------------------------------*
//COPYVSAM EXEC PGM=SORT,COND=(4,LE)
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DFSPARM DD *
OPTION VSAMIO,NULLOUT=RC4,DYNALLOC
//SORTIN DD DSN=PASV.TAA03MA1.S0010X.PTADPORT,DISP=SHR
//SORTOUT DD DSN=TASV.TAA03MA1.NEWRE.PTADPORT,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
RECORD TYPE=V
and I'm getting RC=16 as below:
Code:
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 13:49 ON THU APR
OPTION VSAMIO,NULLOUT=RC4,DYNALLOC
ICE140I 0 END OF PARAMETERS FROM DFSPARM - SYSIN OR SORTCNTL/PARAMETER LIST CON
SORT FIELDS=COPY
RECORD TYPE=V
ICE201I 0 RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE751I 0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 EE-BASE E9-K06751 C9-BASE
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 VSAMDEF$.COPYVSAM. , INPUT LRECL = 3924, BLKSIZE = 8192, TYPE =
ICE093I 0 MAIN STORAGE = (MAX,4194304,4194304)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (4136944,4136944)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=4194304,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=4194304,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=100 ,DSPSIZE=100 ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
ICE235I 0 OPTIONS: NULLOUT=RC4
ICE084I 1 VSAM ACCESS METHOD USED FOR SORTOUT
ICE084I 1 VSAM ACCESS METHOD USED FOR SORTIN
ICE217A 0 924 BYTE VARIABLE RECORD IS LONGER THAN 29 BYTE MAXIMUM FOR SORTOUT
ICE751I 1 EF-K10929 F0-Q84357 E8-K90000
ICE052I 0 END OF DFSORT
can anyone help me out with this ? Thanks a lot guys
Denis
Back to top
dbzTHEdinosauer Supermod Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Thu Apr 02, 2009 7:14 am Post subject:
RECSZ(15 25)
ICE217A 0 924 BYTE VARIABLE RECORD IS LONGER THAN 29 BYTE MAXIMUM FOR SORTOUT _________________ Dick Brenholtz
American living in Varel, Germany
Back to top
dragone_007 Beginner Joined: 18 Mar 2008 Posts: 24 Topics: 6
Posted: Thu Apr 02, 2009 7:58 am Post subject:
Thanks a lot Mr.Brenholtz,
How can I set correctly RECSZ in order to have 924 byte variable record for SORTOUT which is now defined as RECSZ(15 25) ? Thank a lot for your time.
Best regards
Denis
Back to top
dbzTHEdinosauer Supermod Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Thu Apr 02, 2009 8:05 am Post subject:
i would suggest determining the RECSZ of your input vsam file
and use that to define your output vsam file. _________________ Dick Brenholtz
American living in Varel, Germany
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Apr 02, 2009 10:35 am Post subject:
dragone_007 ,
You are defining the cluster in the first step to have an max of 29. (Look at the RECSZ parameter in your define cluster statement) And you are trying to copy a variable vsam cluster which has a min record length of 924 bytes and max is 3924
Change your RECSZ parm to
I coded the min to be 17 because that is the length of your KEY. _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
RonB Beginner Joined: 02 Dec 2002 Posts: 93 Topics: 0 Location: Orlando, FL
Posted: Thu Apr 02, 2009 12:40 pm Post subject:
Not to be too technical, but if the key length is 17, the the min recsz should be 18 - that is, if the original declaration is correct, and the key really does start in position 1 ( which is really the 2nd byte of the record, since key offsets are stated relative to 0 ). But I'll bet it really should start in position zero.
Better than all of the above, why not just allocate the cluster using a MODEL, then all you need to supply is the target name, space parameter, and model name:
Code: DEFINE CLUSTER(NAME(TASV.TAA03MA1.NEWRE.PTADPORT) -
REC(100) -
MODEL(PASV.TAA03MA1.S0010X.PTADPORT))
_________________ A computer once beat me at chess, but it was no match for me at kick boxing.
Back to top
taltyman JCL Forum Moderator Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
Posted: Thu Apr 02, 2009 6:30 pm Post subject:
Why not use dssdump/dssrest and let it do all the heavy lifting?
Back to top
dragone_007 Beginner Joined: 18 Mar 2008 Posts: 24 Topics: 6
Posted: Fri Apr 03, 2009 6:44 am Post subject:
Hello,
Thanks to everyone for their effort. I found the solution using SORT like this:
Code:
//COPYVSAM EXEC PGM=SORT,COND=(4,LE)
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DFSPARM DD *
OPTION VSAMIO,NULLOUT=RC4,DYNALLOC
//SORTIN DD DSN=PASV.TAA03MA1.S0010X.PTADPORT,DISP=SHR
//SORTOUT DD DSN=TASV.TAA03MA1.NEWRE.PTADPORT,DISP=(,CATLG,DELETE),
// RECORG=KS,KEYLEN=17,KEYOFF=1,LRECL=3920,
// SPACE=(CYL,(25,250),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
RECORD TYPE=V
and it worked fine. Now I have the COPY of the first VSAM into another one. Thanks again to all
Regards
Denis
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum