jcl - IDCAMS LISTCAT deleting VSAM file when next step is IEFBR14 -
i have requirement wherein need check if vsam file exists or not. if not nowadays need create test.file2. jcl :
//step01 exec pgm=idcams //sysprint dd sysout=* //sysin dd * listcat entries('brtest.file1') /* //step02 exec pgm=iefbr14,cond=(4,gt) //dd01 dd dsn=brtest.file1, // disp=(,catlg,delete), // like=brtest.file2 //sysprint dd sysout=* //sysout dd sysout=*
but stange thing happening. whenever execute jcl, step001 homecoming return code 004 though file present, , new file created in step02. if submit jcl twice, new file created both times. not able understand how file getting deleted. , unusual thing if run jcl without step02 gives maxcc 0 saying file found in catalog.
i able accomplish requirement next code, still understand why , how vsam file gets deleted listcat.
//step02 exec pgm=iefbr14,cond=(4,gt) //dd01 dd dsn=brtest.file1, // disp=(mod,catlg,catlg), // like=brtest.file2 //sysprint dd sysout=* //sysout dd sysout=*
here sysprint when step01 executed:
idcams scheme services time: 03:47:44 listcat entries('brtest.file1') cluster ------- brtest.file1 in-cat --- catalog.test03 info ------- brtest.file1.data in-cat --- catalog.test03 index ------ brtest.file1.index in-cat --- catalog.test03 idcams scheme services time: 03:47:44 number of entries processed was: aix -------------------0 alias -----------------0 cluster ---------------1 info ------------------1 gdg -------------------0 index -----------------1 nonvsam ---------------0 pagespace -------------0 path ------------------0 space -----------------0 usercatalog -----------0 tapelibrary -----------0 tapevolume ------------0 total -----------------3 number of protected entries suppressed 0 idc0001i function completed, highest status code 0 idc0002i idcams processing complete. maximum status code 0
and when both steps executed:
idcams scheme services time: 03:48:35 listcat entries('brtest.file1') idc3012i entry brtest.file1 not found idc3009i ** vsam catalog homecoming code 8 - reason code igg0cleg-42 idc1566i ** brtest.file1 not listed idcams scheme services time: 03:48:35 number of entries processed was: aix -------------------0 alias -----------------0 cluster ---------------0 info ------------------0 gdg -------------------0 index -----------------0 nonvsam ---------------0 pagespace -------------0 path ------------------0 space -----------------0 usercatalog -----------0 tapelibrary -----------0 tapevolume ------------0 total -----------------0 number of protected entries suppressed 0 idc0001i function completed, highest status code 4 idc0002i idcams processing complete. maximum status code 4
the value zos390rl variable z/os 02.01.00 , zenvir ispf 7.1mvs tso.
may have reply you. didn't think of because vsam dataset, , way trying unusual (to me).
there is/was product called ucc11. think marketed computer associates, , called ca-11 (or somesuch). think using product or similar @ site.
if executed @ origin of job files specified new , catlg, , see if there existing file of same name in catalog. if there was, existing file deleted.
this obviate need initial iefbr14 step delete such files.
i think using product, or similar. file beingness automatically deleted when exists, idcams step, reading info file (even if sysin , dd *) not known product, vsam file deleted before idcams step run.
changing file mod initial disposition (mod add together existing file , create new file if none exists) not cause such product delete file.
using vsam file not obtain ca-size , ci-size model dataset. default values those, may impact on performance of programs. cannot specify these values when defining vsam file in jcl. won't buffer values model dataset, can specify separately in jcl (which haven't).
here description of you: http://publibfp.dhe.ibm.com/cgi-bin/bookmgr/books/iea2b680/12.40?dt=20080604022956
the next attributes copied model info set new info set:
data set organization record organization (recorg) or record format (recfm) record length (lrecl) key length (keylen) key offset (keyoff) type, pds, pdse, basic format, extended format, big format, or hfs (dsntype) space allocation (avgrec , space) unless explicitly code space parameter new info set, scheme determines space allocated new info set adding space allocated in first 3 extents of model info set. therefore, space allocated new info set not match space specified model info set. note regardless of units in model info set allocated, new info set allocated in tracks. assumes space not specified on jcl , beingness picked model info set.
there other little "gotchas", in lastly paragraph, detailed in link well.
unless have strong reasons otherwise, i'd suggest doing whole thing in 1 idcams step (as below).
i suspected going 1.12, 1.13 or 2.1 (2.01). iefbr14 is, subtly, part of os now.
exactly why effect, don't know. don't have access 2.1, can't investigate myself.
iefbr14 has changed, not intended vsam datasets (you'll lot of default values things may or may not want), it's not "usual" way this. see suggestions below.
try adding ddname idcams step references vsam dataset. see if changes anything. utilize ddname in idcams statement. see if changes anything.
take results sysprogs, , see if can spot anything.
if not, it'll pmr-time: http://www-01.ibm.com/support/docview.wss?uid=swg21507639
if raise pmr, please update adding reply resolution 1 time receive it.
suggestions.
find out how task done other people @ site.
have tried using vsam file have defined in way? should listcat test.file1 , test.file2 , compare. if in jcl reference, see there things vsam define can can't vsam file defined in jcl using like.
unless there reason otherwise, i'd suggest whole thing in 1 step idcams. see if file exists, utilize idcam's if to test cc , define if file not exist. can utilize model (for instance on test.file2) similar file, , override different need.
if have here, http://pic.dhe.ibm.com/infocenter/zos/v1r13/index.jsp?topic=%2fcom.ibm.zos.r13.idai200%2fdefclu.htm, find number of modal commands
idcams give need define if not there, , different (set status code, instance) if is.
please still supply requested information. interesting question on face of it, may have simple solution. solution, don't think want.
jcl vsam
No comments:
Post a Comment