|
|
| Author |
Message |
shahab_alam_2000
New User
Joined: 20 Oct 2005 Posts: 3 Location: Mumbai
|
|
|
|
| Can anyone of u reply me with the code of JCL that transfer the data from a VSAM file to a Sequential File . |
|
| Back to top |
|
 |
References
|
|
 |
Ravi gaur
New User
Joined: 12 Jul 2005 Posts: 44
|
|
|
|
Hi Shahab,
I don't know what you mean by transfer ,However using EXPORT we can create a copy of the VSAM File .But the thing is the sequential dataset(called backup) would be in the VBS Format so u would not be able to read.. However if using 3.4 and in front of the Backup dataset you execute ERBSCAN Utility you would be able to see the records of the dataset...
Attaching here the JCL for the same.
//CS00688A JOB ACCOUNT,'OSG',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//STEP1 EXEC PGM=IDCAMS
//RECEIVE DD DSNAME=CS00688.EXPORT,UNIT=3390,
// DISP=(,KEEP),SPACE=(CYL,(2,2),RLSE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
EXPORT -
CS00688.COB.VSAM -
OUTFILE(RECEIVE) -
TEMPORARY -
INHIBITSOURCE
/*
If you require anything else let me know.... |
|
| Back to top |
|
 |
Ravi gaur
New User
Joined: 12 Jul 2005 Posts: 44
|
|
|
|
More to the above.
If you want to change the VBS format to the FB format use the IEBPTPCH utility.
//CS00688A JOB ACCOUNT,'OSG',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*******************************************************************/
//*
//* SORT PRODUCT CAN COPE WITH VARIABLE INPUT AND FIXED OUTPUT, SO
//* IEBPTPCH COPIES THE DATA TO FIXED BLOCKED.
//********************************************************************/
//IEBPT EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=CS00688.EXPORT,DISP=SHR,
// DCB=(RECFM=VBS,LRECL=424,BLKSIZE=27998)
//SYSUT2 DD DSN=CS00688.EXPORT1,DISP=SHR
//* DCB=(RECFM=FBA,LRECL=137,BLKSIZE=0)
//SYSIN DD *
PRINT TYPORG=PS,PREFORM=A |
|
| Back to top |
|
 |
spanda
New User
Joined: 31 Aug 2005 Posts: 49 Location: U.K.
|
|
|
|
If by 'transfer' you mean copying the data to a PS file, then you can do that by an IDCAMS REPRO. If you have never used IDCAMS before, then here's a sample JCL. You may use this to copy VB VSAM files also. But then, the LRECL will be equal to the longest record on the VSAM file and the RECFM will be VB (obviously).
//REPR1 EXEC PGM=IDCAMS
//INDD DD DSN=MY.VSAM.FILE,DISP=SHR
//OUTDD DD DSN=MY.PS.FILE,
// DCB=(BLKSIZE=2500,LRECL=25,RECFM=FB),
// UNIT=DISK,DISP=(,CATLG,DELETE),SPACE=(CYL,(10,5),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(INDD) OUTFILE(OUTDD)
/*
Hope this helps.
Panda. |
|
| Back to top |
|
 |
ikumar
Active User
Joined: 02 Aug 2005 Posts: 86
|
|
|
|
to copy the data from VSAM file to sequential file, you can use REPRO...search the forum for the syntax...
Use REPRO in SYSIN statement of the JCL...
REPRO INFILE(VSAM-file) OUTFILE(PS-file)
Cheers,
Kumar. |
|
| Back to top |
|
 |
|
|
|