View previous topic :: View next topic
|
Author |
Message |
ursvmg
New User
Joined: 24 May 2007 Posts: 52 Location: Chennai
|
|
|
|
Hi All,
I have allocated a VSAM cluster and i want to load data in to that....
Quote: |
Can anyone please tell me what are all the possible ways that one can load data in to the VSAM cluster. |
In my case, i want to use this VSAM file in a cobol pgm, which is required to add, modify, delete recs from that VSAM file.
This is the layout for that VSAM file..
EMP NUMBER NUMERIC 6
EMP NAME ALPHATIC 30
DESIGNATION CODE NUMERIC 2
PROJECT CODE NUMERIC 2
BASIC PAY NUMBERIC 6
Quote: |
Note EMP NUMBER is the primary key |
How to make this primary key ??
Can anyone please help me in this? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Gopal,
Quote: |
Can anyone please tell me what are all the possible ways that one can load data in to the VSAM cluster. |
Utils like IDCAMS, SORT and Programs.
Quote: |
How to make this primary key ?? |
Use KSDS cluster. |
|
Back to top |
|
|
ursvmg
New User
Joined: 24 May 2007 Posts: 52 Location: Chennai
|
|
|
|
Hello murmohk1,
Can you please tell me more abt this??
Thank you, |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Gopal,
Quote: |
Can you please tell me more abt this?? |
I believe, this is the BEST TIME (for you) to refer some manual. |
|
Back to top |
|
|
ursvmg
New User
Joined: 24 May 2007 Posts: 52 Location: Chennai
|
|
|
|
Thanks for ur assistance!!!!
Will refer some manual....!!!! |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi,
To load the VSAM data set, you can use REPRO command, for this you have to create sequential dataset of same field length and name and use REPRO-COPY command it will loads the VSAM dataset.........
Regard's
Vasanth......... |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Vasanth,
Quote: |
you have to create sequential dataset of same field length and name and use REPRO-COPY command it will loads the VSAM dataset......... |
Why do you need same name? Also where can I get REPRO-COPY command syntax. |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi Murli,
You can use this syntax in JCL
//SYSIN DD *
REPRO-
COPY-
INDATASET("SEQUENTIAL DATASET NAME")- [this data set contains the records to be loaded in to the VSAM data set)
OUTDATASET("VSAM DATASET NAME")-
/*
Regard's
Vasanth...... |
|
Back to top |
|
|
revel
Active User
Joined: 05 Apr 2005 Posts: 135 Location: Bangalore/Chennai-INDIA
|
|
|
|
murmohk1 wrote: |
Vasanth,
Quote: |
you have to create sequential dataset of same field length and name and use REPRO-COPY command it will loads the VSAM dataset......... |
Why do you need same name? Also where can I get REPRO-COPY command syntax. |
Hi murmohk1
REPRO command is one of the option under IDCAMS utility
you can use this way
---------------------------------------------
//KSDLOAD1 JOB (A123), 'raghu'
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//DDIN DD DSN=FILE1.TEST,DISP=SHR
//DDOUT DD DSN=VSAM1.KSDS.CLUSTER,DISP=OLD
//SYSIN DD *
REPRO -
INFILE (DDIN) -
OUTFILE (DDOUT)
/*
//
On execution, It will load information which is present in DDIN(ie DATA SET FILE1.TEST ) to DDOUT(ie VSAM1.KSDS.CLUSTER)
Only pre requist is that FILE1.TEST should be arranged on ascending order about the field which is defined as primary key in KSDS while allocation
Raghav |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi Revel,
Thanks for your sugsesstion too..
Regard's
Vasanth........ |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Vasanth,
Try your card and let us know the return code.
Raghav,
Thanks for the info. But I suggest you to go thru the manuals for the prerequistes (as said by you). |
|
Back to top |
|
|
revel
Active User
Joined: 05 Apr 2005 Posts: 135 Location: Bangalore/Chennai-INDIA
|
|
|
|
ursvmg wrote: |
Hi All,
I have allocated a VSAM cluster and i want to load data in to that....
Quote: |
Can anyone please tell me what are all the possible ways that one can load data in to the VSAM cluster. |
In my case, i want to use this VSAM file in a cobol pgm, which is required to add, modify, delete recs from that VSAM file.
This is the layout for that VSAM file..
EMP NUMBER NUMERIC 6
EMP NAME ALPHATIC 30
DESIGNATION CODE NUMERIC 2
PROJECT CODE NUMERIC 2
BASIC PAY NUMBERIC 6
Quote: |
Note EMP NUMBER is the primary key |
How to make this primary key ??
Can anyone please help me in this? |
--------------------------------------------------------------
Hi ursvmg,
You can define EMP NUMBER as primary key while allocation data self itself
find below for sample KSDS cluster allocation
-------------------------------------------------
//EXMPL1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER /* DEFINE A CLUSTER */ -
(
NAME (KSDS Cluster name) /* CLUSTER NAME */ -
VOLUMES (ACA302) /* CLUSTER IS ON ACA302 */ -
CISZ(4096) /* control interval size */ -
TRACKS(2,1) /* SPECIFYING SIZE */-
RECORD SIZE (80 80) /* this is the record size in KSDS cluster / -
KEYS(6,0) /* FOR DECLARING KEYS */ -
INDEXED) /* CLUSTER IS KSDS */
/*
//
----------------------------------------------------------------------
For loading into KSDS cluster, use a code which gaven in previous mail
raghav |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi Murali,
I worked on VSAM, and i tested the card i gave you u just check it out,
it gave me zero error
Please go through manual before sending any mails
Vasanth |
|
Back to top |
|
|
revel
Active User
Joined: 05 Apr 2005 Posts: 135 Location: Bangalore/Chennai-INDIA
|
|
|
|
murmohk1 wrote: |
Vasanth,
Try your card and let us know the return code.
Raghav,
Thanks for the info. But I suggest you to go thru the manuals for the prerequistes (as said by you). |
---------------------------------------------------------------------------------
Hi,
Please find VSAM materials in the following link
www.jaymoseley.com/hercules/vstutor/vstutor.htm#AMSrepro1
Regards,
Raghavendra |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
DEFINE CLUSTER /* DEFINE A CLUSTER */ -
(
NAME (KSDS Cluster name) /* CLUSTER NAME */ -
VOLUMES (ACA302) /* CLUSTER IS ON ACA302 */ -
CISZ(4096) /* control interval size */ -
TRACKS(2,1) /* SPECIFYING SIZE */-
RECORD SIZE (80 80) /* this is the record size in KSDS cluster / -
KEYS(6,0) /* FOR DECLARING KEYS */ -
INDEXED) /* CLUSTER IS KSDS */ |
Just a couple of points -
1) Why have you chosen a CISZ of 4096. I can half guess at your reason for doing this, but if you would like to elaborate.
2) Defining small VSAM files with a differing primary and second allocation can in some cases causes severe performance problems. For small VSAM files I would recommend that the secondary extent is the same as the primary as the CA size will always be the smaller of the two, which may affect the index structure of the file.
As a matter of course, I very rarely ever allocate a VSAM file with less than one cylinder.
Dare I say, that from the simplicity of the file structure given by the OP that this may be a HOMEWORK question.
Quote: |
REPRO-
COPY-
INDATASET("SEQUENTIAL DATASET NAME")- [this data set contains the records to be loaded in to the VSAM data set)
OUTDATASET("VSAM DATASET NAME")-
|
I think that Murali is questioning the COPY statement. I must admit in over 20 years of IDCAMS I have yet to encounter this statement. Would you be so kind as to point out where in the manual this can be found. |
|
Back to top |
|
|
revel
Active User
Joined: 05 Apr 2005 Posts: 135 Location: Bangalore/Chennai-INDIA
|
|
|
|
expat wrote: |
1) Why have you chosen a CISZ of 4096.
As a matter of course, I very rarely ever allocate a VSAM file with less than one cylinder. |
Dear expat,
Just to add,
Just i gaven a sample coding sheet for allocation of KSDS Cluster, It need not be 4096 or SIZE is Tracks.
Quote: |
----------------------------------------------------------------------------------
REPRO-
COPY-
INDATASET("SEQUENTIAL DATASET NAME")- [this data set contains the records to be loaded in to the VSAM data set)
OUTDATASET("VSAM DATASET NAME")-
-----------------------------------------------------------------------------------
I think that Murali is questioning the COPY statement. I must admit in over 20 years of IDCAMS I have yet to encounter this statement. Would you be so kind as to point out where in the manual this can be found. |
About COPY in IDCAMS, I never encounter such command in IDCAMS Utility, As per my experiance; only we can have REPRO command as a control card in IDCAMS Utility
Regards,
Raghavendra |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Expat,
Quote: |
I think that Murali is questioning the COPY statement |
Atlast some one got MY POINT.
Thanks Raghavendra for your inputs on this.
Vasanth,
Do you have anything to say on this? I belive you implemeted with '0' maxcc before posting the same.
It would great, if you provide some material or link for this syntax. No harm to learn new things. Rite? |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi Murali,
Its an writing error that i made, we can use the following syntax to load the VSAM file.
//SYSIN DD *
REPRO
INDATASET (INPUT DATASET SEQ/VSAM CONTAINING DATA)
OUTDATASET (VSAM DATA SET NAME)
/*
Regard's
Vasanth......... |
|
Back to top |
|
|
revel
Active User
Joined: 05 Apr 2005 Posts: 135 Location: Bangalore/Chennai-INDIA
|
|
|
|
Quote: |
It would great, if you provide some material or link for this syntax. No harm to learn new things. Rite? |
here is the link, which covers almost about VSAM.
Link removed
Regards,
Raghavendra |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
revel
1) I somehow think that using material other than that supplied by the software provider may not be a smart move.
2) Is the material in the link that you have provided subject to copyright laws ? As a precaution I have removed the link. Please read and read again the various posts by Dick regarding posting links to possibly copyright material. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
Back to top |
|
|
|