2

I have a sample code of delete/define using IDCAMS in z/OS, but I dont think it will work on z/VSE. Can someone help me convert this? The file created should be VSAM-kSDS.

//VDFNDEL  JOB 1,SAMPLE,MSGCLASS=X
//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*    
//SYSIN    DD *    

 DELETE SAMPLE.DATA.VSAM CLUSTER

/*   
//STEP2    EXEC PGM=IDCAMS
//SYSPRINT DD *
//DATAIN   DD DISP=OLD,DSN=SAMPLE.SORTOUT 
//SYSIN    DD *

 DEFINE CLUSTER (NAME (SAMPLE.DATA.VSAM) -
           VOLUMES(WORK02) CYLINDERS(1 1) -
           RECORDSIZE (72 100) KEYS(9 8) INDEXED)

 REPRO INFILE(DATAIN) OUTDATASET(SAMPLE.DATA.VSAM) ELIMIT(200)

/*
Bill Woodger
  • 12,968
  • 4
  • 38
  • 47
user2155147
  • 55
  • 2
  • 3
  • 7
  • Surely someone at your site has done this before? There are probably some "local standards" you need to apply - as well as the JCL being completely different. – Bill Woodger Aug 30 '13 at 07:06
  • Really, this is not something you should be coming to the internet for. If you go cataloguing something starting "SAMPLE" you'll likely get "security" problems, and "just taking any old something from the internet" might not appear like a good excuse. – Bill Woodger Aug 30 '13 at 07:33

1 Answers1

2

Your IDCAMs statements should be pretty much the same but the JCL is completely different.

    * $$ JOB JNM=OGDEN12,CLASS=0,DISP=D
// JOB OGDEN12
// DLBL OGDEN,'OGDEN.DATA.VSAM',,VSAM,CAT=VSESPUC
// EXEC IDCAMS,SIZE=AUTO
DELETE (OGDEN.DATA.VSAM) CLUSTER PURGE -
CATALOG(VSESP.USER.CATALOG)
/*
// EXEC IDCAMS,SIZE=AUTO
DEFINE CLUSTER(NAME(OGDEN.DATA.VSAM) -
FILE(OGDEN) -
RECORDS (2000 1000) -
TO (99366) -
INDEXED -
KEYS(9 8) -
RECORDSIZE(72 100) -
CONTROLINTERVALSIZE(4096) -
SPANNED -
SHR(4) -
VOLUMES (DOSRES,SYSWK1)) -
DATA (NAME (OGDEN.DATA.VSAM.@D@)) -
INDEX (NAME (OGDEN.DATA.VSAM.@I@)) -
CATALOG(VSESP.USER.CATALOG)
/

Example taken from the extremely useful redbook

Bill Woodger
  • 12,968
  • 4
  • 38
  • 47
James Anderson
  • 27,109
  • 7
  • 50
  • 78
  • I know it's IBM's fault, but the example could/should use one step, with IF, SET, LASTCC and MAXCC to do everything in a controlled manner. – Bill Woodger Aug 30 '13 at 07:34
  • @Bill Woodger -- true but I haven;t used VSE this century -- and don't know anyone anywhere still using it so I don't have any "real" examples to hand. I though I could at least point the poster in the right direction. – James Anderson Aug 30 '13 at 07:40
  • Sorry, realise I'd not been clear. I mean in the IDCAMS control cards, not in the JCL. Same as z/OS to a quick confirmation for those specifics: ftp://ftp.boulder.ibm.com/s390/zos/vse/pdf3/zvse31/doc/iesvoe10.pdf – Bill Woodger Aug 30 '13 at 07:48