This chapter expands on the information presented in the chapter Files and Data Sets. It covers the following subjects:
The data set organizations supported by MSS are shown in the following table.
| Abbreviation | Organization | Comment |
|---|---|---|
| GDG | Generation data group | |
| IS | Indexed sequential | |
| ISU | Indexed sequential, unmoveable | |
| PDSM | Partitioned data set member | Micro Focus organization |
| PO | Partitioned | |
| POU | Partitioned, unmoveable | |
| PS | Physical sequential | |
| PSU | Physical sequential, unmoveable | |
| VSAM | Virtual storage access method |
Note:
The following table shows the record formats for all the data set organizations except VSAM.
| Abbreviation | Format | Control Characters | Record Delimiters | Comment |
|---|---|---|---|---|
| F | Fixed | None | None | |
| FA | Fixed | ANSI | None | |
| FB | Fixed blocked | None | None | Same as F format |
| FBA | Fixed blocked | ANSI | None | Same as FA format |
| FBM | Fixed blocked | Machine | None | Same as FM format |
| FBS | Fixed blocked spanned | None | None | Same as F format |
| FM | Fixed | Machine | None | |
| FS | Fixed spanned | None | None | Same as F format |
| LSEQ | Line sequential | None | Carriage return/line feed | |
| U | Undefined | Results unpredictable | ||
| V | Variable | None | Micro Focus type | |
| VA | Variable | ANSI | Micro Focus type | |
| VB | Variable blocked | None | Micro Focus type | Same as V format |
| VBA | Variable blocked | ANSI | Micro Focus type | Same as VA format |
| VBM | Variable blocked | Machine | Micro Focus type | Same as VM format |
| VBS | Variable blocked spanned | None | Micro Focus type | Same as V format |
| VM | Variable | Machine | Micro Focus type | |
| VS | Variable spanned | None | Micro Focus type | Same as V format |
Note: Blocked and spanned record formats are accepted by MSS but have no meaning in a PC environment.
The following table shows the record formats for VSAM files.
| Abbreviation | Format | Control Characters | Comment |
|---|---|---|---|
| ES | Entry sequence | None | |
| KS | Key sequence | None | |
| LS | Linear sequence | None | Not supported |
| RR | Relative record | None |
MSS works with logical record lengths as defined in the following table:
| Record Format | Logical Record Length |
|---|---|
| Fixed | Actual record length |
| Variable | Actual record length + 4 |
| LSEQ | Maximum record length |
Note: If you have a program compiled to use EBCDIC, but that program reads a file with a RECFM of LSEQ, LRECL of 0 and a character set of ASCII, MSS automatically converts the file's data to EBCDIC as part of the read. This automatic conversion is useful when reading files such as control cards, that do not contain hexadecimal data.
MSS writes data sets to physical files on the PC using the following organization and record format mapping:
| Mainframe | Physical File | |||
|---|---|---|---|---|
| Data Set Organization | Record Format | File Organization | Record Format | Comment |
| DA, DAU, PS, PSU | Any fixed (Fnn) or variable (Vnn) format | Sequential | Micro Focus | |
| DA, DAU, PS, PSU | LSEQ | Line sequential | Micro Focus | Always uses ANSI character set. Can only be edited with a text editor |
| GDG | Catalog entry only | |||
| IS, ISU | Any fixed (Fnn) or variable (Vnn) format | Indexed sequential | Micro Focus | |
| PDSM | Any fixed (Fnn) or variable (Vnn) format | Sequential | Micro Focus | |
| PDSM | LSEQ | Line sequential | Micro Focus | |
| PO, POU | Catalog entry only | |||
| VSAM | ES | Sequential | ESDS | |
| VSAM | ES | Indexed sequential | ESDS | Alternate index defined |
| VSAM | KS | Indexed sequential | Micro Focus | |
| VSAM | LS | Not supported | ||
| VSAM | RR | Relative | Micro Focus | |
A generation data group (GDG) consists of two parts: a GDG model and a series of physical sequential (PS) data sets, called biases (also known as generation data sets) that are associated with the GDG.
There are two main ways to set up a GDG:
The following example illustrates a job that can be used to create a generation data group. STEP00 creates the GDG model and STEP01 creates five new GDG biases.
//MFIDMFGD JOB 'MFIDMFGD',CLASS=A,MSGCLASS=A,NOTIFY=MFIDF
//STEP00 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSIN DD *
DELETE MFIDMF.TEST.GDG
DEFINE GENERATIONDATAGROUP(NAME(MFIDMF.TEST.GDG)
EMPTY NOSCRATCH LIMIT(96))/*
//STEP01 EXEC PGM=IEFBR14
//SYSUXX DD DSN=MFIDMF.TEST.GDG(+1),DISP=(NEW,CATLG),SPACE=(TRK,(5,2))
//SYSUXY DD DSN=MFIDMF.TEST.GDG(+2),DISP=(NEW,CATLG),SPACE=(TRK,(5,2))
//SYSUXZ DD DSN=MFIDMF.TEST.GDG(+3),DISP=(NEW,CATLG),SPACE=(TRK,(5,2))
//SYSUXA DD DSN=MFIDMF.TEST.GDG(+4),DISP=(NEW,CATLG),SPACE=(TRK,(5,2))
//SYSUXB DD DSN=MFIDMF.TEST.GDG(+5),DISP=(NEW,CATLG),SPACE=(TRK,(5,2))
Five biases named MFIDMF.TEST.GDG.G0001V00, MFIDMF.TEST.GDG.G0002V00, MFIDMF.TEST.GDG.G0003V00, MFIDMF.TEST.GDG.G0004V00 and MFIDMF.TEST.GDG.G0005V00 are created by STEP01.
A bias can be processed by its relative number, its actual reference or as a part of the entire generation data group. For example, each of the following statements could be executed after running the previous job.
//SYSUT1 DD DSN=MFIDMF.TEST.GDG,DISP=SHR
This would cause the entire generation data group MFIDMF.TEST.GDG, consisting of a set of concatenated data sets MFIDMF.TEST.GDG.G0001V00 through MFIDMF.TEST.GDG.G0005V00, to be referenced.
//SYSUT1 DD DSN=MFIDMF.TEST.GDG(0),DISP=SHR
The relative number 0 would cause the data set named MFIDMF.TEST.GDG.G0005V00 to be referenced.
//SYSUT1 DD DSN=MFIDMF.TEST.GDG(-1),DISP=SHR
The relative number -1 would cause the data set named MFIDMF.TEST.GDG.G0004V00 to be referenced.
//SYSUT1 DD DSN=MFIDMF.TEST.GDG(+1),DISP=SHR
The relative number +1 would cause a new data set named MFIDMF.TEST.GDG.G0006V00 to be referenced.
//SYSUT1 DD DSN=MFIDMF.TEST.GDG.G0003V00,DISP=SHR
The actual reference G0003V00 would cause the data set named MFIDMF.TEST.GDG.G0003V00 to be referenced.
The increment of numbers occurs per job, so if you had two consecutive steps that referenced +1, then each step would be using the same data set.
This section describes restrictions when using GDGs in MSS:
//NEWFILE DD DSN=TEST.GDG.G0002V00,DISP=(NEW,CATLG)
rather than:
//NEWFILE DD DSN=TEST.GDG(+1)
For each GDG, the system catalog stores the number of the G0000V00 data set that corresponds to the current generation of that GDG. Where G0000V00 data sets are allocated using the G0000V00 numbers explicitly, you must set the current generation on the model to 0. This forces the catalog API to recalculate the correct current G0000V00 number by finding the number of the highest G0000V00 data set currently cataloged for the model.
You can reset the current generation number by DELETING and REDEFINING the model without uncataloging the G0000V00 data sets. You can do this using IDCAMS, as illustrated below:
DELETE TEST.GDG
DEFINE GENERATIONDATAGROUP -
(NAME(TEST.GDG) -
SCRATCH -
LIMIT(02))
For example, assume that we have a cataloged GDG called TEST.GDG, which currently has two generations corresponding to TEST.G0001V00 and G0002V.00. If a data set TEST.GDG.G0007V00 is allocated directly, the current generation field in the GDG model must be reset. This will force the GDG processing to scan all the associated G0000V00 data sets to recalculate the correct value for the current generation, which in this case would be G0007V00. Failure to do this would cause a JCL error when the normal GDG cycle process attempts to allocate TEST.GDG.G0007V00 and finds that the data set already exists.
Copyright © 2008 Micro Focus (IP) Ltd. All rights reserved.