View previous topic :: View next topic |
Author |
Message |
Martin Beginner

Joined: 20 Mar 2006 Posts: 133 Topics: 58
|
Posted: Sun Nov 12, 2006 5:49 pm Post subject: Initialize VSAM file |
|
|
Hi ,
Is there a way I can initilize a KSDS VSAM file in batch mode?
~Mt |
|
Back to top |
|
 |
Martin Beginner

Joined: 20 Mar 2006 Posts: 133 Topics: 58
|
Posted: Sun Nov 12, 2006 6:02 pm Post subject: |
|
|
am sorry I mispelled my problem. I need to delete/define and initilize the vsam file in a single step. |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Sun Nov 12, 2006 8:35 pm Post subject: |
|
|
Martin wrote: | I need to delete/define and initilize the vsam file in a single step. |
I'm not sure I understand the issue. That normally WOULD be done in a single step (using IDCAMS), unless you're using some other utility. |
|
Back to top |
|
 |
Martin Beginner

Joined: 20 Mar 2006 Posts: 133 Topics: 58
|
Posted: Sun Nov 12, 2006 11:43 pm Post subject: |
|
|
Could you please give me the syntax/code... I know how to delete/define...
How do u initialize in the same step ? |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Mon Nov 13, 2006 2:34 am Post subject: |
|
|
Martin,
Try this code:
Code: |
//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DELETE USER.TEST.VSAM PURGE CLUSTER
DEFINE CLUSTER ( -
NAME(USER.TEST.VSAM) -
VOLUME(* *) -
UNIQUE -
SHAREOPTIONS(3 3) -
CYLINDERS(7 7)) -
DATA ( -
NAME(USER.TEST.VSAM.DATA) -
KEYS (29 0) -
RECORDSIZE(35 35) -
CISZ(4096)) -
INDEX ( -
NAME(USER.TEST.VSAM.INDEX) -
NOIMBED NOREPLICATE)
/*
//STEP020 EXEC PGM=IDCAMS
//IN DD DSN=USER.TEST.PS,DISP=SHR
//OUT DD DSN=USER.TEST.VSAM,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(IN) OUTFILE(OUT)
/*
// |
_________________ Shekar
Grow Technically |
|
Back to top |
|
 |
Martin Beginner

Joined: 20 Mar 2006 Posts: 133 Topics: 58
|
Posted: Mon Nov 13, 2006 6:08 am Post subject: |
|
|
shekar123,
Iwant to achieve it one single step. You solution has 2 steps.
~mt |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Mon Nov 13, 2006 10:21 am Post subject: |
|
|
Martin,
Try this code:
Code: |
//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//IN DD DSN=USER.TEST.PS,DISP=SHR
//SYSIN DD DSN=USER.TEST.CARDS(ABCD),DISP=SHR
//
USER.TEST.CARDS(ABCD)
DELETE USER.TEST.VSAM PURGE CLUSTER
DEFINE CLUSTER ( -
NAME(USER.TEST.VSAM) -
VOLUME(* *) -
UNIQUE -
SHAREOPTIONS(3 3) -
CYLINDERS(7 7)) -
DATA ( -
NAME(USER.TEST.VSAM.DATA) -
KEYS (29 0) -
RECORDSIZE(35 35) -
CISZ(4096)) -
INDEX ( -
NAME(USER.TEST.VSAM.INDEX) -
NOIMBED NOREPLICATE))
REPRO -
INFILE ( IN ) -
OUTDATASET ( USER.TEST.VSAM ) |
_________________ Shekar
Grow Technically |
|
Back to top |
|
 |
Martin Beginner

Joined: 20 Mar 2006 Posts: 133 Topics: 58
|
Posted: Mon Nov 13, 2006 11:48 am Post subject: |
|
|
One more question here...
What if I IN file is empty ? I tested it out and it doesn't seem to be working. |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Mon Nov 13, 2006 12:45 pm Post subject: |
|
|
Martin,
I just showed you the JCL how to code in a single step and make sure that you set up data properly to get repro successful. _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
|
|