CD Process Concepts Guide
CD Process Concepts Guide
CD Process Concepts Guide
Connect:Direct
Process Concepts and Examples Guide
PN 00448
Connect:Direct
Connect:Direct Process Concepts and Examples Guide First Edition February 2004 This documentation was prepared to assist licensed users of the Connect:Direct system (Sterling Commerce Software). The Sterling Commerce Software, the related documentation and the information and know-how it contains, is proprietary and confidential and constitutes valuable trade secrets of Sterling Commerce, Inc., its affiliated companies or its or their licensors (collectively Sterling Commerce), and may not be used for any unauthorized purpose or disclosed to others without the prior written permission of Sterling Commerce. The Sterling Commerce Software and the information and know-how it contains have been provided pursuant to a license agreement which contains prohibitions against and/or restrictions on its copying, modification and use. Duplication, in whole or in part, if and when permitted, shall bear this notice and the Sterling Commerce, Inc. copyright legend. Where any of the Sterling Commerce Software is used, duplicated or disclosed by or to the United States government or a government contractor or subcontractor subject to the FARs, it is provided with RESTRICTED RIGHTS as defined in Title 48 CFR 52.227-19. Further, as and when provided to any governmental entity, governmental contractor or subcontractor subject to DFARs, the Sterling Commerce Software is provided pursuant to the customary Sterling Commerce license, as described in Title 48 CFR 227-7202 with respect to commercial software and commercial software documentation. The Sterling Commerce Software and the related documentation are licensed either AS IS or with a limited warranty, as described in the Sterling Commerce license agreement. Other than any limited warranties provided, NO OTHER WARRANTY IS EXPRESSED AND NONE SHALL BE IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR USE OR FOR A PARTICULAR PURPOSE. The applicable Sterling Commerce entity reserves the right to revise this publication from time to time and to make changes in the content hereof without the obligation to notify any person or entity of such revisions or changes. References in this manual to Sterling Commerce products, programs, or services do not imply that Sterling Commerce intends to make these available in all countries in which Sterling Commerce operates. Printed in the United States of America. Copyright 1984, 2004. Sterling Commerce, Inc. All rights reserved. Connect:Direct is a registered trademark of Sterling Commerce. All Third Party Software names are trademarks or registered trademarks of their respective companies. All other brand or product names are trademarks or registered trademarks of their respective companies.
CDPRCON402
Contents
Preface
Connect:Direct Process Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Notational Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting Support for Sterling Commerce Products . . . . . . . . . . . . . . . . . . . . . . . . . .
xi
xi xii xiii
1
1 2 3
5
5 5 5 5 6 6 6 6 6 6 7 7 7 8 8 8 9 9 9 9
iii
Contents
Special Purpose Bracketing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bracketing Backslashes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Single and Double Quotation Marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SUBMIT Statement Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Symbolic Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10 10 11 11 12 12 13
15
15 15 15 16 16 16 17 17
19
19 19 20 20 21 21 22 22 22 22 23 23 23 24 24 25 26 26 26 26 27 27 27 27 28 28
iv
Contents
Creating and Copying a VSAM RRDS Data Set . . . . . . . . . . . . . . . . . . . . . . . . . Creating and Copying a VSAM Linear Data Set . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Data Set with a Security Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from Connect:Direct Tandem to Connect:Direct OS/390 . . . . . . Copying to OS/390 Nodes with Unique Member Name Allocation (AXUNIQ Exit) . . Resolution of a Unique Member Name by Appending a Digit. . . . . . . . . . . . . . . Resolution of a Unique Member Name by Truncating and Appending a Digit . . Copying Between OS/390 and OS/400 Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Sequential File from OS/390 to a Member of a Physical Data Base File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Member of a Physical Data Base File from OS/400 to a Sequential File on OS/390 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Data Set from OS/390 to a Spooled File on OS/400 . . . . . . . . . . . . . Copying a Member of a PDS from OS/390 to a Spooled File on OS/400. . . . . . Copying Between OS/390 and Tandem Nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Submitting a Process from a Connect:Direct Tandem Node that Copies a File from OS/390 to Tandem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying to an Entry-Sequenced File (OS/390 to Tandem). . . . . . . . . . . . . . . . . Creating an Unstructured Code Type 101 File (OS/390 to Tandem) . . . . . . . . . Creating an Unstructured Code Type 0 File (OS/390 to Tandem) . . . . . . . . . . . Copying an Unstructured Code Type 0 File from Tandem to OS/390 . . . . . . . . Copying a Sequential File from an OS/390 Node to a Tandem Node . . . . . . . . Copying a File Submitted from OS/390 to Tandem . . . . . . . . . . . . . . . . . . . . . . Copying a File from Tandem on an EXPAND Network to OS/390 . . . . . . . . . . . Copying a File from Tandem to OS/390 After Running DMRTDYN on OS/390 . Using FUP in a Process Submitted on OS/390 to Delete a File on Tandem . . . Using Connect:Direct to Allocate a Partitioned File on a Single System (OS/390 to Tandem) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SYSOPTS Syntax Conventions (OS/390 to Tandem) . . . . . . . . . . . . . . . . . . . . Copying a File from a Tandem Spooler to an OS/390 Node . . . . . . . . . . . . . . . Copying Between an OS/390 Node and a Remote Tandem Spooler on an EXPAND Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files Between the Tandem Spooler System and an OS/390 Node Using Job Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Disk File from Tandem to a Tape Device at OS/390 . . . . . . . . . . . . . Copying a Tape File from OS/390 to a Disk File on Tandem . . . . . . . . . . . . . . . Copying a File from OS/390 to Tandem Using the FASTLOAD Option . . . . . . . Allocating a VSAM Data Set and Copying a File from Tandem to OS/390. . . . . Copying Between OS/390 and UNIX Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files Between UNIX and OS/390 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files Between OS/390 and UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between OS/390 and OpenVME Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files Between OpenVME and OS/390 . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from OpenVME to OS/390 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between OS/390 and VM Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from OS/390 to VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying an OS/390 PDS to a Set of Files on VM . . . . . . . . . . . . . . . . . . . . . . . . Copying an OS/390 File to Tape on VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying an OS/390 File to Spool on VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28 29 29 29 30 30 30 31 31 31 32 33 33 33 33 34 34 35 35 35 36 37 37 38 38 39 39 40 40 40 41 42 43 43 44 45 45 45 46 46 46 46 47
Contents
Copying Between OS/390 and OpenVMS Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying PDS Members from OS/390 to OpenVMS . . . . . . . . . . . . . . . . . . . . . . Using the SYSOPTS Parameter (OS/390 to OpenVMS) . . . . . . . . . . . . . . . . . . Copying a File from Disk to Tape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from Tape to Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying from OS/390 to OpenVMS and Specifying a User-Defined Translation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Single Entry from the OpenVMS Text Library to an OS/390 Member Copying All Entries from an OpenVMS Text Library to OS/390 . . . . . . . . . . . . . Copying a Data Set from an OS/390 Node to an Executable File on an OpenVMS Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying an Executable File from an OpenVMS Node to an OS/390 Node . . . . Copying Between OS/390 and VSE Nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from OS/390 to VSE (DYNAM/T Tape Files) . . . . . . . . . . . . . . . Copying an OS/390 PDS Member to a New VSE File in a DYNAM Pool . . . . . . Copying an OS/390 BSAM File to a VSE-Controlled Disk Data Set . . . . . . . . . . Copying an OS/390 Sequential Data Set or PDS to a VSE-Controlled Tape Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying an OS/390 PDS Member to a VSE BSAM Sublibrary Member . . . . . . Copying an OS/390 PDS Member to a VSE VSAM Sublibrary Member . . . . . . Copying an OS/390 Sequential Data Set or OS/390 PDS to a VSE-Controlled Tape Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between OS/390 and Windows Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from OS/390 to Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between Tandem Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying to an Entry-Sequenced File (Tandem to Tandem) . . . . . . . . . . . . . . . . Copying Files Between Tandem Spooler Systems . . . . . . . . . . . . . . . . . . . . . . . Copying Between Tandem and OS/400 Nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Tandem File to an OS/400 Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between Tandem and UNIX Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Text Files from Tandem to UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Binary Files from Tandem to UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between Tandem and VM Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files from Tandem to VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSAM File from VM to an Entry-Sequenced Tandem File. . . . . . . . . Copying a VSAM File from VM to a Key-Sequenced Tandem File. . . . . . . . . . . Copying Between Tandem and OpenVMS Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Tandem Key-Sequenced File to a Connect:Direct OpenVMS Node . Copying an OpenVMS Key-Sequenced File to a Connect:Direct Tandem Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between Tandem and VSE Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files from Tandem to VSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Tandem File to a VSE VSAM File . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSE VSAM File to a Tandem Node . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between UNIX Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files and Using sysopts (UNIX to UNIX) . . . . . . . . . . . . . . . . . . . . . . . Copying Files and Using the Checkpointing Feature (UNIX to UNIX) . . . . . . . . Copying Files and Using the Compression Feature (UNIX to UNIX) . . . . . . . . . Archiving Files Using the Connect:Direct UNIX Pipe I/O Function . . . . . . . . . . . Restoring Files Using the Connect:Direct UNIX Pipe I/O Function . . . . . . . . . . . Archiving and Restoring Files in a Single Step Using the Connect:Direct UNIX Pipe I/O Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
47 47 47 48 48 48 49 49 49 50 51 51 52 52 53 53 54 55 56 56 57 57 57 58 58 58 58 59 59 59 60 60 61 61 61 62 62 62 63 63 63 64 64 65 65 65
vi
Contents
Copying Between UNIX and OS/400 Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files from UNIX to a Member on OS/400 . . . . . . . . . . . . . . . . . . . . . . . Copying Files from UNIX to a Member on OS/400 . . . . . . . . . . . . . . . . . . . . . . . Copying Save Files from OS/400 to UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Save Files from UNIX to OS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Executables from UNIX to OS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between UNIX and Windows Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from UNIX to Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between OpenVME Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files and Using the Checkpointing Feature (OpenVME to OpenVME) Copying Files Between OpenVME and UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files and Using SYSOPTS (OpenVME to UNIX) . . . . . . . . . . . . . . . . . Copying Files and Using the Checkpointing Feature (UNIX to OpenVME) . . . . Copying Files Between OpenVME and Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from OpenVME to Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between VM Nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VM File to VM Spool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying an Entire Minidisk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying from Disk to Tape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VM to VM Group File Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying VM files to a Shared File System (SFS) . . . . . . . . . . . . . . . . . . . . . . . . Extracting an SFS File and Placing the File on the VM Reader Spool . . . . . . . . Copying Between VM and OpenVMS Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files from VM to OpenVMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between VM and VSE Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VM Sequential File to a CA-DYNAM/T Tape File (VSE) . . . . . . . . . . Copying a DYNAM-Controlled File to a VM Node. . . . . . . . . . . . . . . . . . . . . . . . Copying VM Sequential Files to CA-DYNAM/D Files (VSE) . . . . . . . . . . . . . . . . Using a Typekey to Copy a DYNAM-Controlled File to a VM Node . . . . . . . . . . Copying Between VM and OS/400 Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Files from VM to OS/400. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying VSAM Files from VM to OS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VM-Initiated Copy from OS/400 to VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VM-Initiated Copy VM to OS/400 Spool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VM-Initiated Copy from OS/400 to VM Spool . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VM VSAM file to OS/390 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VM VSAM file to OS/390 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a CMS Disk File to an OS/390 Node . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between VM and UNIX Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VM CMS Sequential File to UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying VM and Windows Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a CMS Sequential File from VM to Windows 95 . . . . . . . . . . . . . . . . . . Copying a VM CMS File to Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between OpenVMS Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from Disk to Tape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from Tape to Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Symbolics in a COPY Statement (Connect:Direct OpenVMS) . . . . . . . . . Copying a Sequential File to a Text Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between OpenVMS and VSE Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSE Sequential File to an OpenVMS Node. . . . . . . . . . . . . . . . . . . .
66 66 66 66 67 67 67 67 68 68 69 69 69 70 70 70 70 70 71 71 72 75 75 75 75 75 76 76 77 78 78 79 79 80 80 81 81 81 82 82 83 83 83 84 84 84 84 85 85 85
vii
Contents
Copying Between VSE Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSE Sequential File to Another VSE Sequential File . . . . . . . . . . . . Copying a VSE Non-Labeled Tape to a VSE Sequential File . . . . . . . . . . . . . . . Copying the Connect:Direct Message File to SL Tape . . . . . . . . . . . . . . . . . . . . Copying a Non-managed Disk Data Set into Another Non-managed CKD Disk Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Noncontrolled Disk Data Set to a Managed CKD Disk Data Set . . . . Copying a Nonmanaged Disk File into a Start Track 1 FBA Noncontrolled Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying to Non-TMS Controlled Tapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Nonmanaged Disk File to a CA-DYNAM/D or CA-EPIC Start Track 1 FBA Noncontrolled Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Printing a Managed Disk Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a Noncontrolled Sequential File to a MSAM File . . . . . . . . . . . . . . . . . Copying a Noncontrolled Tape Data Set to a Controlled Disk File . . . . . . . . . . . Copying Nonmanaged Disk Data Set to a Nonmanaged Tape Data Set . . . . . . Copying a Managed Disk Data Set to Another Managed Data Set . . . . . . . . . . Copying a Managed Generation Disk Data Set to Another Managed Data Set . Copying a Controlled Disk Data Set to a Controlled Tape Output File . . . . . . . . Copying a Controlled BSAM Data Set to a MSAM Output Data Set. . . . . . . . . . Copying a Controlled Tape Data Set to a Controlled FBA Disk Output Data Set Copying a Controlled CKD Disk Data Set to a Noncontrolled Tape Data Set. . . Copying a VSE Sublibrary Member from a BSAM Sublibrary to a Controlled Disk Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSE Sublibrary Member from a BSAM Sublibrary to a Controlled Tape Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSE/POWER LST Queue Member to a Controlled Disk Data Set . . Copying a BSAM VSE Sublibrary to a New VSE BSAM Library. . . . . . . . . . . . . Copying a BSAM VSE Sublibrary to a New OS/390 PDS. . . . . . . . . . . . . . . . . . Copying a MSAM Data Set to a Controlled BSAM Data Set. . . . . . . . . . . . . . . . Copying Between VSE and OS/400 Nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSE VSAM to an OS/400 PDS Member . . . . . . . . . . . . . . . . . . . . . . Copying a VSE VSAM File to an OS/400 Spooled File. . . . . . . . . . . . . . . . . . . . Copying Between VSE and OS/390 Nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSE Librarian BSAM Member to a Preallocated OS/390 PDS Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSAM VSE Library Member to a Preallocated OS/390 PDS Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a VSE/POWER LST Queue Member to a Preallocated OS/390 PDS . Copying Files Between VSE and UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from UNIX HP to a Controlled Disk Data Set Using LU6.2 . . . . . Copying a File from HP UNIX to a Controlled Disk Data Set Using TCP/IP . . . . Copying Between Windows and OS/390 Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from Windows to OS/390 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying Between Windows and Tandem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying a File from Windows to Tandem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
86 86 86 87 87 88 88 89 90 91 91 92 93 94 94 95 96 96 97 98 98 100 100 101 103 104 104 104 104 104 105 106 108 108 108 109 109 110 110
111
111 112 112 112
viii
Contents
Printing and Keeping the Log File (Connect:Direct OpenVMS) . . . . . . . . . . . . . RUN JOB Facility (VM to VM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running a Job on the OS/390 Node from a Process Submitted on the Tandem Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running a Job on the OS/400 Node from a Process Submitted on the OS/390 Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running a Job on UNIX from a Process Submitted from Another UNIX Node . . Executing Commands on UNIX from a Process Submitted from OS/390. . . . . . Running a Job on OS/390 from a Process Submitted on UNIX . . . . . . . . . . . . . Executing Commands on UNIX from a Process Submitted from Tandem . . . . . Running a Job on OS/390 from a Process Submitted on OpenVME . . . . . . . . . Running a Job on Windows from a Process Submitted on UNIX . . . . . . . . . . . .
112 113 113 114 114 114 114 115 115 115
117
117 118 118 119 120 120 121 121 121 122 122 123 124 124 125 125 126 127 128 128 129 129 130 130 130 131 131 132 132
ix
Contents
Submitting a Process from UNIX to Run a Program on OS/400. . . . . . . . . . . . . 132 Submitting a Process from UNIX to Run a Program on Windows . . . . . . . . . . . 132 Submitting a Process with a Run Task on an OpenVME Node to Run a Program on Another OpenVME Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Submitting a Process from OpenVME to Run a Program on Windows . . . . . . . 133 Notifying the OS/400 User of the Start of a Process. . . . . . . . . . . . . . . . . . . . . . 134 Submitting a Process from Connect:Direct Requester for Windows to Run DMRTSUB on OS/390 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
135
135 136 137 137 138 138
139
145
145 146 147 148
Index
149
Preface
The Connect:Direct Concepts and Examples Guide provides the information you need to write Connect:Direct Processes. This guide introduces you to the Process language and includes examples of syntax, statements, and Connect:Direct Processes that illustrate the full functionality of Connect:Direct.
The Connect:Direct Process documentation assumes knowledge of the operating systems for Connect:Direct products. If you are not familiar with a specific operating system, including its applications, network, and environment, refer to the appropriate library of manuals. For additional information about Connect:Direct, refer to the library of Connect:Direct documentation.
xi
Preface
Notational Conventions
The Connect:Direct Process documentation set uses certain notational conventions. This following table describes the conventions used the documentation set.
Notation Uppercase Letters Description Uppercase letters in the statement format indicate that you type in information as shown. For Connect:Direct UNIX, and OpenVME: Values must be in the proper case for the node on which they will be processed. For Connect:Direct Windows: This convention does not apply. Uppercase and Lowercase Letters A statement in uppercase letters followed by lowercase letters indicates an alternative to typing the entire statement. For example, PROCess means that you need only type PROC for the statement to be valid. For Connect:Direct UNIX, OpenVME and Windows: This convention does not apply. Lowercase Letters Lowercase letters or words in statements or syntax boxes require substitution by the user. For example, PNODE=primary-node-name indicates that you must provide the name of the primary node. For Connect:Direct UNIX, OpenVME, and Windows: This convention does not apply. Refer to Italic Letters for the notational convention used for variable substitution for these products. Bold Letters Bold print in syntax boxes indicates required labels, statements, and parameters. For example, DSN=filename indicates that the parameter DSN is required. For Connect:Direct UNIX, OpenVME, and Windows: In text, parameters are shown in boldface characters to differentiate them from surrounding text. Italic Letters For Connect:Direct UNIX, OpenVME and Windows, italic letters act as placeholders for information you must provide. For example, dsn=filename indicates that you would type the actual name for a file instead of the word shown in italic type. Underlining indicates default values for parameters and subparameters. For example, RETAIN=Yes|No|Initial specifies that the default for RETAIN is No. Vertical bars indicate that you can supply one of a series of values separated by the vertical bars. For example HOLD=Yes|No|Call specifies that Yes or No or Call is valid. Brackets indicate optional information within an optional parameter. For example, STARTT=([date|day][,hh:mm:ssXM]) indicates that you can specify either a date or a day, a date or a day plus a time, or just a time. For Connect:Direct OpenVMS: OpenVMS uses brackets in its directory naming convention. Because brackets are not available on most keyboards on IBM systems, use less than and greater than signs (< >) in a Connect:Direct Process that is submitted from the IBM node.
Brackets
xii
Preface
Description Horizontal ellipsis indicates that the preceding item may be repeated. For example, &symbolic_name_2=variable-string-2. . . indicates that you can specify multiple symbolic parameters. Vertical ellipsis indicates that not all of the data is displayed. Typically, the vertical series of ellipses is used in examples. Code all commas and parentheses as they appear. Process with a capital P refers to a Connect:Direct Process. Monospaced characters (characters of equal width) represent information for screens, commands, Processes, and reports.
xiii
Preface
xiv
Chapter 1
A Connect:Direct Process is a collective unit of work. Steps in each work unit are defined using a scripting language unique to the Connect:Direct product. The Connect:Direct Process language consists of statements and parameters that provide instructions for initiating such activities as: Copying files between systems Running jobs, programs, and commands Handling error situations through conditional logic Starting another Process Structure and syntax of Connect:Direct Process statements are discussed in Chapter 2, Process Statement Structure and Syntax. An integral part of Connect:Direct are commands that allow users to submit, monitor, and control the execution of Connect:Direct Processes. For command usage and syntax, refer to the Connect:Direct users guide for your operating environment.
Description executes a program or command within the Connect:Direct environment synchronous to the remaining steps in a Process. The program or command can execute on either the local or remote node. User programs can be run in different environments. allows one Process to be submitted from within another executing Process. The Process can execute on either the local or remote node. allows symbolic substitution of Process parameter values. controls Process step execution by allowing conditional tests of Process step return codes using IF THEN, ELSE, EIF, GOTO, and EXIT conditional logic statements. marks the end of a Process. There are no parameters associated with the pend statement.
pend statement (valid only for Connect:Direct UNIX, OpenVME, and Windows)
The user creates and submits a new Process or submits a predefined Process from a Connect:Direct Process library.
Step 2-Parsing for Correct Syntax
If the Process passes syntax checking, it is placed in an appropriate work queue according to Process parameters, such as priority, class, and start time. The Connect:Direct work queues are jointly referred to as the Transmission Control Queue (TCQ) or the process queue. A Process is found in one of the following states in the TCQ:
EXECUTION indicates that the Process is executing. WAIT indicates that the Process is waiting until a connection with the target node
(SNODE) is established or available based on Connect:Direct server configuration. Processes may also be waiting for their turn to execute on an existing session.
HOLD indicates that the Process was submitted with a Process HOLD or
RETAIN parameter. Process execution is held on the queue until released by an operator or the SNODE connects with a request for held work. The HOLD queue state also applies to Processes that stop executing when an error (HOLDERROR) occurs. If a Process is submitted with a RETAIN parameter, a copy of the Process will remain in the hold queue after successful execution.
TIMER indicates that the Process was submitted with a Process STARTT
parameter that designates the time, date, or both that the Process should begin execution. Processes that initially failed due to failure to connect with the SNODE or a file allocation failure may also be found in this queue state waiting for their retry interval to expire. Processes will retry automatically. A queued Process can be queried and manipulated through Connect:Direct commands such as SELECT, CHANGE, DELETE, FLUSH, and SUSPEND PROCESS. For complete information on the Connect:Direct commands and the various queues, refer to the Connect:Direct users guide for your platform. A message indicating that the Process completed successfully is returned when the Process is placed in the TCQ. The Process statements have been checked for syntax, but the Process may not have been selected for execution.
The Process is selected for execution based on Process parameters and the availability of the remote node.
Chapter 2
This chapter describes the components of a Connect:Direct Process and the syntax used in the Process language. An example Process is included.
Components of a Process
A Connect:Direct statement consists of the following components: Label Statement Identifier Parameters or Subparameters A discussion of each element follows.
Label
Connect:Direct statements are identified by user-defined labels. A label is any character or character string beginning in column one. The label consists of a 1-8 character alphanumeric string, with the first character alphabetic only. The PROCESS statement is the only statement that requires a label.
Statement Identifier
The statement identifier specifies the function requested. Statements must begin after column one. A statement identifier beginning in column one is considered a label by Connect:Direct. Statement identifiers are separated from parameters by one or more blanks or commas.
Parameters or Subparameters
Parameters or subparameters specify further instructions for the statement and must be set apart by one or more blanks or commas. Parameters can be either keyword or positional. Multiple symbolic substitutions must be separated by one or more spaces.
Connect:Direct Process Concepts and Examples Guide 5
Keyword Parameters
Keyword parameters are usually followed by an equal sign and may have a set of subparameters.
Positional Parameters
Positional parameters must be entered in a specific order, with commas replacing any parameter omitted. These parameters are always on the right of the equal sign. Positional parameters must be enclosed in parentheses, with the parentheses optionally preceded and followed by blanks or commas.
Subparameters
A positional parameter or the variable information in a keyword parameter is sometimes a list of subparameters. The list may contain both positional and keyword parameters. Positional subparameters must be enclosed in parentheses, with the parentheses optionally preceded and followed by blanks or commas.
Connect:Direct Syntax
This section describes the syntax used in constructing Connect:Direct Process statements.
Special Characters
Those symbols defined to be special characters in the Connect:Direct product are hyphens (-), two vertical bars (||), ampersands (&), and the following Connect:Direct delimiters or operators:
(blank) < > ( ) = (less-than sign) (greater-than sign) (parentheses) (equal sign) / \ , . (not sign) (slash) (backslash) (comma) (period) " [ ] {} * (single quotation mark) (double quotation mark) (brackets) (braces) (asterisk)
Note: The EBCDIC Hex value for the slash ( /) is XEO. The EBCDIC Hex value for the vertical bar (|) is X4F.
Commas
Commas have two functions:
Connect:Direct Syntax
Separate items within a list. Control the order of values specified as positional parameters. A comma must be used to indicate omission of a positional parameter.
SIGNON USERID=(id,,newpswd)
Do not use commas to separate multiple symbolics in a Process. Separate multiple symbolics with one or more spaces.
Continuation Marks
Use the hyphen as a continuation mark to indicate the statement continues on multiple lines. The hyphen must be separated from the preceding characters by at least one blank. For Connect:Direct Tandem: Both hyphen (-) and ampersand (&) are supported as continuation characters. For Connect:Direct UNIX, and OpenVME: Continuation characters are not required.
Parentheses
Parentheses enclose lists and associate a group of values. For example, the FROM clause of the COPY statement is enclosed in one set of parentheses. Lists in the FROM clause are nested in subsequent pairs of parentheses.
Asterisks
Asterisks are used to indicate generic specifications of parameters. With generics, you request information by specifying a single asterisk (*) or a character string plus an asterisk. For example, the following FROM clause of a COPY statement selects generically all member names beginning with ACCT (the first four characters of the data set names) from the PDS named PDS.SOURCE.
COPY FROM (DSN=PDS.SOURCE SELECT=(ACCT*))
For Processes for Connect:Direct OS/400: Asterisks precede some subparameters and must be typed when they are in the statement format shown in this manual. This is an OS/400 convention.
Comments
Comments allow you to include additional information within a Connect:Direct Process. Comments are allowed in the following formats: An asterisk (*) in column one, followed by the comment. Preceded by a slash-asterisk (/*) and followed by an asterisk-slash (*/).
Note: This format can be used after a continuation mark as well as at the beginning of a line.
Preceded by a slash-asterisk (/*), continuing over multiple lines, and terminated by an asterisk-slash (*/).
Note: The terminating */ cannot begin in column one. Note: The only permitted form of commenting for statements that will be processed by DMBATCH is an asterisk (*) in column one, followed by the comment.
The following example illustrates all of the ways you can use comments.
/* This type of comment can be written on one line*/ /* It can also continue across multiple lines. Remember that the terminating asterisk-slash cannot begin in column one. */ COPY FROM ( /* INPUT */ DSN=&DSN1 - /* SYMBOLIC DATA SET */ UNIT=SYSDA) * After submitting this Process, * enable the Connect:Direct UNIX node.
Resolves to:
DSN=CDNODE
Connect:Direct Syntax
The following example PROCESS statements illustrate the differences between the two types of concatenation for the SACCT parameter. In both examples, ampersands are used to indicate continuation of the PROCESS statement.
Resolves to:
DSN=CDBOB
Bracketing Backslashes
Bracketing backslashes are indicators of special processing of a character string and are not maintained as part of the string at its final resolution. For Connect:Direct OS/390, VM/ESA, and VSE/ESA: Use backslashes for bracketing. For Processes submitted from Connect:Direct Tandem, UNIX, OpenVME, and OpenVMS: Bracketing backslashes are not valid. For Connect:Direct Tandem and OpenVMS: Refer to the following section, Single and Double Quotation Marks, for details. Bracketing backslashes should be used to: Continue a string containing special characters across multiple lines. Ensure that quotation marks in the string are maintained. Both backslashes must be in the same line. If a string containing special characters continues across multiple lines, each line containing a special character must be enclosed in backslashes and must be concatenated. For example, the following SYSOPTS parameter for Connect:Direct OS/400 is a quoted string and must be enclosed in backslashes when it continues across multiple lines:
SYSOPTS= \"CMD(\ \SNDBRKMSG\ \)"\ || || -
Resolves to:
SYSOPTS=CMD(SNDBRKMSG)
10
Connect:Direct Syntax
If the bracketing character being used to enclose the string is also part of the character string, you must place an additional bracketing character where the single bracketing character is needed. For example:
PACCT= \DEPT\\MIS\ \602\ || -
Resolves to:
PACCT=DEPT\MIS602
COPY TO (DSN=\"C:\\PCDIR\\BAT.EXE"\)
For Connect:Direct OS/400 and OpenVMS: Syntax conventions require the entire SYSOPTS string to be enclosed in double quotation marks ( ). For Connect:Direct OS/390: The DMRTSUB utility requires parameters to be enclosed in double quotation marks ( ). The rules for using single and double quotation marks are as follows: Single-quoted strings allow the parsing of parameters as entered. Double-quoted strings allow the resolution of &values in a quoted string. For Connect:Direct UNIX, and OpenVME: The software supports the use of double quotation marks. Any other exceptions are noted in the text.
to:
'''BATCHID'''
11
This is an important to remember when a SUBMIT is performed between different platforms and products, such as from Connect:Direct UNIX to Connect:Direct OS/390 to Connect:Enterprise.
Symbolic Substitution
Symbolic substitution is used to substitute information in a Process. When Connect:Direct encounters an ampersand (&) followed by 1-8 alphanumeric characters, it will substitute a string represented by the ampersand and alphanumeric characters. For example:
&USERID=BOB DSN=CD || &USERID
Resolves to:
DSN=CDBOB
Symbolic resolution occurs before concatenation. The following is an example of enclosing a string in double quotation marks to allow resolution of the symbolic &FILTYP.
PROC2 PROCESS COPY FROM TO SNODE=CD.VM &FILTYP=FT (DSN=OS390.DATA DISP=SHR) (DSN="FN || &FILTYP" LINK=(IVVB,WIVVB,W,191) DISP=(RPL)) -
Note: Double quotation marks are not valid for symbolic substitution in Windows. The SYMBOL statement and concatenation must be used.
Termination
A statement is terminated by the end of data without a continuation mark.
12
Example
Example
The following example Process uses Connect:Direct OS/390 Process statements to illustrate product functionality.
/* COPY01 PROCESS -copies PDS members beginning with INV* to the Chicago node if successful, runs USERJOB on the Chicago node to modify data copies modified FILEA back from Chicago if not successful, sends NOTIFY to inform about STEP01 failure
Modification History: 04.Jul.1998 */ COPY01 STEP01 PROCESS SNODE=CD.CHICAGO COPY FROM (DSN=MASTER.PDS SELECT=INV*) TO (DSN=MUNGE.ME) IF STEP02 RUN JOB (STEP01 < 8) THEN CSG Initial Implementation
/* send PDS member INVxxxx /* to Chicago and place in /* file MUNGE.ME (only 1 /* member matches criteria) /* if copy successful */
*/ */ */ */
(DSN="xxNT") SNODE SYSOPTS=\"PGM(fix.bat)\ || \ARGS (PO_num)"\ FROM (DSN=MUNGE.ME SNODE) TO (DSN=MODIFIED || %SUBDATE)
STEP03
COPY
ELSE STEP04 RUN TASK EIF /* or if step 1 failed */ (PGM=DMNOTIFY, PARM=(FAIL, FILEA || %SUBDATE)) PNODE
A description of the Process follows: COPY01 is a PROCESS statement that identifies the secondary node (SNODE) as CD.CHICAGO. The SNODE is the Connect:Direct node that interacts with the primary node (PNODE) during Process execution. The SNODE can also be referred to as the participating, target, or remote node. A remote node must be specified in every Process. The PNODE is the Connect:Direct node on which the Process is submitted. The PNODE may also be referred to as the local node. PNODE is used for documentation only. STEP01 is a COPY statement that copies a file on the PNODE to a file on the SNODE. STEP02 and STEP03 use Conditional statements. If STEP01 completes successfully (that is, the return code [RC] is less than 8), the THEN path is taken and STEP02 and STEP03 execute. If STEP01 fails, the ELSE path is taken and STEP04 executes. STEP04 is a RUN TASK statement. The DMNOTIFY program executes within the Connect:Direct environment. See the following chapters for examples on various operating systems.
13
14
Chapter 3
This chapter contains examples of Process Statements. Each Process statement example contains a different set of parameters.
For Connect:Direct UNIX, VSE/ESA, OpenVMS, and Tandem nodes: NOTIFY is ignored.
PROC1 PROCESS SNODE=CD.AS400 PRTY=8 NOTIFY=USER1 CLASS=4 SNODEID=(USER1,PWD) -
Using %PNODE
This Process shows using a variable to substitute to %PNODE. %PNODE is set to the node name from which the Process is submitted.
Note:
PROC1 STEP1
16
step01
copy from
to
pend
Specifying a Process Starting Day and Time (Connect:Direct UNIX and Connect:Direct OpenVME)
This Process shows how to specify the day and time for execution of a Process. In this example, the Process will execute today at 3:31 p.m. The day and time must be separated by a comma, and the string enclosed in parentheses.
oc2 step01 process copy from snode=unix.node startt=(today, 03:31:00 pm) ( file=file1 snode ) ( file=file1 pnode )
to
pend
18
Chapter 4
This chapter contains examples of Connect:Direct COPY statements for various Connect:Direct platforms. Cross platform COPY statements are emphasized. Examples in this chapter are divided into the following sections: File allocation (OS/390 to OS/390) Copying PDS to PDS (OS/390 to OS/390) Copying to tape (OS/390 to OS/390) Copying files using exits (OS/390 to OS/390) Copying files using SMS parameters Copying to OS/390 nodes with unique member name allocation (AXUNIQ Exit) Copying between OS/390 and other Connect:Direct nodes Copying between Tandem and other Connect:Direct nodes Copying between UNIX and other Connect:Direct nodes Copying between OpenVME and other Connect:Direct nodes Copying between VM and other Connect:Direct nodes Copying between OpenVMS and other Connect:Direct nodes Copying between Windows and other Connect:Direct nodes
19
Both checkpointing and compression are requested. If the Process receives an X37-type abend, the Process is requeued, because REQUEUE=YES is specified in the PROCESS statement. Corrective action can then be taken.
COPYSEQ STEP01 PROCESS PNODE=CD.DALLAS SNODE=CD.CHICAGO REQUEUE=YES COPY FROM (PNODE DSN=$DAL.PSDATA) CKPT=128K COMPRESSTO (SNODE DSN=$CHI.PSDATA DISP=(NEW,CATLG) UNIT=3380 VOL=(SER=SYS009) SPACE=(4096,(200,40),,,ROUND)) -
STEP01
20
The following parameters make up the TYPE record, PSFILE. This TYPE record must be present at the destination node (SNODE).
DISP=(NEW,CATLG) DCB=(BLKSIZE=3120,LRECL=80,DSORG=PS) UNIT=3380 VOL=(SER=SYS009) SPACE=(4096,(200,40),,,ROUND)
Note: You can also place the IOEXIT parameter in a TYPE entry. Any parameters specified on the COPY statement take precedence over those coded in the TYPE file. Refer to the Connect:Direct Users Guide for the appropriate platform for details on setting up entries in the TYPE file.
21
22
STEP01
STEP02
STEP03
COPY FROM (DSN=PDS.SOURCE(MEMBER)) TO (DSN=PDS.DEST(MEMBER) DISP=RPL) COPY FROM (DSN=PDS.SOURCE(OLDMEM)) TO (DSN=PDS.DEST(NEWNAME) DISP=RPL) COPY FROM (DSN=PDS.SOURCE SELECT=OLDMEM) TO (DSN=PDS.DEST(NEWNAME) DISP=RPL)
Members AAA, BBCA, BGG, and XXX are copied. Members AAB, ABB, ABC, BBA, and BBB are not copied because they are within the range of members excluded in AAB/BBC. There is no member BBC to exclude; BBB was the last member in PDS.SOURCE within the specified range. Because BBCA is not part of the range to be excluded, it is copied. A generic range, like AAB*/BBC*, is not valid.
Note: All range entries must be specified as subparameters and enclosed in parentheses.
23
This COPY statement shows the use of the SELECT and EXCLUDE parameters:
COPY FROM (DSN=PDS.SOURCE SELECT=((BA/BBB),A*,ABC,(CDF,ZZZ)) EXCLUDE=(AC*,BAA,(ABC/AZ))) TO (DSN=PDS.DEST) -
Results from the COPY are as follows: A, AB, ABA, ABB are copied because they are generically selected by A*. ABC is copied because a specific ABC selection overrides the EXCLUDE range (ABC/AZ). ABD and ABE are not copied because they are excluded by the range ABC/AZ. ACB, ACC, and ACD are not copied because they are excluded generically by AC*. BAA is not copied because the specific BAA EXCLUDE overrides the SELECT range (BA/BBB). BAB and BAC are copied because they are selected by the range (BA/BBB). CDE is not copied because it is not selected. CDF is copied because it is specifically selected by (CDF,ZZZ); ZZZ is the new name. Refer to the Connect:Direct Process Guide for Mainframe Products volume for the precedence for the SELECT and EXCLUDE parameters.
24
Copying a PDS Using the ALIAS Parameter with SELECT and EXCLUDE
This COPY statement shows how the ALIAS parameter works when other optional parameters are specified.
COPY FROM (DSN=PDS.SOURCE ALIAS=Y EXCLUDE=C3 SELECT=(A,C1)) TO (DSN=PDS.DEST) -
In this example, the data set PDS.SOURCE has the following members and associated aliases:
Members A B C C1 C2 C3 Aliases A1 A2
The data set PDS.DEST contained no members and no aliases before the COPY operation. After the COPY operation, PDS.DEST contains the following members and aliases:
Members A C Aliases A1 A2 C1 C2
The explanation follows: A is copied because it was selected by member name. A1 is copied because ALIAS=Y and A1 is an alias for member A. A2 is copied because ALIAS=Y and A2 is an alias for member A. B is not copied because it was not selected. C is copied because ALIAS=Y and C is the true member name for C1. C1 is copied because it was selected by member name. C2 is copied because ALIAS=Y and C1 (another alias for member C) was selected by member name. C3 is not copied because it was specifically excluded.
25
You can copy multiple PDS members by coding multiple COPY steps in a Process, and either append the additional PDS members to the first file or create separate tape files for each member. In the following example, MEMB is appended to TAPE.FILE.
COPYSEQ STEP01 PROCESS PNODE=CHICAGO SNODE=MINNEAPOLIS COPY FROM (DSN=MY.PDS.FILE(MEMA) DISP=SHR PNODE) TO (DSN=TAPE.FILE DISP=(NEW,CATLG) UNIT=TAPE DCB=(DSORG=PS)) COPY FROM (DSN=MY.PDS.FILE(MEMB) DISP=SHR PNODE) TO (DSN=TAPE.FILE DISP=(MOD,CATLG) UNIT=TAPE LABEL=(,SL) DCB=(DSORG=PS)) -
STEP02
26
In this example, INEXT01, an IOEXIT program, on the source Connect:Direct node will be invoked and passed two parameters-a character string (DB0A05) and a hexadecimal value (X0E). It will pass records using Connect:Direct to OUEXT03, an IOEXIT on the destination Connect:Direct node.
COPY FROM (PNODE IOEXIT=(INEXT01,CDB0A05,X0E)) TO SNODE IOEXIT=OUEXT03) -
27
28
29
Copying to OS/390 Nodes with Unique Member Name Allocation (AXUNIQ Exit)
The following examples demonstrate how Connect:Direct resolves member names when UNIQUE=YES is specified on the SYSOPTS parameter of the COPY TO statement.
Resolution Method
The member name is made to be unique as follows: The member name specified in the TO DSN (or defaulted from the FROM DSN) is used as a seed for comparison. If the seed name is not unique on the receiving node, Connect:Direct will modify the specified member name to create a unique name. If the seed name is less than eight characters long, Connect:Direct appends a unique numeric character to the member name, starting with 1. If the member name formed by the seed and the suffix exists already, the suffix is incremented until a unique name is created. The suffix appended can be as long as seven digits. If the seed name is eight characters long, Connect:Direct will truncate the name from the right to limit the name to eight characters. This truncation will also take place if the seed name and its appended suffix are more than eight characters long.
STEP001
STEP002
Copying a Member of a Physical Data Base File from OS/400 to a Sequential File on OS/390
This Process copies a member of a physical data base file from the OS/400 node to a sequential file on OS/390. DCB information is specified for file allocation on OS/390. The SYSOPTS keyword value is enclosed in parentheses, and the SYSOPTS string is enclosed
31
in double quotation marks. Specifying COMPRESS EXT indicates that repetitive strings in the data will be compressed and converted to the original string during decompression.
PROC#001 PROCESS SNODE=OS400.CDI1 PNODE=SC.OS390.CD5A PRTY=8 NOTIFY=%USER CLASS=4 HOLD=NO SNODEID=(RSMITH,ROGER) COPY FROM (SNODE DSN=ABC/OS400(TEST01) SYSOPTS="TYPE(MBR)" DISP=SHR) COMPRESS EXT TO (PNODE DSN=ABC.OS400.SEQFILE9 DCB=(RECFM=FB,LRECL=133,BLKSIZE=23408) DISP=RPL) -
STEP001
STEP001
32
STEP001
33
SYSOPTS subparameters are used to define the attributes of the new receiving file on the Tandem system.
A110257 STEP1 PROCESS PNODE=CD.TANDEM SNODE=SC.CD.OS390 RUN TASK (PGM=FUP PARM=(/OUT $S.#FUPTEST/ PURGE A110257 )) PNODE COPY FROM (DSN=DATA1.SEQ.A110257 SNODE DISP=SHR) TO (DSN=$B.FILERESO.A110257 PNODE DISP=NEW SYSOPTS=\"SET TYPE E \SET BLOCK 4096 \SET MAXEXTENTS 16 \SET XLATE ON" -
STEP2
34
STEP01
35
The following Process illustrates copying a file submitted from OS/390 to Tandem.
GENSEND1 PROCESS STEP01 SNODE=ACCT.JOHN SNODEID=(147.200,MONEY) COPY FROM (PNODE DSN=JSMITH.DATAFILE DISP=SHR) TO (SNODE DSN=\TSCIEXT.$B.JOHN.TESTOUT DISP=NEW SYSOPTS=\"SET TYPE E \|| \SET XLATE ON" \) -
Note: Because the source file includes the special backslash character, single quotation marks must enclose the data set name.
36
STEP2
37
STEP01
STEP01
38
STEP2
Copying Between an OS/390 Node and a Remote Tandem Spooler on an EXPAND Network
This multi-step Process copies between an OS/390 node and a remote Tandem spooler on an EXPAND network. The Process is submitted from the Tandem node. STEP01 copies a file from a DSN on the OS/390 node to the Tandem spooler. STEP02 copies a file from the Tandem spooler to an OS/390 node. Note that \SYSEXT is an EXPAND node other than the one that the Connect:Direct Tandem server resides on. Because the Tandem files are spooler files, the SYSOPTS SET XLATE subparameter does not have to be specified for translation; spooler files and edit files (unstructured, code 101) are translated automatically. A record format of FBA is used to maintain ANSI control characters.
SPL STEP01 PROCESS SNODE=CD.SMITH COPY FROM (DSN=JSMITH.CDACT SNODE DISP=SHR) TO (FILE=\SYSEXT.$S.#SPL1 PNODE DISP=RPL COPY FROM (FILE=\SYSEXT.$S.#SPL2 PNODE DISP=SHR) TO (DSN=RJONES.ACCT SNODE DCB=(RECFM=FBA,DSORG=PS,LRECL=132, BLKSIZE=13200) SPACE=(13200,(10,2)) DISP=RPL) -
STEP02
39
Copying Files Between the Tandem Spooler System and an OS/390 Node Using Job Number
This Process transfers a file from the Tandem spooler $S to an OS/390 sequential file. The Tandem file has a job number of 3722 and a location (name) of #SPLFILE. The SPOOLER command is used to specify a supervisor other than the default of $SPLS. A record format of FBA is used to maintain ANSI control characters.
SPLPROC STEP01 PROCESS SNODE=CD.OS390.JSMITH COPY FROM (DSN=\SYSEXT.$S.#SPLFILE SYSOPTS=("SET SPOOLER=$SPLA" "SET SPOOLNUM=3722") DISP=SHR) TO (DSN=RJONES.SPLFILE DCB=(RECFM=FBA,DSORG=PS,LRECL=132, BLKSIZE=13200) SPACE=(1320,(10,2)) DISP=RPL) -
STEP01
40
PROCESS1 PROCESS
STEP01
PNODE=CD.TANDEM SNODEID=(RJONES,ROGER) SNODE=CD.OS390 COPY FROM (DSN=RJONES.ACCTTAPE SNODE UNIT=REEL VOL=SER=010196 LABEL=(,NL,,EXPDT=91044) DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=4096) DISP=SHR) TO (PNODE DSN=$C.BILLPROC.ACCTDATA DISP=RPL SYSOPTS=("SET TYPE U" "SET BLOCK 4096" "SET EXT (5,5)"))
41
Allocating a VSAM Data Set and Copying a File from Tandem to OS/390
This Process invokes Connect:Direct DMRTAMS for VSAM file allocation. DMRTAMS (using IDCAMS commands specified in the Process) first deletes the old data set if it exists. It then defines and allocates it for use in the subsequent COPY statement. The file transmitted is a Tandem key-sequenced file.
VSAM01 PROCESS SNODE=SC.OS390.RSMITH PNODE=CDCLX SNODEID=(RMITH,RSMITH) SACCT=CHARGE TO ACCOUNTING RUN TASK (PGM=DMRTAMS, PARM=(C"FREE=CLOSE,RETURN=(DD) SYSOUT=X" C" DELETE (RSMITH.VSAM01.OUTPUT) CLUSTER ", C" DEFINE CLUSTER -", C" (NAME(RSMITH.VSAM01.OUTPUT) -", C" RECORDS(2500 100) -", C" VOLUMES(M80003) -", C" INDEXED -", C" FREESPACE(0 0) -", C" NOIMBED -", C" KEYS (8 6) -", C" RECORDSIZE(262 880) -", C" NOREPLICATE -", C" SHAREOPTIONS(2)) -", C" DATA -", C" (CONTROLINTERVALSIZE(4096) -", C" NAME(RSMITH.VSAM01.OUTPUT.DATA2) -", C" INDEX -", C" (CONTROLINTERVALSIZE(512) -", C" NAME(RSMITH.VSAM01.OUTPUT.INDEX2))")) SNODE COPY FROM (DSN=$B.CDFILES.KDSDFIL DISP=SHR PNODE) TO (DSN=RSMITH.VSAM01.OUTPUT DISP=SHR SNODE) -
STEP1
STEP2
42
This Process, submitted from the OS/390 node, copies a text file from UNIX to OS/390. The DSN and SYSOPTS strings for the UNIX system must be in the proper case for UNIX and enclosed in double quotation marks.
PROC2 STEP01 PROCESS SNODE=UNIX.NODE COPY FROM (DSN="/company/payroll/monthly/jan" SYSOPTS=":datatype=text:" SNODE) TO (DSN=OS390.PAYROLL.MONTHLY.JANUARY DISP=(NEW,CATLG) SPACE=(23040,(2,1)) DCB=(RECFM=U,LRECL=0,BLKSIZE=23040,DSORG=PS) PNODE) -
43
This example shows a file copy from an OS/390 node to a UNIX node using SYSOPTS. The UNIX DSN and SYSOPTS strings are in lower case and are enclosed in double quotation marks.
BENCHM1 PROCESS SNODE=kyla SNODEID=(barry1,322red) STEP1 COPY FROM (PNODE DSN=TEST.TESTFILE.BENCH.M1 DISP=SHR CKPT=50K COMPRESS EXTENDED TO (SNODE DSN=benchm1 DISP=MOD SYSOPTS=:datatype=text:strip.blanks=no:) -
44
45
46
47
48
Copying a Single Entry from the OpenVMS Text Library to an OS/390 Member
This Process sends a single entry from an OpenVMS text library to a member of a PDS on OS/390.
SINGENT1 PROCESS SNODE=CD.OS390.NODE STEP01 COPY FROM (DSN=DUA0:[SMITH.CDTEST]PDSTEST.TLB PNODE SELECT=(BOOLEAN) SYSOPTS="LIBRARY=TEXT" DISP=OLD DCB=(DSORG=PO)) TO (DSN=SMITH.MEMBERS(DATA) DISP=RPL SNODE) -
Copying a Data Set from an OS/390 Node to an Executable File on an OpenVMS Node
This Process, submitted from the OpenVMS node, copies the OS/390 data set RSMITH.ACCTJAN to file specification DUC4:[ACCT.COM]JAN.EXE at the OpenVMS node. For the appropriate file attribute information, the SYSOPTS parameter TYPE=IMAGE must be specified. Also, BINARY must be specified as part of the SYSOPTS parameter so that EBCDIC to ASCII translation will not occur.
PROCESS1 PROCESS STEP01 SNODE=CD.OS390 SNODEID=(RSMITH,ROGER) COPY FROM (DSN=RSMITH.ACCTJAN SNODE ) TO (DSN=DUC4:[ACCT.COM]JAN.EXE PNODE SYSOPTS="TYPE=IMAGE BINARY" DISP=RPL) -
49
To submit this Process from the OS/390 node (the PNODE is an OS/390 node), the following syntax changes must be made: Enclose the OpenVMS file specification between single or double quotation marks to allow special characters to be passed to the OpenVMS node. Change the brackets ([ ]) to less than and greater than signs (< >). The modified Process is as follows:
PROCESS1 PROCESS STEP01 SNODE=CD.VMS SNODEID=(RSMITH,ROGER) COPY FROM (DSN=DUC4:<ACCT.COM>JAN.EXE SNODE SYSOPTS="BINARY") TO (DSN=RSMITH.ACCTJAN DISP=RPL PNODE) -
50
STEP02
STEP03
STEP04
STEP05
51
STEP0001
COPY FROM ( SNODE DSN=USER01.TEST.OS390PRT01 DISP=SHR ) TO ( PNODE DSN=&VSEDSN UNIT=DLBLONLY DCB=(DSORG=PS,RECFM=FBA,LRECL=121,BLKSIZE=27951) ) COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF
52
Copying an OS/390 Sequential Data Set or PDS to a VSE-Controlled Tape Data Set
This Process copies either an OS/390 sequential data set or an OS/390 partitioned data set into a CA-DYNAM/T or CA-EPIC noncontrolled tape data set. The input resides on OS/390 and the output file is written to tape (or cartridge) on VSE.
OS3902DYT1 PROC SNODE=SC.OS390.NODE0 PNODE=SC.VSE21.USER01 STEP0001 COPY FROM ( SNODE DSN=RPITT1.LARGE.OS390.FILE DISP=SHR ) TO ( PNODE DSN=USER01.TEST.NONDYNAM UNIT=TNOASGN LABEL=(1,SL) DISP=(NEW,CATLG) DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=1600) ) -
53
OS3902LIB1 PROC
SNODE=SC.OS390.NODE PNODE=SC.VSE.NODE &MEMBER=, &OS390PDS=USER01.PROCESS.LIB &VSELIB=CONN.DIRECT.LIBRARIES &VSESUB=USER01 &VSETYP=N &VSEVOL=USER03 STEP0001 COPY FROM ( SNODE DSN=&OS390PDS DISP=SHR SELECT=(&MEMBER) ) TO ( PNODE DSN=&VSELIB DISP=SHR UNIT=DISK DCB=(DSORG=PS,RECFM=F) VOL=SER=&VSEVOL LIBR=(REPLACE=YES SLIBDISP=SHR SUBLIB=&VSESUB TYPE=&VSETYP) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSELIB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSELIB)) PNODE EIF
54
For VSAM libraries you must specify the DSN and DSORG parameters on the FROM statement. You can optionally specify the catalog parameter if needed.
OS3902LIB2 PROC SNODE=SC.OS390.NODE PNODE=SC.VSE.NODE &MEMBER=, &OS390PDS=USER01.TEST.JCLLIB %VSELIB=CONN.DIRECT.LIB1 &VSESUB=RXUSER01 &VSETYP=JCL STEP0001 COPY FROM ( SNODE DSN=&OS390PDS DISP=SHR SELECT=(&MEMBER) ) TO ( PNODE DSN=&VSELIB DISP=SHR DCB=(DSORG=VSAM) LIBR=(REPLACE=YES SLIBDISP=SHR SUBLIB=&VSESUB TYPE=&VSETYP) ) -
Copying an OS/390 Sequential Data Set or OS/390 PDS to a VSE-Controlled Tape Data Set
This Process copies either an OS/390 sequential data set or an OS/390 partitioned data set into a CA-DYNAM/T or CA-EPIC controlled tape data set. The input is from OS/390 with the Process running on VSE. The disk data set has already been defined to the appropriate system catalog. This Process was written with symbolics for substitution.
OS3902TAP1 PROC SNODE=SC.OS390.NODE PNODE=SC.VSE.NODE &VSECUU=CART &VSEDSN=TEST.TAPE.FILE STEP0001 COPY FROM ( SNODE DSN=RPITT1.LARGE.OS390.FILE DISP=SHR DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800) ) TO ( PNODE DSN=&VSEDSN UNIT=&VSECUU LABEL=(1,SL) DISP=(NEW,KEEP) DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=16000) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF -
55
STEP1
The following Process is a variation on the previous example. In this example, the data set names (DSN) are defined as symbolic variables in the COPY statement (&DSN1 and &DSN2), and are resolved at the time the process is submitted. This process also uses the STARTT parameter to specify a day of the week and time when the process will execute, and the RETAIN=YES parameter to indicate that the Process should stay in the TCQ and execute again at the next scheduled start time (STARTT). This Process will execute automatically each Monday at 3:00 a.m.
TONT1 PROCESS SNODE=NT.1200.SNA HOLD=NO RETAIN=YES STARTT=(MONDAY,03:00) &DSN1=TEST.DEL.TEST99 &DSN2=\\NT-NODE\ROOT_D\USERS\TEST1\DATA1.TXT COPY FROM (DSN=&DSN1) TO (DSN=&DSN2 SYSOPTS="DATATYPE(TEXT)" DISP=(RPL)) -
STEP1
56
STEP02
57
STEP01
58
STEP01
59
SEND01
SEND01
60
61
TAN_VSE
STEP01
62
STEP01
63
step02
copy
step03
copy
step04
copy
pend;
64
Archiving and Restoring Files in a Single Step Using the Connect:Direct UNIX Pipe I/O Function
This Process changes the pnode directory to the se subdirectory, archives all the *.c files in the se subdirectory using the tar command, then transfers the archive to the snode. At the snode, this Process changes the directory to the testdir subdirectory and extracts the *.c files from the archive using the tar -xf command. No checkpointing occurs when pipe=yes is specified.
pipe_ex3 process snode=testcdu step01 copy from (file=cd se; tar -cf - *.c pnode sysopts=:pipe=yes:) to (file=cd testdir; tar -xf - snode sysopts=:pipe=yes:) pend;
65
66
copy1
67
The following Process is a variation on the previous example. In this example, the file names are defined as symbolic variables in the COPY statement (&file1 and &file2) and are resolved at the time the Process is submitted.
proc1 process snode=111.11.11.111 &file1="/usr/data/out/invoi01.dat" &file2="d:\users\data\in\invoi01.dat" copy from (file=&file1 pnode) to (file=&file2 sysopts="datatype(binary)" snode) pend;
copy1
68
69
copy1
70
The parameter GROUP on the TO clause contains the special symbols %1% and %2%, which are used to build the destination name. Each symbol is replaced by characters from the name determined to be in that source group. The source disk, CDA7 191, contains the following:
ACF2A ASSEMBLE ACF2B ASSEMBLE ACF2C ASSEMBLE ALOEXIT ASSEMBLE ASMSAMP ASSEMBLE ASMTASK ASSEMBLE ARMMOD ASSEMBLE DMCXRJ ASSEMBLE DMDPTR ASSEMBLE DMFPTR ASSEMBLE DMGFTR ASSEMBLE DMMF ASSEMBLE
ACF2A and ACF2B are excluded from the COPY because the DSN parameter indicated that the group file copy should start with the ACF2C A* file.
71
72
SFSPROC
STEP1
STEP2
PROCESS &PROCESS=SFSPROC &CKPT=0K &COMPRESS=COMPRESS &EXT=, &CUU1=0199 &CUU2=0195 &DIR1=MYSFS:USER01.MYSFS &DIR2=COSFS:USER02.COSFS &INUSER=USER01 &INUSERP=RPASS SNODEID=(USERID,PASSWD) &SNODE=CD.VM.NODE1 SNODE=&SNODE COPY FROM ( PNODE SFSDIR=("&DIR1") DSN=MYINPUT FILE DISP=SHR ) CKPT=&CKPT &COMPRESS &EXT TO ( SNODE SFSDIR=("&DIR2") DSN=\FILETEST\&PROCESS.1\\ DCB=(LRECL=80,RECFM=F) DISP=RPL ) COPY FROM ( PNODE LINK=(&INUSER,&INUSERP,RR,&CUU1) DSN=MYINPUT FILE2 DCB=(LRECL=80,RECFM=F,DSORG=PS) DISP=SHR ) CKPT=&CKPT &COMPRESS &EXT TO ( SNODE SFSDIR=("&DIR2") DSN=\FILETEST\&PROCESS.2\\ DCB=(LRECL=80,RECFM=F) DISP=RPL )
continued
73
STEP3
COPY (
FROM PNODE LINK=(&INUSER,&INUSERP,RR,&CUU2) DSN=MYHLQ.TESTFILE.VRRDS.FB80 DCB=(DSORG=VSAM) DISP=SHR ) CKPT=&CKPT &COMPRESS &EXT TO ( SNODE SFSDIR=("&DIR2") DSN=\FILETEST\&PROCESS.3\\ DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120) DISP=RPL ) FROM ( PNODE LINK=(&INUSER,&INUSERP,RR,&CUU2) DSN=MYHLQ.TESTFILE.VKSDS.FB80 DCB=(DSORG=VSAM) DISP=SHR ) CKPT=&CKPT TO ( SNODE SFSDIR=("&DIR2") DSN=\FILETEST\&PROCESS.4\\ DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120) DISP=RPL &COMPRESS &EXT
STEP4
COPY
STEP5
COPY (
) FROM PNODE LINK=(&INUSER,&INUSERP,RR,&CUU2) DSN=MYHLQ.TESTFILE.VESDS.FB80 DCB=(DSORG=VSAM) DISP=SHR ) CKPT=&CKPT TO ( SNODE SFSDIR=("&DIR2") DSN=\FILETEST\&PROCESS.5\\ DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120) DISP=RPL ) &COMPRESS &EXT
74
Extracting an SFS File and Placing the File on the VM Reader Spool
In this example, one file is being extracted from the CDSFS filepool to be placed upon a VM reader spool. Note that the format of the SFSDIR statement must end with a period when only the main directory is referenced.
TESTSFS STEP01 PROCESS SNODE=CSD.VM.NODE NOTIFY=USER1 COPY FROM (DSN=PROFILE EXEC SFSDIR=(CDSFS:USER1.) TO (DSN=!SPOOL USER1 TSET DATA) -
75
76
NODEFINE PROCESS SNODE=CD.VSE.NODE STEP01 COPY FROM (DSN=TESTA INPUT LINK=(IVB4100,RIVB4100,RR,202) PNODE DISP=SHR) TO (DSN=VSE.NODEF.STEP01 DCB=(DSORG=PS BLKSIZE=3200 LRECL=80 RECFM=F) UNIT=DNOASGN VOL=SER=POOLNAME SNODE DISP=RPL) STEP02 COPY FROM (DSN=CDFILE INPUT LINK=(IVB4100,RIVB4100,RR,202) PNODE DISP=SHR) TO (DSN=VSE.NODEF.STEP02 DCB=(DSORG=PS BLKSIZE=3200 LRECL=80 RECFM=F) UNIT=DNOASGN VOL=SER=POOLNAME SNODE DISP=RPL) STEP03 COPY FROM (DSN=TESTA INPUT LINK=(IVB4100,RIVB4100,RR,202) PNODE DISP=SHR) TO (DSN=VSE.NODEF.STEP03 TYPE=DYNAMD SNODE DISP=RPL) STEP04 COPY FROM (DSN=TESTA INPUT LINK=(IVB4100,RIVB4100,RR,202) PNODE DISP=SHR) TO (DSN=VSE.NODEF.STEP03 DCB=(DSORG=PS BLKSIZE=3200 LRECL=80 RECFM=F) UNIT=DNOASGN SNODE DISP=RPL) STEP05 COPY FROM (DSN=TESTC INPUT LINK=(SMI4100,RSMI4100,RR,202) PNODE DISP=SHR) TO (DSN=VSE.NODEF.STEP05 DCB=(DSORG=PS BLKSIZE=1000 LRECL=100 RECFM=F) UNIT=DNOASGN VOL=SER=POOLNAME SNODE DISP=RPL)
77
78
79
80
TO
81
STEP1
82
STEP1
83
The Process, SYMBOL1, can be submitted with the following command issued in DCL command format:
$ NDMUI SUBMIT SYMBOL1 /SYMBOLICS=("FROM=VMS_FILENAME.TYPE", "TO=OS390.DATASET.NAME", "DISP=RPL") -
84
85
86
Copying a Non-managed Disk Data Set into Another Non-managed CKD Disk Data Set
Use this Process to copy a non-managed disk data set into another non-managed disk data set residing on a CKD device. This Process runs on the same Connect:Direct node using PNODE=SNODE processing and uses symbolic values.
DSK2DSK1 PROC PNODE=SC.VSE.NODE SNODE=SC.VSE.NODE &VSEDSN=GGREG1.TEST.NODYNAM1 FROM ( PNODE DSN=LRR.LREC480.ADDX DISP=(SHR) DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=480) VOL=SER=USER01 ) TO ( SNODE DSN=&VSEDSN DISP=(RPL) VOL=SER=USER02 SPACE=(6055,(25)) DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=13600) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF -
STEP0001 COPY
STEP0002 IF
ELSE -
87
Copying a Noncontrolled Disk Data Set to a Managed CKD Disk Data Set
This Process copies a non-DYNAM/D or non-EPIC controlled disk data set into a DYNAM/D or EPIC managed CKD disk data set. The disk data set has already been defined to the appropriate system catalog. This Process runs on the same Connect:Direct node using PNODE=SNODE processing and uses symbolic values.
DSK2DYD1 PROC PNODE=SC.VSE.NODE SNODE=SC.VSE.NODE &VSEDSN=USER01.TEST.GDGCOPY1 STEP0001 COPY FROM ( PNODE DSN=LRR.LREC480.ADDX DISP=SHR VOL=SER=USER01 DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800) ) TO ( SNODE DSN=&VSEDSN UNIT=DLBLONLY DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=27920) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF -
Copying a Nonmanaged Disk File into a Start Track 1 FBA Noncontrolled Data Set
Use this Process to copy a Non-managed disk file into a DYNAM/D or EPIC start-track 1 FBA noncontrolled data set. This Process runs on the same Connect:Direct node using PNODE=SNODE processing and uses symbolic values. CA-DYNAM/D or CA-EPIC will perform the disk allocation for Connect:Direct but since the data set is allocated as a start-track 1 data set with a vol=ser it will not be a managed data set.
88
DSK2DYD2 PROC
PNODE=SC.VSE.NODE SNODE=SC.VSE.NODE &VSEDSN=USER01.TEST.FILENAME STEP0001 COPY FROM ( PNODE DSN=LRR.LREC480.ADDX DISP=SHR VOL=SER=USER01 DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800) ) TO ( SNODE DSN=&VSEDSN VOL=SERUSER04 UNIT=DNOASGN LABEL=(,,,EXPDT=99365) DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=27920) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF
STEP001
89
Copying a Nonmanaged Disk File to a CA-DYNAM/D or CA-EPIC Start Track 1 FBA Noncontrolled Data Set
Use this Process to copy a nonmanaged disk file into a DYNAM/D or EPIC start-track 1 FBA noncontrolled data set. This Process runs on the same Connect:Direct node using PNODE=SNODE processing. This Process uses symbolic values. CA-DYNAM/D or CA-EPIC will perform the disk allocation for Connect:Direct. The data set is allocated as a start-track 1 data set with a VOL=SER it will not be a managed data set.
DSK2DYD3 PROC PNODE=SC.VSE.NODE SNODE=SC.VSE.NODE &VSEDSN=USER01.TEST.NONDYD &VOLSER=FBA001 STEP0001 COPY FROM ( PNODE DSN=LRR.LREC480.ADDX DISP=SHR VOL=SER=USER01 DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800) ) TO ( SNODE DSN=&VSEDSN UNIT=DNOASGN VOL=SER=&VOLSER SPACE=(1,(5),RLSE) DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=27920) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF -
90
The previous Process runs on the same Connect:Direct node using PNODE=SNODE processing and uses symbolic values. You must specify the input DCB parameter (RECFM, LRECL); this information will be copied to the output data set.
91
DSK2MSM1 PROC PNODE=SC.VSE.NODE SNODE=SC.VSE.NODE &VSEDSN=USER01.TEST.MSAMFIL1 STEP0001 COPY FROM ( PNODE DSN=LRR.LREC480.ADDX DISP=SHR VOL=SER=USER01 DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800) ) TO ( SNODE DSN=&VSEDSN DISP=RPL UNIT=DISK VOL=SER=USER06 SPACE=(80,(500,300)) VSAMCAT=(VSE.COMMON.CATALOG,X,X,,123) DCB=(DSORG=MSAM,RECFM=FB,LRECL=80,BLKSIZE=16000) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF
92
93
Copying a Managed Generation Disk Data Set to Another Managed Data Set
Use this Process to copy either a CA-DYNAM/D or CA-EPIC managed disk data set into another DYNAM/D or EPIC managed data set. The input data set is CKD and the output data set is FBA. The disk data set has already been defined to the appropriate system catalog. This Process runs on the same Connect:Direct node using PNODE=SNODE processing. This Process uses symbolic values.
94
DYD2DYD2 PROC
PNODE=SC.VSE.NODE SNODE=SC.VSE.NODE &CKDDSN=USER01.TEST.GDGCOPY2 &FBADSN=USER01.TEST.FBACOPY1 STEP0001 COPY FROM ( PNODE DSN=&CKDDSN UNIT=DLBLONLY DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=16000) ) TO ( SNODE DSN=&FBADSN UNIT=DLBLONLY DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=27920) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&FBADSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&FBADSN)) PNODE EIF
95
This Process runs on the same Connect:Direct node using PNODE=SNODE processing. This Process uses symbolic values.
Copying a Controlled Tape Data Set to a Controlled FBA Disk Output Data Set
Use this Process to copy a CA-DYNAM/D or CA-EPIC controlled tape data set to CA-DYNAM/D or CA-EPIC controlled FBA disk output data set. The disk data set has already been defined to the appropriate system catalog.
96
This Process runs on the same Connect:Direct node using PNODE=SNODE processing and uses symbolic values.
DYT2DYD1 PROC PNODE=SC.VSE.NODE SNODE=SC.VSE.NODE &VSEDSN=USER01.TEST.FBAFILE1 STEP0001 COPY FROM ( PNODE DSN=USER01.TEST.TAPE1 UNIT=TNOASGN DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=32000) ) TO ( SNODE DSN=&VSEDSN DISP=(SHR) UNIT=DLBLONLY ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF -
Copying a Controlled CKD Disk Data Set to a Noncontrolled Tape Data Set
This Process copies a CA-DYNAM/D or CA-EPIC controlled CKD disk data set to a non-CA-DYNAM/T or CA-EPIC controlled tape data set. The disk data set has already been defined to the appropriate system catalog. The output data set DCB attributes will be propagated from the input file attributes. This Process runs on the same Connect:Direct node using PNODE=SNODE processing and uses symbolic values.
DYD2TAP1 PROC PNODE=SC.VSE.NODE SNODE=SC.VSE.NODE &VSECUU=CART &VSEDSN=TEST.TAPE.FILE STEP0001 COPY FROM ( PNODE DSN=USER01.TEST.GDGCOPY1 UNIT=DLBLONLY DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=8000) ) TO ( SNODE DSN=&VSEDSN UNIT=&VSECUU LABEL=(1,SL) DISP=(NEW,KEEP) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF -
97
Copying a VSE Sublibrary Member from a BSAM Sublibrary to a Controlled Disk Data Set
This Process copies a VSE sublibrary member from a BSAM sublibrary to a CA-DYNAM/D or CA-EPIC controlled disk data set on the same Connect:Direct node using PNODE=SNODE processing. All of the disk and tape data set names have been predefined to the appropriate system catalog. This Process was written with symbolic parameters to allow for a generic Process, so you must modify to your standards. When you reference BSAM libraries in a Connect:Direct Process, you must specify: DSORG, DSN, UNIT, and VOL=SER= parameters.
LIB2DYD1 PROC SNODE=SC.VSE.NODE PNODE=SC.VSE.NODE &MEMBER=LIB2DYT1 &VSEDSN=USER01.TEST.LIBCOPY1 &VSELIB=CONN.DIRECT.LIBRARIES &VSESUB=USER01 &VSETYP=N &VSEVOL=USER03 STEP0001 COPY FROM ( SNODE DSN=&VSELIB DISP=SHR VOL=SER=&VSEVOL DCB=(DSORG=PS) LIBR=( SELMEM=&MEMBER SELSLIB=&VSESUB SELTYPE=&VSETYP) ) TO ( PNODE DSN=&VSEDSN UNIT=DLBLONLY DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920) DISP=(NEW,CATLG) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF -
Copying a VSE Sublibrary Member from a BSAM Sublibrary to a Controlled Tape Data Set
This member copies a VSE sublibrary member from a BSAM sublibrary to a CA-DYNAM/D or CA-EPIC controlled tape data set on the same Connect:Direct node using PNODE=SNODE processing. All of the disk and tape data set names have been predefined to the appropriate system catalog. You do not have to specify output DCB parameters, these will be copied from the input library DCB parameters.
98
When you reference BSAM libraries in a Connect:Direct Process, you must specify: DSORG, DSN, UNIT, and VOL=SER= parameters.
Note: This Process was written with symbolic parameters to allow for a generic Process. You must modify to your standards.
LIB2DYT1 PROC SNODE=SC.VSE.NODE PNODE=SC.VSE.NODE &MEMBER=LIB2DYT1 &VSEDSN=USER01.TEST.TAPE1 &VSELIB=CONN.DIRECT.LIBRARIES &VSESUB=USER01 &VSETYP=JCL &VSEVOL=USER03 STEP0001 COPY FROM ( SNODE DSN=&VSELIB DISP=SHR VOL=SER=&VSEVOL DCB=(DSORG=PS) LIBR=( SELMEM=&MEMBER SELSLIB=&VSESUB SELTYPE=&VSETYP) ) TO ( PNODE DSN=&VSEDSN UNIT=TNOASGN LABEL=(1,SL) DISP=(NEW,CATLG) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF -
99
You do not need to specify an output DCB parameter. This information will be obtained from the LST queue entry. The Process runs on the same Connect:Direct node using PNODE=SNODE processing and uses symbolic values.
100
When you copy data into a VSE BSAM library, you must add either RECFM=F or RECFM=V to your DCB parameter. This specification depends on the type of input file. If you do not include the RECFM, the Process fails with the message SVSJ122I.
LIB2LIB1 PROC SNODE=SC.VSE.NODE PNODE=SC.VSE.NODE &NEWLIB=USER01.TEST.FBALIB01 &VSELIB=CONN.DIRECT.LIBRARIES &VSESUB=USER01 &VSETYP=* STEP0001 COPY FROM ( PNODE DSN=&VSELIB DISP=SHR LIBR=(*) VOL=SER=USER03 DCB=(DSORG=PS,RECFM=FB,LRECL=80) ) TO ( SNODE DSN=&NEWLIB UNIT=FBA DISP=NEW LIBR=(*) VOL=SER=FBA001 DCB=(DSORG=PS,RECFM=F) SPACE=(100,(4000),RLSE) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&NEWLIB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&NEWLIB)) PNODE EIF -
101
You must specify all of the parameters in this sample on the FROM side to Process BSAM libraries. An example follows.
LIB2OS3904 PROC SNODE=SC.OS390.NODE PNODE=SC.VSE.NODE &OS390LIB=USER01.TEST.VSELIB &VSELIB=CONN.DIRECT.LIBRARIES &VSESUB=PROCESS &VSETYP=N STEP0001 COPY FROM ( PNODE DSN=&VSELIB DISP=SHR VOL=SER=USER03 DCB=(DSORG=PS) LIBR=(SELSLIB=&VSESUB SELTYPE=&VSETYP REPLACE=YES) ) TO ( SNODE DSN=&OS390LIB DISP=RPL UNIT=SYSDA SPACE=(CYL,(5,1,100),RLSE) DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=27920) ) COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&OS390LIB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&OS390LIB)) PNODE EIF -
102
In the previous example, the disk data set has already been defined to the appropriate system catalog. This Process runs on the same Connect:Direct node using PNODE=SNODE processing. This Process uses symbolic values. When you reference BSAM libraries in a Connect:Direct Process, you must specify: DSORG, DSN, UNIT, and VOL=SER= parameters. When you copy data into a VSE BSAM library, you must add either RECFM=F or RECFM=V to your DCB parameter. This specification depends on the type of input file. If you do not include the RECFM, the Process fails with the message SVSJ122I.
103
104
LIB2OS3901 PROC PNODE=SC.VSE.NODE SNODE=SC.OS390.NODE &OS390LIB=USER01.TEST.VSEPROC &VSELIB=CONN.DIRECT.LIBRARIES &VSEMEM=, &VSESUB=USER01 &VSETYP=N &VSEVOL=USER03 STEP0001 COPY FROM ( PNODE DSN=&VSELIB DISP=SHR UNIT=DISK DCB=(DSORG=PS) VOL=SER=&VSEVOL LIBR=(SELMEM=&VSEMEM SELSLIB=&VSESUB SELTYPE=&VSETYP) ) TO ( SNODE DSN=&OS390LIB DISP=SHR ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&OS390LIB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&OS390LIB)) PNODE EIF
105
LIB2OS3902 PROC PNODE=SC.VSE.NODE SNODE=SC.OS390.NODE &MEMBER=DITTODVT &OS390LIB=USER01.PROCESS.LIB &VSELIB=CONN.DIRECT.LIB1 &VSESUB=RXUSER01 &VSETYP=JCL STEP0001 COPY FROM ( PNODE DSN=&VSELIB DISP=SHR DCB=(DSORG=VSAM) LIBR=(SELMEM=&MEMBER SELTYPE=&VSETYP SELSLIB=&VSESUB REPLACE=YES) ) TO ( SNODE DSN=&OS390LIB DISP=SHR ) COMPRESS EXT STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&OS390LIB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&OS390LIB)) PNODE EIF
106
LST2OS3901 PROC PNODE=SC.VSE.NODE SNODE=SC.OS390.NODE CLASS=8 &JBNAME=GGG3200 &JBNUMB=0000 &JBDISP=L &JBCLASS=Q &PINUMB= STEP0001 COPY FROM ( PNODE DSN=&JBNAME LST=(CLASS=&JBCLASS,DISP=&JBDISP) ) TO ( SNODE DSN=USER01.TEST.VSEDUMPS(&PINUMB) DISP=RPL ) COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&PINUMB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&PINUMB)) PNODE EIF
107
Copying a File from HP UNIX to a Controlled Disk Data Set Using TCP/IP
This Process copies a file from HP UNIX into a CA-DYNAM/D or CA-EPIC controlled disk data set using the TCP/IP protocol. The disk data set has already been defined to the appropriate system catalog. Verify that you have updated your network map with the SNODE TCP/IP address and port number. DCB information will be provided by the SNODE. This Process was written with symbolics for substitution.
108
UNX2DYD2 PROCESS PNODE=SC.VSE.USER01 SNODE=199.1.4.87 &VSEDSN=USER01.TEST.UNIXFILE STEP0001 COPY TO ( PNODE DSN=&VSEDSN UNIT=DLBLONLY ) FROM ( SNODE DSN=/home/fremont/ddunc1/750070/arx02.dat SYSOPTS=":xlate=no:strip.blanks=no:" ) CKPT=1M COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY, PARM=(GOOD,&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY, PARM=(FAIL,&VSEDSN)) PNODE EIF
STEP01
109
110
Chapter 5
This chapter contains examples of Connect:Direct RUN JOB statements for various Connect:Direct platforms.
Alternatively, you can be signed on to CDA and submit the following RUN JOB Process from CDA. In this case, the data set specified in the RUN JOB must exist on CDA (PNODE). In this example, the job contained in JOB.STREAM.LIB(JOB123) is submitted to the OS/390 internal reader on the PNODE system.
PROC1 STEP01 PROCESS RUN JOB SNODE=CDB (DSN=JOB.STREAM.LIB(JOB123) PNODE)
Note: The JCL must exist on the node where you want it to execute.
111
112
Running a Job on the OS/390 Node from a Process Submitted on the Tandem Node
In this Process submitted from the Tandem node, STEP1 will execute FUP to purge $B.FILERESO.STEST. STEP2 will copy DATA1.SMALLER from the OS/390 node to $B.FILERESO.STEST at the Tandem node. Conditional logic (STEP3) is then used to check the completion code of STEP1. If the completion code is greater than 4, no further processing will occur. Otherwise STEP4 will execute DATA1.CNTL(IEFBR14A) at the OS/390 node.
Note: The Connect:Direct Tandem system cannot execute the RUN JOB statement; however, the Connect:Direct Tandem node as the PNODE can submit a Process to an OS/390 or VSE node, and the SNODE can execute the RUN JOB.
RUN STEP1 PNODE=CD.TANDEM SNODE=SS.CD.OS390 RUN TASK (PGM=FUP PARM= (/OUT $S.#STEST/, VOLUME $B.FILERESO, PURGE STEST )) COPY FROM (DSN=DATA1.SMALLER SNODE DISP=SHR) TO (DSN=$B.FILERESO.STEST PNODE DISP=NEW) IF (STEP1 GT 4) THEN EXIT EIF RUN JOB (DSN=DATA1.CNTL(IEFBR14A)) SNODE PROCESS -
STEP2
STEP3
STEP4
113
Running a Job on the OS/400 Node from a Process Submitted on the OS/390 Node
This example is submitted on OS/390 to run a job on OS/400. DSN is necessary when submitting from OS/390. The contents of the SYSOPTS parameter define the program to run on the OS/400 node.
RJPROC01 PROCESS STEP0001 RUN JOB SNODE=CD2200 SNODEID=(USER1,PASSWD1) (DSN=AS400) SNODE SYSOPTS=\"\ \CMD(\ \CALL\ \PGM(KRM/KJOBTST)\ \)\ \"\ -
Running a Job on UNIX from a Process Submitted from Another UNIX Node
This Process shows how to initiate a Process that executes commands at another UNIX node. The SYSOPTS string must be enclosed in double quotation marks.
proc2 step01 process run job snode=unix.node snode sysopts="ls > /abc/file/user/us1/lsout; ls -lax" pend
114
Use the previous example as a Windows 95 example by using a Windows 95 node for the snode parameter.
115
116
Chapter 6
This chapter contains examples of Connect:Direct RUN TASK statements for various platforms.
In the following example, the symbolic variable, &UCC7DSN, is resolved to Z456789.TARGET, which is the proper format for the U7SVC program.
Note: To properly execute with CA-7, Connect:Direct OS/390 must not be running under CA-7 control.
PROC02 PROCESS SNODE=CD.NODEB &DSN1=Z123456.SRC &DSN2=Z456789.TARGET COPY FROM (DSN=&DSN1 DISP=SHR) TO (DSN=&DSN2 DISP=(RPL,CATLG)) SYMBOL &UCC7DSN=&DSN2 IF (HF201=0) THEN RUN TASK (PGM=U7SVC,PARM=(CLxx"D=&UCC7DSN")) SNODE EIF -
HF201
HF202
117
The following RUN TASK statement shows another way to interface with CA-7:
STEP01 RUN TASK PGM=U7SVC, PARM=(\DEMAND,JOB=\ || &POSTJOB || \,SCHID=001\)) SNODE -
LOCATE
DELETE
STEP01
118
119
Copying a Member of an Object from OS/400 to a PDS Member and then Deleting the Library
This Process copies a member of an object from OS/400 to a member of a PDS on OS/390. The RUN TASK then deletes the library (with all its objects) from the OS/400 node.
PROC#001 PROCESS SNODE=OS400.CD1 PNODE=SC.OS390.CDA PRTY=8 NOTIFY=%USER CLASS=4 HOLD=NO SNODEID=(RSMITH,RSMITH) COPY FROM ( SNODE DSN=LIBRY/RSMITH(LRECL80) SYSOPTS="TYPE(MBR)" DISP=SHR ) COMPRESS TO ( PNODE DSN=RSMITH.OS400.CNTL(LRECL80) DISP=SHR ) RUN TASK (PGM=AS400) SNODE SYSOPTS=\"\ \ CMD( \ \ DLTLIB \ \ LIB(LIBRY) \ \ ) \ \"\ -
STEP001
STEP002
120
STEP03
121
\ \ \ \ \
|| || || ||
|| || || ||
The following Connect:Direct syntax rules apply to this Process: The string of Tandem RUN command options must be enclosed in forward slashes (/). This is a Tandem syntax requirement. Bracketing backslashes (\) are positioned around variables in the string so that strings containing special characters can continue across multiple lines. Symbolics (&value) are not enclosed in bracketing backslashes.
Note: Run options for the Tandem RUN command must be separated by commas.
Because the PNODE is the OS/390 node, two vertical bars preceded and followed by blanks ( || ) are used to concatenate the value of a symbolic to the string. Resolution of the symbolic occurs before concatenation. The command used to submit PROCESS1 is as follows:
SUB PROC=PROCESS1 &PGM=FUP &INFILE=FUPIN &OUTFILE=$S.#SPL1 &PRI=100 &CPU=0
122
PROCESS1 shows a Process with a parameter (PARM) continuing over multiple lines.
PROCESS1 PROCESS PNODE=CD.OS390 SNODE=CD.TANDEM SNODEID=(127.201,RSMITH) (PGM = FUP PARM=(\ "/OUT $S.#SPL1 \ || \ ,TERM $TERM1/ \ || \ COPY $SYSTEM.BILLPROC.ACCTJAN,,SHARE") \) SNODE -
STEP01
RUN TASK
The following Connect:Direct and Tandem syntax rules apply to both of these Processes: Within a Connect:Direct Process submitted from an OS/390 node, single quotation marks or double quotation marks must be used to allow special characters to be embedded within a file name. The string of Tandem RUN command options must be enclosed in forward slashes (/). This is a Tandem syntax requirement. Because the PNODE is an OS/390 node (that is, the Process is submitted on the OS/390 node), backslashes and vertical bars must be used to continue a string across multiple lines.
Note: Bracketing backslashes are not valid when the PNODE is a Tandem node.
PROC2 and PROC3 require concatenation characters because the parameters being passed to FUP are on multiple lines.
PROC2 STEP01 PROCESS RUN TASK SNODE=SYSCLX (PGM=FUP PARM=(\"/OUT $S.#TEST,NAME $FUP \|| \,TERM $S.#TMP,PRI 150/ \|| \ COPY $A.SMITH.TACLCSTM,,FOLD") SNODE -
\)
TERM is coded on the RUN TASK statement for both PROC2 and PROC3 so Connect:Direct Processes can continue uninterrupted in the event the program being executed abends. If an abend occurs, any abend message will be sent to the device specified by the TERM command. If TERM is not coded, all abend messages will be directed to the terminal from which the Connect:Direct Tandem system was started (HOMETERM). If HOMETERM is not paused, the abend message will not be displayed and the RUN TASK will hang until HOMETERM is paused.
123
PROC3 STEP01
SNODE=SYSCLX (PGM=FUP PARM=(\"/OUT $S.#TEST,PRI 150 \,TERM $S.#TMP,NAME $FUP/ \ COPY $A.SMITH.TACLCSTM,, \ SHARE") \) SNODE
124
STEP2
Submitting a Process with a Connect:Direct OpenVMS RUN TASK from a Tandem Node
This Process, submitted from the Connect:Direct Tandem node, will issue a command to invoke a DCL command procedure. Output will be directed to the terminal. Upon successful execution of the command procedure, the terminal of the specified user will beep.
VAXRUN STEP1 PROCESS RUN TASK PNODE=CD.TANDEM SNODE=CD.VMS (PGM=VMS) SNODE SYSOPTS="OUTPUT = _NDC31 CMD = DIR DUC4:[USER1.DATA]*.DAT CMD = REPLY/USER=USER1/BELL SUCCESS" -
125
Submitting a Process with a Connect:Direct OpenVMS RUN TASK from an OS/400 Node
The example command sends a file from Connect:Direct OS/400 to Connect:Direct OpenVMS and performs a RUNTASK.
CDSND SNODE(DWY1.TCP) SNODENVIRN(OPENVMS) FDSN('CDABC220/INITPARMS(INITPARMS)') TDSN('DISK$SUP:<DYOUN1>AS400.RCV') FMSYSOPTS('TYPE(MBR)') SNODEID(USERID PASSWORD) TDISP(RPL)TDCB(*N *N *N PS) CDRUNTASK SNODE(DWY2.TCP) SNODENVIRN(OPENVMS) CMD('CMD='`DEL DISK$SUP:<DYOUN1>AS400.RCV;*''') SNODEID(USERID PASSWORD)
126
Submitting a Process with a Connect:Direct OS/390 RUN TASK from a Tandem Node
This Process, submitted from the Connect:Direct Tandem node, performs a RUN TASK on the Connect:Direct OS/390 node, then copies from Tandem to OS/390.
TANCPY STEP1 PROCESS RUN TASK SNODE=CD.TANDEM SNODEID=(GRP.USR.PASWRD) ( PGM=DMRTAMS, PARM=(C"FREE=CLOSE,RETURN=(DD),SYSOUT=X C" DELETE (CSDQA1.FILETEST.VSAM0016) C" CLUSTER C" DEFINE CLUSTER ( C" NAME(CSDQA1.FILETEST.VSAM0016) C" RECORDS(1500 100) C" VOLUMES(USER01) C" INDEXED C" KEYS(12 0) C" RECORDSIZE(80 80) C" SHAREOPTIONS(3) C" ) C" DATA ( C" NAME(CSDQA1.FILETEST.VSAM0016.DATA) C" CONTROLINTERVALSIZE(4096) C" ) C" INDEX ( C" NAME(CSDQA1.FILETEST.VSAM0016.IDX) C" CONTROLINTERVALSIZE(4096) C" SHAREOPTIONS(3) C" ) C" DATA ( C" NAME(CSDQA1.FILETEST.VSAM0016.DATA) C" CONTROLINTERVALSIZE(4096) C" ) C" INDEX ( C" NAME(CSDQA1.FILETEST.VSAM0016.IDX) C" CONTROLINTERVALSIZE(4096) C" ) ) ) SNODE -
-", ", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -", -",
* STEP2
COPY FROM ( PNODE DSN=\cycr.$user.qafiles.VSAM0001 DCB=(LRECL=80) SYSOPTS="SET XLATE ON" ) TO ( SNODE DSN=CSDQA1.FILETEST.VSAM0016 DISP=OLD )
127
Submitting a Process with a Connect:Direct Tandem RUN TASK from an OpenVMS Node
This Process, submitted from the Connect:Direct OpenVMS node, will invoke FUP at the Connect:Direct Tandem node and write detailed information about the files in the subvolume to the spooler.
TANRUN STEP1 PROCESS RUN TASK PNODE=CD.VMS SNODE=CD.TANDEM SNODEID=(GRP.USR,PASWRD) (PGM=FUP PARM=(/OUT $S.#FUPOUT/ INFO $DATA.TESTF.*,DETAIL)) SNODE -
Submitting a Process with a Connect:Direct Tandem RUN TASK from a Windows Node
The following is an example of a Connect:Direct Tandem RUN TASK submitted from a Connect:Direct Windows node.
NDM PROCESS SNODE=NDM.BAY1DR /*$TANDEM$*/ SNODEID=(NCC.NDM,xxxxxxxx)
BEGINMSG
RUN TASK (PGM = BTFNDMLG SYSOPTS = "/NAME, IN $DATA2.BTFDATA.DEFTABLE, VOL $DATA2.BTFLOAD /ND033 DNLOAD FUNBCC FUNBBETA TRUO5") SNODE
COPYSTEP COPY FROM (PNODE FILE = g:\vms\mftd\export\fusi\backup\TradeExport_20000818.002 SYSOPTS = "DATATYPE(BINARY)STRIP.BLANKS(NO)XLATE(NO)" ) TO (SNODE FILE = $test.bftdata.beta5 SYSOPTS = "'SET TYPE E' 'SET BLOCK 200' 'SET REC 200'" DISP = RPL) IF (COPYSTEP EQ 0) THEN GOTO OKMSG ELSE ERRORMSG RUN TASK (PGM = BTFNDMLG SYSOPTS = "/NAME, IN $DATA2.BTFDATA.DEFTABLE, VOL $DATA2.BTFLOAD /ND035 DNLOAD FUNBCC FUNBBETA TRUO5") SNODE EXIT
OKMSG
RUN TASK (PGM = BTFNDMLG SYSOPTS = "/NAME, IN $DATA2.BTFDATA.DEFTABLE, VOL $DATA2.BTFLOAD / ND034 DNLOAD FUNBCC FUNBBETA TRUO5") SNODE RUN TASK (PGM = BTFNDMDN SYSOPTS = "/NAME, IN $DATA2.BTFDATA.DEFTABLE, VOL $DATA2.BTFLOAD / DNLOAD FT3IN $test.btfdata.beta5 FUNBCC FUNBBETA TRUO5")
FT3IN
128
LOCATE2
LOCATE3
LOCATE3
RUN TASK
129
Defining a VSE VSAM File and Copying a Sequential File from OS/390
This multistep Process, initiated from an OS/390 node, consists of RUN TASK statements and a COPY statement. STEP1 runs the DMRTAMS utility to delete and then define a target VSAM cluster on a Connect:Direct VSE/ESA node. STEP2 runs the DMRTDYN utility to unallocate the SYSOUT output data set generated by STEP1. STEP3 copies a sequential file from an OS/390 node to a VSE node.
130
VSEVSAM STEP1
STEP2 STEP3
PNODE=SC.OS390.NODE1 SNODE=SC.VSE.NODE1 (PGM=DMRTAMS, PARM=(C" MSG=YES DSN=SYSOUT.SYS011 DD=123 DISP=SHR", C" DELETE VSE.VSAM.TEST CLUSTER ", C" DEFINE CLUSTER - ", C" (NAME(VSE.VSAM.TEST) - ", C" RECORDS(25000 5000) - ", C" VOLUMES(VSAM01) - ", C" INDEXED - ", C" REUSE - ", C" KEYS(8 6) - ", C" RECORDSIZE(262 880) - ", C" NOREPLICATE - ", C" SPANNED - ", C" SHR(2)) - ", C" DATA( - ", C" NAME(VSE.VSAM.TEST.DATA) - ", C" CISZ(4096)) - ", C" INDEX( - ", C" NAME(VSE.VSAM.TEST.INDEX) - ", C" CISZ(512)) " )) RUN TASK (PGM=DMRTDYN PARM=(CUNALLOC DSN=SYSOUT.SYS011 DD=123)) SNODE COPY FROM (DSN=OS390.SEQ.DATASET DISP=(SHR,KEEP) PNODE) TO (DSN=VSE.VSAM.TEST DISP=NEW DCB=(DSORG=VSAM) SNODE)
131
Submitting a Process with a Run Task on UNIX from Another UNIX Node
This Process initiates a Process from a UNIX node that executes commands at another UNIX node. The sysopts string must be enclosed in double quotation marks.
proc2 step01 process run task pend snode=unix.node snode sysopts = "ls; ls -lax > lsout.ncr"
pend;
132
proc1
process
copy1
run1
snode=CD.NT &file1="d:\data\out\reprts01.dat" &file2="/data/in/reprts01.dat" copy from (file=&file1 sysopts="datatype(binary)" snode) to (file=&file2 pnode) if (copy1 eq 0) then run task snode sysopts="cmd(del &file1)desktop(no)" eif pend;
In the previous example, rather than coding the specific file names in the process, symbolic variables are used in both the copy and run task statements. Since no user input is required for the delete command, the desktop parameter is set to NO and no console window is created on the Windows desktop.
Submitting a Process with a Run Task on an OpenVME Node to Run a Program on Another OpenVME Node
This Process initiates a Process from an OpenVME node that executes commands at a remote OpenVME node. The sysopts string must be enclosed in double quotation marks.
proc2 step01 process run task pend snode=vme.node snode sysopts = "ls; ls -lax > lsout.ncr"
run1
133
PEND
Submitting a Process from Connect:Direct Requester for Windows to Run DMRTSUB on OS/390
The following Process is submitted from Connect:Direct Requester for Windows to run DMRTSUB on a Connect:Direct OS/390 node. This Run Task using DMRTSUB will submit a job to run on OS/390 and pass the symbolic for &NTDISP to the JCL it submits.
Note: Refer to the Connect:Direct OS/390 Users Guide for more information on DMRTSUB.
DMRTASK PROCESS &NTDISP=RPL SNODE=CSD.MVS.LEVEL1 /*$MVS$*/ HOLD=NO CLASS=1 PRTY=10 EXECPRTY=10 RETAIN=NO SNODEID=(USERID,PASSWORD) RTASK01 RUN TASK SNODE (PGM=DMRTSUB) SYSOPTS=CDSN=JSMITH.PROCESS(SAMPLE),DISP=SHR CNTDISP &NTDISP PEND
134
Chapter 7
This chapter contains examples of Connect:Direct SUBMIT statements. The examples include SUBMIT statements for cross platform Processes.
135
PROCESS1 executes:
PROCESS1 PROCESS PNODE=CD.LA SNODE=CD.DALLAS &DSN1=USER1.TEXT &DSN2=USER1.NEW.TEXT &PRTY=14 NOTIFY=USER1 COPY FROM (DSN=&DSN1 DISP=SHR PNODE) TO (DSN=&DSN2 DISP=(NEW,CATLG) SNODE) SUBMIT DSN=USER1.PROCESS.LIB(PROCESS2) PRTY=&PRTY SUBNODE=SNODE &DSN=&DSN2 -
STEP01
STEP02
PROCESS1 copies the file USER1.TEXT in LA to a file called USER1.NEW.TEXT at CD.DALLAS. Then it submits PROCESS2, which executes on the CD.DALLAS node because the SUBNODE parameter designates the SNODE, or CD.DALLAS, as the submitting node for PROCESS2. PROCESS2 copies the file ABC.NEW.TEXT at CD.DALLAS to file ABC.NEW.TEXT1 in CD.NEWYORK. The default DSN symbolic name for the PNODE is taken from the previous PROCESS1.
PROCESS1 executes:
PROCESS1 PROCESS PNODE=CD.LA SNODE=CD.DALLAS &DSN1=&DSN1 &DSN2=&DSN2 &PRTY=14 NOTIFY=A345 COPY FROM (DSN=&DSN1 DISP=SHR PNODE) TO (DSN=&DSN2 DISP=SHR SNODE) SUBMIT DSN=A345.PROCESS.LIB(PROCESS2) PRTY=&PRTY SUBNODE=SNODE &DSN=&DSN2 -
STEP01 STEP02
136
PROCESS1 copies the file A345.DATA at CD.LA to a file called A345.NEW.DATA at the CD.DALLAS node, and then it submits PROCESS2, which executes on the CD.DALLAS node. PROCESS2 copies the file A345.NEW.DATA at the CD.DALLAS to the file A345.NEW.DATA1 at CD.NEWYORK.
copy1
subpr1
The previous example illustrates a submitting a Windows NT Process from a UNIX node. To use this illustration as a Windows 95 example, you must specify a valid Windows 95 SNODE.
STEP2 STEP3
SUBMIT SUBMIT
137
pend
138
Chapter 8
This chapter contains examples of Connect:Direct SYMBOL and symbolic statements for various Connect:Direct platforms.
Using the SYMBOL Statement to Construct a Symbolic Value for Data Set Names (OS/390)
This Process illustrates a Connect:Direct Process that uses the SYMBOL statement to construct a symbolic value for DSN1 and DSN2. These SYMBOL statements must be resolved when submitting the Process. In addition, the SNODE is a symbolic that also must be resolved when the Process is submitted.
Note: Two vertical bars preceded and followed by blanks ( || ) are used to indicate concatenation. Bracketing backslashes ensure that special characters within the string are maintained.
As specified by the REQUEUE parameter in the PROCESS statement, the Process is requeued in the event of an x37-type error. The Process is then retained in the queue and rerun every Monday at 8:30 a.m. as specified by the RETAIN and STARTT parameters.
SYMPROC PROCESS SNODE=&SNODE NOTIFY=%USER CLASS=T REQUEUE=YES PRTY=2 STARTT=(MO,08:30:00AM) RETAIN=YES SYMBOL &DSN1=&HLQ || \.\ || &D1 SYMBOL &DSN2=&HLQ || \.\ || &D2 COPY FROM (DSN=&DSN1) TO (DSN=&DSN2 DISP=RPL) -
STEP01
To submit the Process on a Connect:Direct OS/390 node, issue the following Submit Process command:
SUB PROC SYMPROC &HLQ=JSMIT &D1=FILEA &D2=FILEB &SNODE=CD.SAB.F5
139
Using Symbolics Within DMRTSUB to Substitute a Windows Pathname into OS/390 JCL
This example shows a Connect:Direct Process that passes a Windows pathname to DMRTSUB. The symbolic substitution accommodates the backslashes in the Windows pathname. This Process runs on the same Connect:Direct node using PNODE=SNODE processing.
SUB1 PROCESS SNODE=SC.OS390.USER1 PNODE=SC.OS390.USER1 &TST1=\C:\\TEST\\DATA.TXT\ &CASEPARM=CASE7 ( PGM=DMRTSUB PARM=(DSN=USER1.CD211.PROCESS(SUB1BR14),DISP=SHR", NTDS &CASEPARM, TST1 &TST1" ) ) SNODE -
STEP1
RUN TASK
The following JCL is present in member SUB1BR14 of data set USER1.CD211.PROCESS for the above example.
//USERC1N JOB (11111),USER 1,CLASS=C,REGION=4096K, // MSGLEVEL=(1,1),MSGCLASS=X,NOTIFY=USER1 //* //ALLOC EXEC PGM=IEFBR14 //* NTDS=&NTDS //* TST1=&TST1
Using SYMBOL Statements for Input and Output Data Sets (OS/390 and OS/400)
In this Process, SYMBOL statements are used for input/output data sets. SYMBOL statements have also been defined for DISP fields. The following describes the steps in the Process. STEP01 copies a sequential file from OS/390 to a member of a physical data base file on the Connect:Direct OS/400 node. The OS/390 input file is BUDGET.PROD.DAILY. The output data set on the Connect:Direct OS/400 node is TESTLIB/BUDGET. STEP02 copies a member of a physical data base file on the Connect:Direct OS/400 node to a sequential file on OS/390. The input data set from the Connect:Direct OS/400 node is PRODLIB/BUDGET. The OS/390 output file is BUDGET.TEST.DAILY.
140
PROC#01
PROCESS
STEP01
STEP02
SNODE=AS400.NY1 PRTY=8 NOTIFY=RSMITH CLASS=4 &PROD=PROD &TEST=TEST SNODEID=(RSMITH,ROGER) SYMBOL &DSN1I=\BUDGET.\ || &PROD || \.DAILY\ SYMBOL &DSN1O=TESTLIB/BUDGET SYMBOL &DSN2I=PRODLIB/BUDGET SYMBOL &DSN2O=\BUDGET.\ || &TEST || \.DAILY\ SYMBOL &DISP01=SHR SYMBOL &DISP02=RPL COPY FROM (PNODE DSN=&DSN1I DISP=&DISP01) COMPRESS TO (SNODE DSN=&DSN1O SYSOPTS=\"\ \TYPE(MBR) \ \TEXT(ADDED BY PROCESS PROC#01 \ \IN STEP01) \ \"\ DISP=RPL) COPY FROM (SNODE DSN=&DSN2I SYSOPTS="TYPE(MBR)" DISP=SHR) COMPRESS TO (PNODE DSN=&DSN2O DCB=(DSORG=PS,RECFM=FB,LRECL=080,BLKSIZE=23440) SPACE=(CYL,(15,1),RLSE,CONTIG,ROUND) DISP=&DISP02)
Note: Two vertical bars preceded and followed by blanks ( || ) are used to indicate concatenation. Bracketing backslashes ensure that special characters within the string are maintained.
141
STEP01
The following Process correctly uses the SYMBOL statement to declare the substitution of more than one variable in the SYSOPTS statement. The COPY from OS/390 to UNIX with certain permission and no blank stripping is successful.
PROCVAR PROCESS SNODE=&SNODE &JCLLIB=USER01.DALLAS.CNTL &FROMDISP=SHR &TODISP=RPL &TOPERMISS=770 &STRIP=NO &COMPRESS=, SYMBOL &BLANKS=&STRIP SYMBOL &PERMISS=&TOPERMIS SYMBOL &SYSOPTS=\"\||:permiss=|| &PERMISS || :strip.blanks= || &BLANKS||\:\||\" COPY FROM (DSN=&FROMDSN DISP=&FROMDISP ) TO (DSN="&TODSN" DISP=(&TODISP SYSOPTS=&SYSOPTS ) &COMPRESS -
STEP01
142
STEP1
STEP2
The Process, SYMBOLS, can be submitted with the following example command:
SUBMIT FILE SYMBOLS
STEP01
STEP02
143
Passing Parameters to a DCL Command Procedure from a RUN JOB Statement (Connect:Direct OpenVMS)
This example shows an example Connect:Direct Process that allows you to pass parameters to a DCL command procedure from a RUN JOB statement.
SYMBOL3 STEP01 PROCESS SYMBOL RUN JOB SNODE=CD.VMS &P1=, &SO="P1=&P1" (DSN=TEST.COM PNODE) SYSOPTS=&SO
The Process, SYMBOL3, can be submitted with the following example command issued in DCL command format:
$NDMUI SUBMIT SYMBOL3 /SYMBOLICS=("P1=PARM1")
144
Chapter 9
This chapter contains examples of conditional statements within Processes. An example of conditional logic statements in a cross platform Process is included.
STEP02 STEP03
STEP04
145
146
STEP01
STEP02
STEP03
STEP04
147
STEP02 STEP03
STEP04
148
Index
A
asterisks 7
E
EBCDIC Hex value slash / 6 vertical bar | 6 examples conditional statements 145 COPY statement 19 PROCESS statement 15 RUN JOB statement 111 RUN TASK statement 117 SUBMIT statement 135 SYMBOL statement 139
B
backslashes 10 bracketing 10 bracketing backslashes 10
C
commas 6 comments 8 concatenation 8, 9 conditional statements examples 145 general description 2 Connect:Direct Processes construction of 2 description 1, 3 statement structure 5 submission 3 use of statements 1 continuation marks 7 COPY statement examples 19 general description 1
F
format, description 5
H
how to write a Connect:Direct Process 1, 2
K
keyword parameters 6
L
labels 5
M D
maximum storage area, PROCESS statement 2
N
notational conventions xii
149
Index
P
parameters description 5 keyword 6 positional 6 parentheses 7 PEND statement 2 positional parameters 6 PROCESS statement examples 15 general description 1 maximum storage area allowed 2 Process structure 5
SYMBOL statement Connect:Direct OS/390, SYSOPTS variable substitution, example 142 examples 139 general description 2 symbolic substitution 12 syntax asterisks 7 commas 6 comments 8 description 5 SYSOPTS parameter 142
T
termination 12
Q
queues and Connect:Direct Processes 3 quotation marks 11
U
use of the Connect:Direct Process Guide 2
R
RUN JOB statement examples 111 general description 1 RUN TASK statement examples 117 general description 2
V
vertical bars, EBCDIC Hex value 6
S
single quotation marks 11 slash, EBCDIC Hex value 6 special characters 6 statement identifier 5 statement structure 5 SUBMIT statement examples 135 general description 2 subparameters 6 summary of Connect:Direct Process submission 3
150