Processing for RECEIVE FROMNETWORK
When processing a RECEIVE FROMNETWORK command to receive a package from a network location, SMP/E performs the following steps:
- SMP/E reads the information in the SERVER data set and, optionally,
the CLIENT data set. The
SERVER data set contains information about the FTP or
HTTP(S)
server
on which resides the package to be received, as well as information
about the package itself, such as its location on the server, an SHA-1
hash value for it, and an identifier for the package. The CLIENT data
set contains information such as
identifying which
download mechanism to use
, local fire wall navigation details,
whether file transfer operations should be retried if necessary, and
whether debugging information should be generated (see Defining data sets and files for RECEIVE FROMNETWORK and RECEIVE ORDER processing for more information on the SERVER
and CLIENT data sets).
Using the information found in the SERVER and (optional)
CLIENT data sets,
SMP/E spawns the appropriate client
program based on the specified download method (FTP or HTTP(S)) and
logs in to the FTP or HTTP(S) server
that contains the package
to be received. 
- SMP/E transfers the package attribute file (GIMPAF.XML) for the package and stores it in the package directory of the SMPNTS. The package identifier value found in the SERVER data set is used as the package directory in the SMPNTS.
- SMP/E computes the SHA-1 hash value for the transferred file. If the computed hash value matches the hash value found in the SERVER data set information, then the file was transferred properly. If the hash values do not match, then the file may have been corrupted during its transfer (another possibility is that the value in the SERVER data set is incorrect). If a nonzero RETRY value was specified in the CLIENT data set information, SMP/E retries the transfer operation. Otherwise, RECEIVE processing will fail. See Restarting RECEIVE FROMNETWORK for information on restarting after a failure.
- The package attribute file can be thought of as a "packing list"
for the package to be received. It contains a list of all the files
that, combined, make up the entire package. SMP/E reads the package
attribute file (if successfully stored) to determine the files that
make up the package. SMP/E then transfers each file defined in the
package attribute file from the FTP or
HTTP(S)
server
and stores it in the package directory of the SMPNTS. SMP/E creates subdirectories as needed in the package directory and stores files in the subdirectories according to their filetype or subdir attributes indicated in the package attribute file. SMPPTFIN archive files are stored in the /SMPPTFIN subdirectory, SMPHOLD archive files are stored in the /SMPHOLD subdirectory, and SMPRELF archive files are stored in the /SMPRELF subdirectory. All other files are stored in the subdirectory specified on the subdir attribute or, if the subdir attribute is not present, in the package directory with no subdirectory.
- SMP/E computes the SHA-1 hash value for each file it stores. If the computed hash value matches the known hash value indicated in the package attribute file, the file was transferred properly. If the hash values do not match, then the file has been corrupted during its transfer. If a nonzero RETRY value was specified in the CLIENT data set information, SMP/E retries the transfer operation. Otherwise, RECEIVE processing will fail. See Restarting RECEIVE FROMNETWORK for information on restarting after a failure.
- SMP/E closes the connection with the FTP or
HTTP(S)
server
after all files of the package have been transferred successfully
or when no further retry operations will be performed. - SMP/E processes the package contents (unless TRANSFERONLY has
been specified on the RECEIVE command) as directed by the applicable
RECEIVE command operands. If SYSMODs or HOLDDATA are to be processed,
SMP/E transforms the archive files in the /SMPPTFIN, /SMPHOLD, and
/SMPRELF subdirectories of the package directory into images of the
original data. SMP/E then processes this data as if it had been read
from the SMPPTFIN and SMPHOLD data sets, as described in Processing input from SMPPTFIN and SMPHOLD.
If more than one archive file exists in the /SMPPTFIN or /SMPHOLD subdirectories, SMP/E reads and processes the archives in the sequence in which they are defined in the GIMPAF.XML file. The GIMPAF.XML file is created by the GIMZIP service routine, and the archives are defined in the GIMPAF.XML file in the order in which they are specified by the input ARCHDEF tags.