Accessing Generation Data Groups (GDG)
SSH Tectia Server for IBM z/OS supports generation data groups defined in ICF. Reading GDG ALLs
is not supported. SSH Tectia Server for IBM z/OS will not create GDG bases or model datasets.
Note: SSH Tectia file transfers are atomic. Running "sget gdg.base(0) file1
" two times in succession might retrieve different
files. A loop of "sput file1 gdg.base(+1)
" commands might fill
the GDG with identical files and roll off all the previous generations.
In the examples below, scp2
and sftp2
mean
accessing datasets locally on the mainframe with these programs.
sshd2
means server functions that can be used by any remote
client.
Navigating
sftp2
cannot navigate MVS datasets. The "lcd dir
"
command does not work when the dir
is a MVS dataset name.
See Listing Datasets for more information.
sshd2
allows you to navigate to a GDG base and to a prefix of a
base. The name of the GDG base is returned to the client with a period
at the end, the same way as for prefixes.
Listing
sftp2
cannot list local datasets.
See Listing Datasets for more information.
sshd2
shows GDG bases with the type GDG
. Generation
datasets (GDS) are shown with their absolute dataset names.
GDSs are normal datasets. The long name format (ls -l
) will show all
details.
Listing a base with -l
will show full details of the GDSs. The
listing may contain datasets that are not in the GDG index but do have
dataset names that have the GDG name as a prefix.
It is possible but not recommended to use dataset names which have the
GDG base name as a prefix but are not GDS names. For example:
sftp> cd /__USER1.GENGRP
Remote directory is now /__USER1.GENGRP.
sftp> ls
Listing directory /__USER1.GENGRP.
S6SYS1 Jan 03 2007 VB 1000 27998 PS 50001 G0006V00.IMPOSTOR
S6SYS1 Jan 02 2007 VB 1000 27998 PS 50001 G0007V00
S6SYS1 Jan 02 2007 VB 1024 27998 PS 50001 G0008V09
S6SYS1 Jan 02 2007 VB 1024 27998 PS 50001 G0077V99
S6SYS1 Jan 02 2007 VB 1024 27998 PS 50001 G0088V99
S6SYS1 Jan 04 2007 VB 1024 27998 PS 50001 G0100V00
S6SYS1 Jan 02 2007 FB 80 27920 PS 50001 GARBAGE
|
You cannot navigate to a prefix that ends in a GnnnnVnn
qualifier. Thus you cannot do "cd G0006V00
" or "ls /__USER1.GENGRP.G0006V00
" in the example above.
If the GDG has the NOSCRATCH
option, GDSs are retained when
they are rolled off. sshd2
shows datasets based on the prefix -
it does not show which datasets are in the GDG and which are not.
Transferring Generation Datasets
SSH Tectia Server does not serialize access to datasets and many clients do not wait
for an acknowledgement to the close command. The client will proceed to
the following command when the network transfer is completed. In most
cases, the server stages the data in a memory file and copies it into
the dataset after the network transfer ends. This may lead to unexpected
results if several transfers add or replace GDSs in the same GDG. The
SSH Tectia Client versions 4.4.8 and 5.2.1 serialize transfers and handle the
acknowledge to the close command properly, and thus avoid this problem.
Access by Relative DSN
scp2
, sftp2
, and sshd2
give full access with
relative generation numbers for reading and writing. For example, to
read the previous and the latest generation, and create a new
generation, from any remote sftp client, do the following:
sftp> cd /__abc.xyz
sftp> sget '-1' /tmp/yester
sftp> sget 0 /tmp/curr
sftp> sput /tmp/new '+1'
z/OS may require you to specify a model dataset when creating a new GDS.
SSH Tectia does not support the DCB=dsn
specification, but you can
use the LIKE
attribute. Specify it with the site command (in
sftpg3
):
sftp> site LIKE=USER1.GENGRPM.MODEL
sftp> sput /tmp/new '+1'
Alternatively, you can specify it with an FTADV string. In that
case, use an absolute DSN:
sftp> sput /tmp/new /FTADV:LIKE=USER1.GENGRPM.MODEL/___USER1.GENGRP(+1)
The following formats can be used for the relative GDS name
abc.xyz(relno)
(relno
must be 0, +1, or -nn):
abc.xyz(relno)
abc.xyz./relno
abc.xyz/relno
abc.xyz.relno
|
Note: GDG ALL is not supported (that is, reading all the
generations as a concatenation).
A new GDS is rolled in immediately. You can not read it back as (+1)
(you can do this in JCL, where the GDS generations are rolled in at the
end of the job).
GDSs can be removed and renamed by relative GDS name. On a rename
operation, the new name must not be a relative GDS name.
Access by Absolute DSN
With absolute GDS names you can do all the things possible with other datasets.
Writing a dataset with a last qualifier with the GnnnnVnn
format
requires that there exists a suitable GDG base. If the generation exists
it is overwritten. If if does not, the new file is inserted in its
place in the GDG and older GDGs are rolled off, if necessary.