CPYTCPHT
Copier table hôtes TCP/IP
Copy TCP/IP Host Table
En bref
La commande Copier la table des hôtes TCP/IP (CPYTCPHT) permet de copier le contenu de la table des hôtes TCP/IP vers un membre de fichier physique ou un objet du système de fichiers intégré. The Copy TCP/IP Host Table (CPYTCPHT) command is used to copy the contents of the TCP/IP host table to a physical file member or integrated file system object.
CPYTCPHT se lit CPY
(Copier) + TCPHT.
Sur IBM i, le nom d'une commande associe presque toujours un verbe et un objet.
Syntaxe minimale
CPYTCPHT
Paramètres
-
TOFILEFichier de destination -
TOMBRMembre de destination -
MBROPTRemplacement ou ajout enregs -
TOOBJObjet cible To object -
REPLACERemplacer l'objet Replace object
Astuce : dans une session 5250, tapez CPYTCPHT puis F4 pour
l'invite de saisie, et F1 sur un paramètre pour son aide.
Aide IBM i de la commande
Texte du F1, IBM i 7.5 en français
(bibliothèque QSYS)
Où s'exécute : Tous les environnements (*ALL)
Compatible multitâche : Non
La commande Copier la table des hôtes TCP/IP (CPYTCPHT) permet de copier le contenu de la table des hôtes TCP/IP vers un membre de fichier physique ou un objet du système de fichiers intégré. Le membre de fichier physique ou l'objet obtenu peut servir d'entrée à la commande Fusionner la table des hôtes TCP/IP (MRGTCPHT) pour modifier le contenu de la table des hôtes TCP/IP. The Copy TCP/IP Host Table (CPYTCPHT) command is used to copy the contents of the TCP/IP host table to a physical file member or integrated file system object. The resulting physical file member or object may be used as input to the Merge TCP/IP Host Table (MRGTCPHT) command to modify the contents of the TCP/IP host table.
Remarque :Cette commande copie la table des hôtes TCP/IP au format *OPSYS. Voir le texte d'aide de la commande MRGTCPHT pour plus de détails. Remarque :This command copies the TCP/IP host table in *OPSYS format. See the MRGTCPHT command help text for more details.
Paramètres
| Mot-clé | Description | Valeurs possibles | Remarques |
|---|---|---|---|
| TOFILE | Fichier de destination | Nom d'objet qualifié | Facultatif |
| Qualificatif 1: Fichier de destination | Nom, QTCPHT | ||
| Qualificatif 2: Biblio | Nom, *LIBL, *CURLIB | ||
| TOMBR | Membre de destination | Nom, *FIRST | Facultatif |
| MBROPT | Remplacement ou ajout enregs | *REPLACE, *ADD | Facultatif |
| TOOBJ | Objet cibleTo object | Chemin d'accès | Facultatif |
| REPLACE | Remplacer l'objetReplace object | *NO, *YES | Facultatif |
Fichier de destination (TOFILE)
Indique le fichier physique vers lequel la table des hôtes TCP/IP est copiée. Si le fichier n'existe pas, un fichier physique est créé dans la bibliothèque indiquée. Si le fichier est créé, le droit public sur le fichier est identique au droit de création indiqué pour la bibliothèque dans laquelle le fichier est créé. Utilisez la commande Afficher la description d'une bibliothèque (DSPLIBD) pour afficher le droit de création de la bibliothèque. Specifies the physical file to which the TCP/IP host table is copied. If the file does not exist, a physical file is created in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.
Qualificatif 1: Fichier de destination
- QTCPHT
- Le nom de fichier par défaut. The default file name.
- nom
- Indiquez le nom du fichier physique vers lequel la table des hôtes TCP/IP est copiée. Specify the name of the physical file to which the TCP/IP host table is copied.
Qualificatif 2: Biblio
- *LIBL
- La liste de bibliothèques est utilisée pour localiser le fichier. Si le fichier est introuvable, un fichier est créé dans la bibliothèque en cours. S'il n'existe pas de bibliothèque en cours, le fichier est créé dans la bibliothèque QGPL. The library list is used to locate the file. If the file is not found, one is created in the current library. If no current library exists, the file will be created in the QGPL library.
- *CURLIB
- La bibliothèque en cours de l'unité d'exécution est utilisée pour localiser le fichier. Si aucune bibliothèque n'est indiquée comme bibliothèque en cours de l'unité d'exécution, la bibliothèque QGPL est utilisée. The current library for the thread is used to locate the file. If no library is specified as the current library for the thread, the QGPL library is used.
- nom
- Indiquez le nom de la bibliothèque à rechercher. Specify the name of the library to be searched.
Membre de destination (TOMBR)
Indique le nom du membre de fichier physique vers lequel la table des hôtes TCP/IP est copiée. Specifies the name of the physical file member to which the TCP/IP host table is copied.
- *FIRST
- Le premier membre du fichier reçoit la sortie. Si TOMBR(*FIRST) est indiqué et que le membre n'existe pas, le système crée un membre portant le nom du fichier indiqué pour le paramètre Fichier de destination (TOFILE). Si le membre existe déjà, vous avez la possibilité d'ajouter les nouveaux enregistrements à la fin du membre existant ou d'effacer le membre puis d'ajouter les nouveaux enregistrements. The first member in the file receives the output. If TOMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the Fichier de destination (TOFILE) parameter. If the member already exists, you have the option to add new records to the end of the existing member or clear the member and then add the new records.
- nom
- Indiquez le nom du membre de fichier qui reçoit la sortie. S'il n'existe pas, le système le crée. Specify the name of the file member that receives the output. If it does not exist, the system creates it.
Remplacement ou ajout enregs (MBROPT)
Indique si les nouveaux enregistrements remplacent les enregistrements existants ou y sont ajoutés. Specifies whether the new records replace or are added to the existing records.
- *REPLACE
- Le système efface le membre existant et ajoute les nouveaux enregistrements. The system clears the existing member and adds the new records.
- *ADD
- Le système ajoute les nouveaux enregistrements à la fin des enregistrements existants. The system adds the new records to the end of the existing records.
Objet cible (TOOJB)To object (TOOJB)
Indique le chemin d'accès de l'objet copié. Il s'agit du nom du nouvel objet, y compris le chemin d'accès ou le chemin d'accès relatif. Specifies the path name of the copied object. This is the name of the new object, including the path or relative path.
Pour plus d'informations sur l'indication des chemins d'accès, voir « Règles de dénomination des objets » dans l'ensemble de rubriques CL de la catégorie Programmation de l'IBM i Information Center à l'adresse http://www.ibm.com/systems/i/infocenter/. For more information on specifying path names, refer to "Object naming rules" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
Remarque :Ce paramètre est compatible Unicode. Voir « Prise en charge d'Unicode dans CL » dans l'ensemble de rubriques CL de la catégorie Programmation de l'IBM i Information Center à l'adresse http://www.ibm.com/systems/i/infocenter/ pour plus d'informations. Remarque :This parameter is Unicode-enabled. See "Unicode support in CL" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ for additional information.
Remplacer l'objet (REPLACE)Replace object (REPLACE)
Indique si l'objet cible est remplacé s'il existe déjà. Specifies whether the target object is replaced if it already exists.
- *NO
- L'objet cible n'est pas remplacé s'il existe déjà. The target object is not replaced if it already exists.
- *YES
- Si l'objet cible existe déjà, il est remplacé. If the target object already exists, it is replaced.
Exemples
Exemple 1 : Copie de la table des hôtes avec les valeurs par défaut Example 1: Copying Host Table Using Defaults
CPYTCPHT
Cette commande effectue les opérations suivantes : This command will do the following:
- Si un fichier physique nommé QTCPHT se trouve dans l'une des bibliothèques de la liste de bibliothèques, le premier membre du fichier est effacé et le contenu de la table des hôtes TCP/IP est copié dans le premier membre du fichier. Si le fichier ne contient aucun membre, un membre nommé QTCPHT est ajouté au fichier et le contenu est copié dans ce membre. If a physical file named QTCPHT is found in one of the libraries on the library list, the first member in the file will be cleared and the TCP/IP host table contents will be copied to the first member in the file. If no members exist in the file, a member named QTCPHT will be added to the file and the contents will be copied to that member.
- Si aucun fichier nommé QTCPHT n'est trouvé, le fichier physique QTCPHT est créé dans la bibliothèque en cours (ou dans la bibliothèque QGPL s'il n'existe pas de bibliothèque en cours), un membre nommé QTCPHT est ajouté au fichier et le contenu de la table des hôtes est copié dans ce membre. If a file named QTCPHT is not found, physical file QTCPHT will be created in the current library (or in library QGPL if no current library exists), a member named QTCPHT will be added to the file, and the host table contents will be copied to that member.
Exemple 2 : Copie de la table des hôtes vers un membre de fichier donné Example 2: Copying Host Table to a Specific File Member
CPYTCPHT TOFILE(MYLIB/MYFILE) TOMBR(MBR2) MBROPT(*ADD)
Cette commande effectue les opérations suivantes : This command will do the following:
- Si le fichier physique MYLIB/MYFILE existe et que le membre MBR2 existe, le contenu de la table des hôtes est ajouté à la fin du membre MBR2. If physical file MYLIB/MYFILE exists and member MBR2 exists, the host table contents will be added to the end of member MBR2.
- Si le fichier physique MYLIB/MYFILE existe et que le membre MBR2 n'existe pas, MBR2 est ajouté au fichier et le contenu de la table des hôtes est copié dans MBR2. If physical file MYLIB/MYFILE exists and member MBR2 does not exist, MBR2 will be added to the file and the host table contents will be copied to MBR2.
- Si le fichier physique MYLIB/MYFILE n'existe pas, le fichier MYFILE est créé dans la bibliothèque MYLIB, un membre nommé MBR2 est ajouté au fichier et le contenu de la table des hôtes est copié dans MBR2. If physical file MYLIB/MYFILE does not exist, file MYFILE will be created in library MYLIB, a member named MBR2 will be added to the file, and the host table contents will be copied to MBR2.
Exemple 3 : Copie de la table des hôtes vers un objet du système de fichiers intégré Example 3: Copying Host Table to an Integrated File System Object
CPYTCPHT TOOBJ('/QIBM/USERDATA/HOSTCOPY') REPLACE(*YES)
Cette commande copie la table des hôtes vers l'objet nommé HOSTCOPY situé dans le répertoire /QIBM/USERDATA/. Si l'objet existe déjà, il est remplacé. This command copies the host table to the object named HOSTCOPY located in the directory /QIBM/USERDATA/. If the object already exists, it will be replaced.
Messages d'erreur
Messages *ESCAPE *ESCAPE Messages
- CPF9860
- Erreur lors du traitement du fichier de sortie.
Remarque :Voir la commande Copier un objet (COPY) pour des informations sur les autres messages d'erreur pouvant être signalés lors de l'indication du paramètre Objet cible (TOOBJ) de cette commande. Remarque :Refer to the Copier un objet (COPY) command for information about other error messages that may be signaled when specifying the To object (TOOBJ) parameter of this command.
© Copyright IBM Corp. Texte d'aide reproduit à des fins de formation.