z/OS Connect command reference
Syntax of the z/OS Connect commands.
zosconnect command syntax
- Syntax
-
zosconnect <action> <serverName> <options>
- Parameters
-
- <action>
- The task that you want to perform:
- create
- run
- Launches the named server as a foreground process. You can optionally specify the --clean option to clear the cache.
- start
- Launches the named server as a background process. Progress can be seen in the
messages.log file. You can optionally specify the --clean
option to clear the cache. Note: Do not use start with z/OS Connect started tasks.
- <serverName>
- The name of the server on which the action is performed. When serverName is
not provided the name
defaultServeris used. - <options>
-
- --clean
- Deletes all persistent cached information that is related to the specified server instance,
which includes OSGi resolver metadata and persistent OSGi bundle data. If you use this option, the
server will be required to recompute any cached data at the next startup, which might take more time
than a restart that can reuse cached data.
Use only with the start parameter.
The --clean option is not necessary for normal operation. IBM® service might request that you use this option when providing an interim fix, or if there is a suspected problem with the cached data. This option might also be necessary if you are developing a product extension, and you are either updating OSGi manifests or planning to clear persistent OSGi bundle data.
- --template=templateName
- Use only with the create parameter.
- Examples
-
-
zosconnect create myserver --template=zosconnect:default -
zosconnect start myserver --clean
-
zconsetup command syntax
- Syntax
-
zconsetup install
- Parameters
-
- install
- Specifies that the product extension directories be created.
- Example
-
zconsetup install
MVS system MODIFY commands
- MVS system MODIFY commands
-
MVS system MODIFY commands are available for use with IBM z/OS Connect servers. For more information about the MODIFY commands.
- For zosConnect-2.0, see The MODIFY command zosConnect-2.0.
- For zosConnect-3.0, see The MODIFY command zosConnect-3.0
- Liberty MODIFY commands
-
Additionally, Liberty provides MODIFY commands for tasks such as configuring trace, requesting dumps, pausing HTTP endpoints, or refreshing keystores, including SAF key rings. For more information, see
Liberty: Modify commands on z/OS and
Pausing and resuming a Liberty server from the z/OS console.
zconbt command syntax
zosConnect-2.0 Applies to zosConnect-2.0.
- Syntax
-
Use the zconbt command to generate a service archive (.sar) or API archive (.aar) file. For API requesters, use the zconbt command to generate the required artifacts, including the API requester archive (.ara) file.
To generate a service archive (.sar) or an API requester archive (.ara) file from a properties file, use the following syntax:-
zconbt -p=<filename>.properties -f=<filename>.sar -
zconbt -p=<filename>.properties -f=<filename>.ara
To generate a service archive (.sar) or API archive (.aar) file from an API toolkit project directory, use the following syntax.-
zconbt -pd=<projectDirectory> -od= <projectDirectory> -
zconbt -pd=<projectDirectory> -f=<filename>.sar -
zconbt -pd=<projectDirectory> -f=<filename>.aar
Note: Depending on the service provider, the steps and the tools to create a service might differ. For example, for the IMS service provider, you must use the API toolkit to create a service. If an automated process is required for service archive file generation such as in a DevOps environment, you can use the build toolkit to generate the IMS service archive file from the API toolkit service project directory. For some service providers, a service must be generated by using the build toolkit with a properties file as the input. For more information, see Creating services. -
- Parameter usage
-
- -p | --properties
- Specifies the name of the properties file that is used to create the service archive file or
artifacts for API requester.Note: The properties file must use UTF-8 encoding.
- -pd | --projectDirectory
- Added in Build toolkit V1.1. Specifies the path and project directory name that is used to create the service archive file or API archive file. Use this parameter for service projects or API projects that are created in API toolkit.
- -f | --file
- Specifies the path and file name of the service archive file, the API archive file, or the API requester archive file to be generated. The file type is .sar, .aar, or .ara.
- -od | --outputDirectory
- Added in Build toolkit 1.1. Specifies the path and directory name for the output service archive file or API archive file to be generated. The service or API archive file inherits the same name as the service or API with a .sar or .aar file extension.
- -r | --reportError
- If specified, returns more specific error response codes. 0 - Success, 4 - Warning, 8 - Error.
- -v | --verbose
- If specified, returns more detailed information. (There is no trace utility.)
- -h | --help
- If specified, returns a list of available options that the user can enter.
- Examples: Service archive generation
-
- The following example command uses the values in the health.properties file
to generate the service archive.
zconbt --properties=health.properties --file=./health.sar - The following example commands use files in service project directories to generate service
archive files in the SARs output directory.
zconbt --projectDirectory=./u/serviceProjects/HospitalService --outputDirectory=./u/SARszconbt --projectDirectory=./u/serviceProjects/CatalogService --outputDirectory=./u/SARs - The following example commands use files in service project directories to generate service
archive files with specified names.
zconbt --projectDirectory=./u/serviceProjects/HospitalService --file=./u/SARs/Hospital.sarzconbt --projectDirectory=./u/serviceProjects/CatalogService --file=./u/SARs/Catalog.sar
For more information about service archive generation depending on the service providers, see Generating service archives for DevOps.
- The following example command uses the values in the health.properties file
to generate the service archive.
- Examples: API archive generation
-
- The following example commands use files in API project directories to generate API archive
files in the AARs output directory.
zconbt --projectDirectory=./u/apiProjects/lookupAPI --outputDirectory=./u/AARszconbt --projectDirectory=./u/apiProjects/purchaseAPI --outputDirectory=./u/AARs - The following example commands use files in API project directories to generate API archive
files with specified names.
zconbt --projectDirectory=./u/apiProjects/lookupAPI --file=./u/AARs/lookup.aarzconbt --projectDirectory=./u/apiProjects/purchaseAPI --file=./u/AARs/purchase.aar
- The following example commands use files in API project directories to generate API archive
files in the AARs output directory.
- Example: API requester artifacts generation
-
The following example command uses the values in the watson.properties file to generate artifacts for API requester.
zconbt --properties=watson.properties --file=./watson/archives/Watson.araFor more information about how to prepare the properties file and the generated output, see Generating artifacts for an API requester from the command line.
apideploy command syntax
zosConnect-2.0 Applies to zosConnect-2.0.
- Syntax
-
-
apideploy -deploy -a <path to api archiveFile> -p <path to apiDeploy location> -w -
apideploy -undeploy -a <path to api archiveFile> -p <path to apiDeploy location>
-
- Parameters
-
- -deploy
- Specifies the API deployment task.
- -undeploy
- Specifies the API undeployment task.
- -a
- Specifies the relative or absolute path to the API archive file. The archive file has a file type of .aar. The path cannot include parentheses and soft links are not supported.
- -p
- Specifies the relative or absolute path to the API deployment location for the server. For example, <WLP_USER_DIR>/servers/<serverName>/resources/zosconnect/apis. The path cannot include parentheses and soft links are not supported.
- -w
- If specified, the API replaces the API, if it is already deployed, with the new version. The API identifier is the API name that is specified in the z/OS Connect API toolkit when you create the API.
- Examples
-
The following example deploys the API that is defined in the goodhealth.aar file by specifying an absolute path to the .aar file and an absolute path to the API deployment directory.
apideploy -deploy -a /usr/lpp/myAPIs/goodhealth.aar -p <WLP_USER_DIR>/servers/<serverName>/resources/zosconnect/apisThe following example redeploys an API by specifying the -w parameter.
apideploy -deploy -a /usr/lpp/myAPIs/goodhealth.aar -p <WLP_USER_DIR>/servers/<serverName>/resources/zosconnect/apis -wThe following example undeploys the API that is defined in the goodhealth.aar file by specifying an absolute path to the .aar file and an absolute path to the API deployment directory.apideploy -undeploy -a /usr/lpp/myAPIs/goodhealth.aar -p <WLP_USER_DIR>/servers/<serverName>/resources/zosconnect/apis