View previous topic :: View next topic
|
Author |
Message |
Lord.of.Wind
New User
Joined: 17 Nov 2005 Posts: 60
|
|
|
|
Hi, all:
What to be done if I want to convert a PS file into a VSAM file?
Given:
PS file's length is 1000, its record layout is below:
RMRELN-REC.
05 OUT7-CUSTNUMB PIC 9(09). <--- It will be the the key of the VSAM
05 OUT7-RELN-NUMB PIC 9(09).
05 OUT7-PP-ACCTNUMB PIC X(20).
05 OUT7-PP-PRODTYPE PIC X(05).
...
The VSAM file's length is also 1000 with the same layout of the PS file.
Many thanks! |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi,
You can use following code to copy PS file into VSAM cluster.
I assume that the vsam cluster is allocated prior to copy.
Code: |
000047 //*********************************************************************
000048 //** copy FLAT FILE INTO VSAM FILE
000049 //*********************************************************************
000050 //STEP040 EXEC PGM=IDCAMS
000051 //IN01 DD DSN=ABCD.EFGH.IJKLMN,DISP=SHR <== PS FILE
000052 //OUT01 DD DSN=ABCD.EFGH.IJKLMN.VSAM,DISP=OLD <== VSAM FILE
000056 //SYSPRINT DD SYSOUT=*
000057 //SYSOUT DD SYSOUT=*
000058 //SYSIN DD *
000058 REPRO INFILE(IN01) OUTFILE(OUT01) REUSE
000058 /*
|
|
|
Back to top |
|
|
|