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

JCL Code to tranfer code from VSAM to PS File


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shahab_alam_2000

New User


Joined: 20 Oct 2005
Posts: 3
Location: Mumbai

PostPosted: Tue Oct 25, 2005 11:46 am
Reply with quote

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
View user's profile Send private message
Ravi gaur

New User


Joined: 12 Jul 2005
Posts: 38

PostPosted: Tue Oct 25, 2005 2:39 pm
Reply with quote

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
View user's profile Send private message
Ravi gaur

New User


Joined: 12 Jul 2005
Posts: 38

PostPosted: Tue Oct 25, 2005 2:48 pm
Reply with quote

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
View user's profile Send private message
spanda

New User


Joined: 31 Aug 2005
Posts: 48
Location: U.K.

PostPosted: Tue Oct 25, 2005 3:20 pm
Reply with quote

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
View user's profile Send private message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Tue Oct 25, 2005 3:41 pm
Reply with quote

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
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts IGYPG3178-I when compiling a pgm read... COBOL Programming 6
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
Search our Forums:


Back to Top