View previous topic :: View next topic
|
Author |
Message |
Lord.of.Wind
New User
Joined: 17 Nov 2005 Posts: 60
|
|
|
|
Hi, anybody could help me on this? Thank you so much!
PS layout:
field 1 (will be the key of vsam)
field 2
...
field n
VSAM layout:
field 1 (the key)
field 2
...
field n |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
What is the record length, and what is the definition of the Key field?
Dave |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
And the location of the Key field in the record |
|
Back to top |
|
|
Lord.of.Wind
New User
Joined: 17 Nov 2005 Posts: 60
|
|
|
|
Appriciate your reply, thank you!
01 RMRELN-REC.
05 OUT7-CUSTNUMB PIC 9(09).
05 OUT7-RELN-NUMB PIC 9(09).
05 OUT7-PP-ACCTNUMB PIC X(20).
05 OUT7-PP-PRODTYPE PIC X(05).
OUT7-CUSTNUMB is the key. Total length is 43. |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi,
You can use IDCAMS to convert (rather copy) a sequential file to VSAM KSDS cluster.
One way to do that is to write DELETE, DEFINE CLUSTER and REPRO steps in your JCL.
1. delete if cluster exists.
2. Define a new cluster with record length and keys information.
3. copy from PS file to newly defined KSDS cluster in 2nd step.
Thanks,
Parikshit |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
Supply you job card, file name and PS file name in the following JCL and execute., let me know if you have any problem.
SUPPLY YOUR JOBCARD HERE
//DDACTMST EXEC PGM=IDCAMS
//SYSIN DD *
DELETE FILE NAME SCRATCH
SET MAXCC=00
DEFINE CLUSTER-
(NAME(FILE NAME)-
FREESPACE(0 5)-
INDEXED-
KEYS(9 0)-
RECORDSIZE(43 43)-
SPEED-
DATACLAS(VSAMNOCP) -
SHAREOPTIONS(2 3)-
CYL (5 5)-
NONSPANNED)-
DATA-
(NAME(FILE NAME.DATA)-
CONTROLINTERVALSIZE(4096))-
INDEX-
(NAME(FILE NAME.INDEX)-
CONTROLINTERVALSIZE(1024))
/*
//REPRO1 EXEC PGM=IDCAMS
//SYSUT1 DD DSN=PS NAME,DISP=SHR
//SYSUT2 DD DSN=FILE NAME,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(SYSUT1) OUTFILE(SYSUT2)
/* |
|
Back to top |
|
|
rdr
New User
Joined: 26 May 2006 Posts: 35 Location: india
|
|
|
|
Hi,
We can use SORT utility to achive the same.
In sort input is flat file,
output is vsam file,
Options are --
Copy,
Sum feilds = none, to eliminate the duplicate, if any....
Correct me if I am wrong... |
|
Back to top |
|
|
|