GDG examples
Before you specify a (+nnn)
value to create a new GDS, issue the following command:
SITE DCBDSN=model
This subcommand specifies an MVS™ data set to be used as a model. The model must have a DSORG
of PS. The other DCB characteristics of the data set are not checked.
Notes:
For more information about GDGs, see z/OS DFSMS Using Data Sets.- Failure to have a valid DCBDSN before trying to create a new GDS might cause FTP or ALLOCATION to fail or to return unpredictable results.
- If you issue a SITE DCbdsn LRecl BLKsize command before the creation of a new data set, the LRecl and BLKsize parameters on the SITE command override the LRecl and BLKsize parameters on the DCbdsn command.
The following are sample FTP commands that access a GDG
called JIMKEO.GDG.
Notes:
- In the following examples, gdg (0), gdg (-1), and gdg (+1) specify which copy of the GDG you are using. 0 indicates the latest version, -1 indicates the previous version, and +1 indicates that a new version is created.
- GDGALL is not supported by the z/OS® FTP server. GDGALL processing occurs when the base name for the GDG is specified without a relative index value.
- The MPUT and MGET subcommands are not applicable for GDGs.
The following example illustrates a PUT to the latest
existing GDS. The working directory at the server is JIMKEO:
Command:
put my.gdg gdg(0)
>>>SITE FIXrecfm 150
200-Blocksize must be a multiple of lrecl for FB data sets. Blocksize set to
6150.
200 Site command was accepted
>>>PORT 129,34,128,245,126,229
200 Port request OK.
>>>STOR gdg(0)
125 Storing data set JIMKEO.GDG.G0055V00
250 Transfer completed successfully.
612 bytes transferred. Transfer rate 3.24 Kbytes/sec.
The following example illustrates a GET of the latest
GDG:
Command:
get gdg(0) my.gdg2
>>>PORT 129,34,128,245,126,233
200 Port request OK.
>>>RETR gdg(0)
125 Sending data set JIMKEO.GDG.G0055V00 FIXrecfm 150
250 Transfer completed successfully.
612 bytes transferred. Transfer rate 3.04 Kbytes/sec.
The following example illustrates a PUT to a new GDS [After
the STOR is complete, this new version is referenced by (0)].
Command:
put my.gdg gdg(+1)
>>>SITE FIXrecfm 150
200 Site command was accepted
>>>PORT 129,34,128,245,126,234
200 Port request OK.
>>>STOR gdg(+1)
125 Storing data set JIMKEO.GDG.G0056V00
250 Transfer completed successfully.
612 bytes transferred. Transfer rate 1.16 Kbytes/sec.
The following example illustrates a GET of the previous
GDS into the local file called my.gdg3:
Command:
get gdg(-1) my.gdg3
>>>PORT 129,34,128,245,126,239
200 Port request OK.
>>>RETR gdg(-1)
125 Sending data set JIMKEO.GDG.G0055V00 FIXrecfm 150
250 Transfer completed successfully.
612 bytes transferred. Transfer rate 2.77 Kbytes/sec.
The following example illustrates a GET that replaces
the contents of my.gdg3 with the most recent GDS:
Command:
get gdg(0) my.gdg3 (replace
>>>PORT 129,34,128,245,126,243
200 Port request OK.
>>>RETR gdg(0)
125 Sending data set JIMKEO.GDG.G0056V00 FIXrecfm 150
250 Transfer completed successfully.
612 bytes transferred. Transfer rate 3.36 Kbytes/sec.
The following example illustrates changing the working
directory:
Command:
cd gdg
>>>CWD gdg
257 "'JIMKEO.GDG.'" is working directory name prefix.
The following example shows the files created:
Command:
dir
>>>MODE s
200 Data transfer mode is Stream.
>>>PORT 129,34,128,245,127,12
200 Port request OK.
>>>LIST
125 List started OK.
Volume Unit Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname
STRG73 3380K 04/30/92 1 5 FB 150 32700 PS G0003V00
STRG65 3380K 04/30/92 1 5 FB 150 32700 PS G0006V00
STRG61 3380K 04/30/92 1 5 FB 150 32700 PS G0010V00
STRG47 3380K 04/30/92 1 5 FB 150 32700 PS G0015V00
STRG47 3380K 04/30/92 1 5 FB 150 32700 PS G0021V00
STRG66 3380K 04/30/92 1 5 FB 150 32700 PS G0028V00
STRG47 3380K 04/30/92 1 5 FB 150 32700 PS G0036V00
STRG01 3380K 04/30/92 1 5 FB 150 32700 PS G0045V00
STRG53 3380K 04/30/92 1 5 FB 150 32700 PS G0055V00
STRG59 3380K 04/30/92 1 5 FB 150 32700 PS G0056V00
250 List completed successfully.
>>>MODE b
200 Data transfer mode is Block.
Command: