Q42) What is SHAREOPTS ?
Q42) SHA REOPTS is a parameter in the DEFINE and specifies how an object can be shared among urs. It is coded as SHAREOPTS(a b), where a is the cross region share option ie how two or more jobs on a single system can share the file, while b is the cross system share option ie how two or more jobs on different MVS’s can share the file. Usual value is (2 3).
SHA REOPTS(Shareoptins)是在定义VSAM时的一个参数,用来定义在用户之间的共享。他可以写作SHA REOPTS(a b) ,a是访问共享选项表示两个或者两个以上的JOB在单个系统中可以获得该共享,b是作为访问共享选项表示两个或者两个以上的JOB在不同的MVS系统中可以获得该共享,一般定义成(2,3)
Q43) What is the meaning of each of the values in SHAREOPTS(2 3)?
Q43) Value of 2 for cross region means that the file can be procesd simultaneously by multiple urs provided only one of them is an updater. Value of 3 for cross system means that any
number of jobs can process the file for input or output (VSAM does nothing to ensure integrity). 2表示同时能被多个用户处理,但只能有一个用户更新,3表示JOB能处理这个文件做输入输出(但VSAM不保证(文件)的完整性)
Q44) How do you define a KSDS ?
Q44) DEFINE CLUSTER(cluster name) with the INDEXED parameter. A lso specify the ds name for the DATA component & the ds INDEX component. Other important parms are RECORDSI ZE, KEYS, SHAREOPTIONS.
用DEFINE CLUSTER来定义索引的参数,同时定义DS名字在DATA部和INDEX部,其他重要的参数有RECORDSIZE, KEYS, SHAREOPTIONS.
Q45) How do you define an ALTINDX ? How do you u ALTINDXs in batch, CICS pgm’s ?
Q45) DEFINE A LTERNATEINDEX. Important paramters are RELATE where you specify the ba cluster name, KEYS, RECORDSIZE,SHAREOPTIONS,UNIQUEKEY(or NONUNIQUEKEY), DATA(ds name for the data component), INDEX(ds name for the index component). Then
DEFINE PATH. Important paramters are NAME (ds name for the path), PATHENTRY (ds
name of the alternate index name), UPDATE(or NOUPDATE) which specifies whether an alt index is updated when a update to the ba cluster takes place. Then BLDINDEX. Parameters are INDATASET(ds name of ba cluster), OUTDATASET(ds name of AIX).
如何定义一个次键?
定义次键的主要参数有RELATE,用来关联主键的cluster名,KEYS,
RECORDSIZE,SHAREOPTIONS,UNIQUEKEY(or NONUNIQUEKEY), DATA(数据部),
INDEX(索引部)。接着定义路径,重要的参数有NAME(路径名),PATHENTRY(索引部的别名),UPDATE(or NOUPDATE)用来定义是否根据主键改变而改变。最后一个过程BLDINDEX(在索引中装入数据)他的参数又INDATASET(主键的ds名), OUTDATASET(次键的ds名).
Q46) Using Alternate Indexes in Batch pgms:
Q46) In the JCL, you must have DD stmts for the cluster and for the path(s). In the COBOL Program, SELECT .. ASSIGN TO ddname for ba cluster RECORD ALTERNATE RECORD KEY IS..
在jcl中,通过dd参数来指定cluster的路径,在cobol中用SELECT .. ASSIGN TO ddname for ba cluster RECORD A LTERNATE RECORD KEY IS..
Q47) Using Alternate Indexes in CICS pgms:
Q47) FCT entries must be created for both ba cluster & the path. To read using the alternate index, u the dd name of the path in CICS file control commands.
(学完后补充)
Q48) What happens when you open an empty VSAM file in a COBOL program for input?
Q48) A VSAM file that has never contained a record is treated as unavailable. Attempting to open for input will fail. An empty file can be opened for output only. When you open for output, COBOL will write a dummy record to the file & then delete it out.
在COBOL程序中你输入一个空的VSAM文件时会发生什么?
VSAM文件不会包含无效的记录,所以打开一个空的VSAM作为(COBOL的)输入文件会失败,空的VSAM文件只能作为输出文件。当你作为输出文件打开的时候COBOL会写一个空的记录在文件中,然后删除。
Q49) How do you initialize a VSAM file before any operation? a VSAM with alternate index?
Q49) Can write a dummy program that just opens the file for output and then clos it.
你如何初始化一个vsam文件在所有操作之前?一个有次键的vsam?
写一个输入空数据的程序,然后关闭它。
Q50) What does a file status of 02 on a VSAM indicate?
阿拉斯加在哪里
Q50) Duplicate alternate key . Happens on both input and output operation
VSAM文件状态是02说明什么?4寸蛋糕图片
在输入和输出的时候,对索引文件成功但发现了重复关键字
Q51) How do you calculate record size of an alternate cluster? Give your values for both unique and nonunique.
Q51) Unique Ca: 5 + (alt-key-length + primary-key)
Non unique Ca: 5 + (alt-key-length + n * primary-key) where n = number of duplicate records for the alternate key
怎么计算次键的记录长度?给出次键唯一和不唯一情况下的值。
唯一: 5 + ( alt-key-length + primary-key )
不唯一:5 + ( alt-key-length + n * primary-key ) n为次键重复的个数。
原文补充:
. A key quenced ba cluster(KSDS)
RECSZ = 5 + AIXKL + (n x BCKL)
. An entry quenced ba cluster(ESDS)
RECSZ = 5 + AIXKL + (n x 4)
where:
– RECSZ is the average record size.
– AIXKL is the alternate-key length (e the KEYS parameter).
– BCKL is the ba cluster's prime-key length (you can issue the access
Method rvices LISTCAT command to determine the ba cluster's
prime-key length).野性的呼唤读后感
– n = 1 when UNIQUEKEY is specified (RECS Z is also the maximum record
size).
– n = the number of data records in the ba cluster that contain the same
alternate-key value, when NONUNIQUEKEY is specified.
Q52) What is the difference between quential files and ESDS files?
Q52) Sequential (QSAM) files can be created on tape while ESDS files cannot. Also, you can have ALTINDEX for an ESDS while no such facility exists for QSAM files.
顺序文件(SDS)和ESDS有什么不同?
QSAM指的是顺序的文件访问方式。顺序文件可以建立在磁带上,你可以为ESDS定义次键,而QSAM文件不行。
Q53) How do you load a VSAM data t with records?
Q53) Using the REPRO command.
如何加载VSAM数据集记录,用IDCAMS的REPRO命令。
Q54) How do you define a GDG ?
Q54) U the DEFINE GENERATIONDATA GROUP command. In the same IDCAMS step, another datat must be defined who DCB parameters are ud when new generations of the GDG are created. This datat is known as the model datat. The ds name of this model datat must be the same as that of the GDG, so u a disp of keep rather than catalog and also specify
space=(trk,0)
春羽的养殖方法和注意事项如何定义GDG
用(IDCAMS)的DEFINE GDG命令,在同一IDCAMS步中,当新的GDG世代新建的时候,必须定义DCB参数。这个数据是被称为模型,模型的名字必须和GDG名字一样。用DISP来定义新的DS。
删除和定义GDG:
Q55) Do all versions of the GDG have to be of the same record length ?
Q55) No, the DCB of the model datat can be overridden when you allocate new versions.
GDG的每一代都需要一样的记录长度吗?
不,当新建一代的时候,这个模式(GDG)的DCB(数据控制块)会被覆盖。
Q56) How are different versions of GDG named?
Q56) ba-file-name.GnnnnnV00 where nnnn= generation number (upto 255). nnnn will be 0000 for the 1st generation.
GDG如何定义不时代?
GnnnnnV00 nnnn是世代号(可到255)00是版本号,nnnn=0000表示第一代。
Q57) Suppo 3 generations of a GDG exist. How would you reference the 1st generation in the JCL? - GS
Q57) U GDG name (-2).
假设已经存在3代GDG,在JCL中如何访问第一代?
用GDG name(-2).
Q58) Suppo a generation of GDG gets created in a particular step of a proc. How would you refer the current generation in a subquent step? What would be the disposition of this generation now? - GS
Q58) Relative generation numbers are updated only at the end of the job, not at the end of a step. To allocate a new generation, we would be using (+1) with a DISP of (NEW, CATLG, DELETE).
To refer to this in a subquent step in the same job, we would again u (+1) but with a DISP of SHR or OLD.
如何在一步中建立一代GDG,如何正确的指定一代在随后的一步?如何处理当前的这代?
世代号只在结束JOB的时候被更新,而不是JOB中每一步的结束。建立新的世代用(+1)和DISP= (NEW, CATLG, DELETE),在随后的步中用(+1)和DISP=SHR或OLD来访问新建的这代。
Q59) What more info you should give in the DD statement while defining the next generation of
a GDG? - GS
Q59) Give (+1) as the generation number, give (new,catlg) for disp, give space parameter, can give the DCB parameter if you want to override the dcb of the model datat.
在定义下一代GDG的时候,需要那些DD参数?
浴巾怎么裹
Q60) Assuming that the DEFIN E JCL is not available, how do you get info about a VSAM file's organisation?
Q60) U the LISTCAT command.
假设不能定义JCL,如何看VSAM 文件的组织结构?
用LISTCAT。
全部信息:LISTCAT ENTRIES(/) ALL
Q61) During processing of a VSAM file, some system error occurs and it is subquently unusable. What do you do?
Q61) Run VERIFY.
在处理VSAM文件的时候,如果一些系统错误发生,然后使VSAM文件无效了,怎么办?
运行VERIFY参数(IDCAMS参数)。江西瑞金
Q62) How do you fix the problem associated with VSAM out of s pace condition?
Q62) Define new VSAM datat allocated with more space.
U IDCAMS to REPRO the old VSAM file to new VSAM datat.
U IDCAMS to A LTER / rename the old VSAM datat or IDCAMS to DELETE the old
VSAM datat.
U IDCAMS to A LTER / rename the new VSAM datat to the name of the original VSAM
datat.
如何解决VSAM空间不够的情况?
定义一个更大的新的VSAM数据集。
用IDCAMS的REPRO把旧VSAM文件考到新的VSAM文件中。
用IDCAMS的ALTER重命名旧的VSAM文件或者用IDCAMS的DELETE删除旧的VSAM文件。
用IDCAMS的ALTER重命名新的VSAM文件和原来的(旧的)一样。
Q63) What is the meaning of VSAM RETURN-CODE 28?
Q63) Out of space condition is raid.
揭开拼音
鱿鱼圈VSAM的返回码为28什么意思?
命令超出了空间。
补充:28是一个I/O的错误,
Data t cannot be extended becau VSAM cannot allocate additional direct-access storage space. Either there is not enough space left to make the condary allocation request, you attempted to increa the size of a data t while processing with SHROPT=4 and DISP=SHR, or
the index CI is not large enough to hold the entire CA. This error could also be due to a data t trying to extend beyond 4GB on a system that does not support extended addressability.
Q64) On which datats You can have ALT INDEX?.
Q64) only on KSDS and ESDS - not RRDS
在那些DS上你可以建立次键
KSDS和ESDS。
Q65) How many Alternate Indexes you can have on a datat?
Q65) 255 - but you must be a nut to have so many ALT Indexes on a datat!
在一个DS中可以定义多少个次键?
255,但是你必须要有足够的A LT Indexes
Q66) Is it slower if you access a record through ALT INDEX as compared to Primary INDEX?
Q66) Yes. Why? Becau the alternate key would first locate the primary key, which in turn locates the actual record. Needs twice the number of I/Os.
访问记录通过次键相比通过主键要慢?
是,因为次键会先寻找主键,从而找到实际记录。