PN 00038

CONNECT:Direct™ Process Guide
Concepts and Examples Volume 1

CONNECT:Direct Process Guide Concepts and Examples Volume 1 Seventh Edition August 1999 This document was prepared to assist licensed users of the Sterling Commerce, Inc., CONNECT:Direct products; its contents may not be used for any other purpose without prior written permission. The material contained herein is supplied without representation or warranty of any kind and is based on typical use. Any unusual use may produce unpredictable results. Sterling Commerce, therefore, assumes no responsibility and shall have no liability of any kind arising from the supply or use of this document or the material contained herein. 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. Restricted Rights: Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFAR 252.227-7013. © 1984, 1998, 1999 Sterling Commerce, Inc. All rights reserved, including the right to reproduce this document or any portion thereof in any form. Printed in the United States of America. CONNECT:Direct is a trademark of Sterling Commerce. All other brand or product names are trademarks or registered trademarks of their respective companies.

CDPGCON908

Contents

Preface
Organization of the Documentation Set................................................................................ Notational Conventions......................................................................................................... Uppercase Letters .......................................................................................................... Uppercase and Lowercase Letters ................................................................................. Lowercase Letters .......................................................................................................... Bold Letters.................................................................................................................... Italic Letters ................................................................................................................... Underlined Letters ......................................................................................................... Vertical Bars .................................................................................................................. Brackets ......................................................................................................................... Horizontal Ellipsis ......................................................................................................... Vertical Ellipsis.............................................................................................................. Additional Notations...................................................................................................... Note and Caution Messages........................................................................................... xv xvi xvi xvi xvi xvii xvii xvii xvii xvii xvii xvii xvii xviii

Part I
Chapter 1

Concepts
About CONNECT:Direct Processes
Description of Process Statements ........................................................................................ Writing CONNECT:Direct Processes................................................................................... Summary of CONNECT:Direct Process Submission........................................................... 1-1 1-2 1-2

Chapter 2

Process Statement Structure and Syntax
Components of a Process ...................................................................................................... Label .............................................................................................................................. Statement Identifier........................................................................................................ Parameters or Subparameters......................................................................................... 2-1 2-1 2-1 2-1

................................................................................... and OS/400 Products................................................................................................ Asterisks .................4: Example 3............................................................................................................ 4-3 4-3 4-3 4-4 4-4 4-5 4-5 4-5 4-5 4-5 4-6 4-6 Copying PDS to PDS (OS/390 to OS/390) ................................................................................................................ Continuation Marks....................................6: Example 3................ Concatenation for CONNECT:Direct for OpenVMS ....... Example................... Concatenation for CONNECT:Direct for UNIX.................................................................... and CONNECT:Direct for OpenVME) ..................................... Example 4..................................................... File Allocation Using a TYPE File .............8: Copying One Member of a PDS ............................... Example 4........................................................... Commas................... Concatenation for CONNECT:Direct for Tandem .. VM/ESA..... CONNECT:Direct for OpenVME............................................................................................................................................................. Symbolic Substitution ........................................................................................................................6: Example 4......................................................................3: Example 4............................. Concatenation for the CONNECT:Direct for OS/390.............. Termination ........................ Copying an Entire PDS .................................2: Example 3............. MSP.......................... VSE/ESA....................................................................................1: Example 3....................................................... Parentheses.......... Detailed PROCESS Statement Using the RETAIN Parameter.. Using %PNODE... Specifying Accounting Data (CONNECT:Direct for UNIX....................................................................................... 3-1 3-1 3-2 3-2 3-2 3-2 3-3 3-3 Chapter 4 COPY Statement Examples File Allocation (OS/390 to OS/390)............................................................... Using TCPNAME to Identify the PNODE/SNODE Sites ................ MVS.................... Specifying a Range and the NR Subparameter to Copy Selected PDS Members ...........................................................................................5: Example 4.................................................................... CONNECT:Direct for Stratus VOS..............................7: Example 3...... Comments ..............................4: Example 4...... Using %SUBDATE and %SUBTIME for a File Name. and CONNECT:Direct for OpenVME) ... Copying a DFDSS Volume Dump .8: Basic PROCESS Statement................................................................................................ Special Characters .. Specifying a Process Starting Day and Time (CONNECT:Direct for UNIX.............10: Copying a PDS and Excluding Members Generically ....................... and CONNECT:Direct for Stratus VOS..............................iv CONNECT:Direct Process Guide Concepts and Examples CONNECT:Direct Syntax .... CONNECT:Direct for Stratus VOS..............................5: Example 3..9: Copying a PDS and Excluding an Individual Member ....................................... .....................................................................1: Example 4...... Example 4.............................. 2-2 2-2 2-2 2-2 2-3 2-3 2-3 2-4 2-4 2-5 2-5 2-5 2-7 2-7 2-8 Part II Chapter 3 Example Processes PROCESS Statement Examples Example 3.................................................................................................................... Example 4....................3: Example 3....................................... Copying a SAM File .......................................2: Example 4.. Detailed PROCESS Statement Using the NOTIFY Parameter.........................7: Using Defaults to Allocate a File ................. Special Purpose Bracketing......................................................... Using a TCP/IP Dotted-Form Address for the SNODE Keyword............................

........29: Copying a Member of a Physical Data Base File from OS/400 to a Sequential File on OS/390 ..............31: Copying a Member of a PDS from OS/390 to a Spooled File on OS/400 ............................................................................ Copying a File from CONNECT:Direct for Tandem to CONNECT:Direct for OS/390........35: Creating an Unstructured Code Type 0 File (OS/390 to Tandem) ............................ Example 4....................................14: Copying a PDS Using the ALIAS Parameter with SELECT and EXCLUDE ...... Example 4.....................15: Copying a PDS Member to Tape ........................................................................... Example 4........... Creating and Copying a VSAM Linear Data Set.................... Example 4........ Example 4.... Example 4....................... Example 4.... Example 4..................16: Using the IOEXIT Parameter.......Contents v Example 4................. Copying Between OS/390 and Tandem Nodes.. Example 4.................36: Copying an Unstructured Code Type 0 File from Tandem to OS/390 .....41: Using FUP in a Process Submitted on OS/390 to Delete a File on Tandem ....................................... Creating and Copying a PDSE Data Set .................. Creating and Copying a VSAM KSDS Data Set ............24: Example 4.......19: Example 4............ Example 4......................................................................................40: Copying a File from Tandem to OS/390 After Running DMRTDYN on OS/390 .................................................12: Copying a PDS and Generically Selecting Members ..............................................................18: Example 4................17: Example 4.23: Example 4.................................. ...................................................20: Example 4....................... Example 4................................................................................................................................. Copying Files Using SMS Parameters........ Example 4.....................................................22: Example 4................. Example 4.... Copying Between OS/390 and OS/400 Nodes ....................................................... Copying a Data Set with a Security Profile .................................30: Copying a Data Set from OS/390 to a Spooled File on OS/400......................................................................................................................................................................................38: Copying a File Submitted from OS/390 to Tandem ........................................ Copying to Tape (OS/390 to OS/390)..........................................13: Copying PDS Members Using the EXCLUDE and SELECT Parameters ........28: Copying a Sequential File from OS/390 to a Member of a Physical Data Base File .......................34: Creating an Unstructured Code Type 101 File (OS/390 to Tandem) ...........................................................32: Submitting a Process from a CONNECT:Direct for Tandem Node that Copies a File from OS/390 to Tandem..............................26: Resolution of a Unique Member Name by Appending a Digit .....................25: Copying to a New SMS-Controlled Data Set ...... Copying to a New SMS Data Set Using LIKE ...... Example 4........................... Example 4................37: Copying a Sequential File from an OS/390 Node to a Tandem Node.42: Using CONNECT:Direct to Allocate a Partitioned File on a Single System (OS/390 to Tandem) ......................... Example 4.....................33: Copying to an Entry-Sequenced File (OS/390 to Tandem) ................................................................................ 4-6 4-7 4-7 4-7 4-8 4-8 4-9 4-9 4-10 4-10 4-10 4-10 4-11 4-11 4-11 4-12 4-12 4-12 4-13 4-13 4-13 4-13 4-14 4-14 4-15 4-15 4-16 4-16 4-16 4-17 4-17 4-17 4-18 4-18 4-18 4-19 4-19 4-19 4-20 Copying to OS/390 Nodes with Unique Member Name Allocation (AXUNIQ Exit) .................................... Creating and Copying a VSAM RRDS Data Set.. Example 4....................39: Copying a File from Tandem on an EXPAND Network to OS/390 ............................27: Resolution of a Unique Member Name by Truncating and Appending a Digit................ Example 4................ Example 4..21: Example 4........................................................................................................ Creating and Copying a VSAM ESDS Data Set .. Example 4.....................................11: Copying a PDS and Using a Range to Exclude PDS Members................................ Example 4.............. Resolution Method............................................... Example 4............ Copying Files Using Exits (OS/390 to OS/390) .............................................. Example 4.......................................................

..................... Copying a File from Tape to Disk..................................72: Copying an OS/390 Sequential Data Set or PDS to a VSE-Controlled Tape Data Set ........................................................................ Copying Between OS/390 and VM Nodes............................................................................................ Example 4...........59: Example 4... Example 4........................................................47: Copying a Disk File from Tandem to a Tape Device at OS/390 ............73: Copying an OS/390 PDS Member to a VSE BSAM Sublibrary Member ... 4-23 Example 4.................46: Copying Files Between the Tandem Spooler System and an OS/390 Node Using Job Number............................................49: Copying a File from OS/390 to Tandem Using the FASTLOAD Option............................................................................................................................. Example 4......................... 4-20 Example 4.................vi CONNECT:Direct Process Guide Concepts and Examples Example 4.65: Example 4........... Copying an OS/390 File to Tape on VM .......................... Copying an Executable File from an OpenVMS Node to an OS/390 Node ........................................ Copying Between OS/390 and Stratus VOS Nodes .................. Example 4................................... Copying a Data Set from an OS/390 Node to an Executable File on an OpenVMS Node ................................................ Example 4...............................................................................................................51: Copying Files Between UNIX and OS/390 .............................................60: Example 4................................................................................. Copying from OS/390 to OpenVMS and Specifying a User-Defined Translation Table..........68: Copying a File from OS/390 to VM................................................... 4-23 Copying Between OS/390 and UNIX Nodes ........ Example 4.... Example 4.69: Copying a File from OS/390 to VSE (DYNAM/T Tape Files) .....................58: Example 4............66: Example 4................. Example 4....................... Example 4................................................. Copying a Single Entry from the OpenVMS Text Library to an OS/390 Member ..................43: SYSOPTS Syntax Conventions (OS/390 to Tandem) ........ Copying Between OS/390 and VSE Nodes ............ .................... Copying Between OS/390 and OpenVME Nodes ......................... 4-21 Example 4..................... Example 4.....55: Copying a File from OpenVME to OS/390 ................................ Copying All Entries from an OpenVMS Text Library to OS/390 ................50: Allocating a VSAM Data Set and Copying a File from Tandem to OS/390.......71: Copying an OS/390 BSAM File to a VSE-Controlled Disk Data Set .............. 4-24 4-24 4-25 4-25 4-25 4-26 4-26 4-26 4-26 4-26 4-27 4-27 4-27 4-28 4-28 4-28 4-28 4-29 4-29 4-29 4-29 4-30 4-30 4-31 4-31 4-32 4-32 4-33 4-33 4-34 4-35 Copying Between OS/390 and OpenVMS Nodes..........................................................................75: Copying an OS/390 Sequential Data Set or OS/390 PDS to a VSE-Controlled Tape Data Set ...............................................................................................................63: Example 4...67: Example 4........................................................................61: Example 4..............................................................................................................................54: Copying Files Between OpenVME and OS/390............... 4-22 Example 4...74: Copying an OS/390 PDS Member to a VSE VSAM Sublibrary Member ......... Copying PDS Members from OS/390 to OpenVMS .................................................................. Copying an OS/390 File to Spool on VM .................62: Example 4......... 4-21 Example 4................................... Example 4............... Copying a File from Disk to Tape...... Copying an OS/390 PDS to a Set of Files on VM .............. Example 4...............48: Copying a Tape File from OS/390 to a Disk File on Tandem ......................53: Copying a File from Stratus VOS to OS/390........ 4-22 Example 4....................................45: Copying Between an OS/390 Node and a Remote Tandem Spooler on an EXPAND Network .....56: Example 4............... 4-22 Example 4........52: Copying Files Between Stratus VOS and OS/390 ... Example 4.............64: Example 4.............70: Copying an OS/390 PDS Member to a New VSE File in a DYNAM Pool ......44: Copying a File from a Tandem Spooler to an OS/390 Node ...............57: Example 4....... Using the SYSOPTS Parameter (OS/390 to OpenVMS)......................

...................... Example 4.............................................. Example 4..................................................................................... Example 4.. Example 4.........................96: Restoring Files Using the CONNECT:Direct for UNIX Pipe I/O Function ............................... Copying Between Tandem Nodes.... Example 4. Example 4..................... Example 4........................104: Copying a File from UNIX to Windows 95/NT ....................100: Copying Save Files from OS/400 to UNIX .......................................................... Copying Between Tandem and UNIX Nodes...................101: Copying Save Files from UNIX to OS/400 .............................................. Example 4....................82: Copying Text Files from Tandem to UNIX............................89: Copying Files from Tandem to VSE ................ Example 4..... Example 4..................................................................................................88: Copying an OpenVMS Key-Sequenced File to a CONNECT:Direct for Tandem Node .... Example 4..................................... Copying Between Tandem and OpenVMS Nodes ................................................ Copying Between Tandem and OS/400 Nodes.................................................. Example 4.....90: Copying a Tandem File to a VSE VSAM File ...........................................................95: Archiving Files Using the CONNECT:Direct for UNIX Pipe I/O Function ... Copying Between UNIX and NetWare Nodes ............................ Copying Between Tandem and VM Nodes .................. 4-36 4-36 4-36 4-36 4-37 4-37 4-37 4-38 4-38 4-38 4-38 4-38 4-39 4-39 4-39 4-40 4-40 4-40 4-40 4-41 4-41 4-41 4-42 4-42 4-42 4-42 4-43 4-43 4-44 4-44 4-44 4-45 4-45 4-45 4-45 4-46 4-46 4-46 4-46 4-47 4-47 .......... Example 4............................................................97: Archiving and Restoring Files in a Single Step Using the CONNECT:Direct for UNIX Pipe I/O Function ......... Example 4..........................................................................94: Copying Files and Using the Compression Feature (UNIX to UNIX) .......93: Copying Files and Using the Checkpointing Feature (UNIX to UNIX) .................... Copying Between UNIX and OS/400 Nodes............................ Example 4........ Example 4.................................... Example 4................. Example 4...................... Example 4..81: Copying a Tandem File to an OS/400 Node........................................................................86: Copying a VSAM File from VM to a Key-Sequenced Tandem File ........................................................................ Example 4...................... Copying Between Tandem and VSE Nodes .................. Example 4..............................................................91: Copying a VSE VSAM File to a Tandem Node .......79: Copying to an Entry-Sequenced File (Tandem to Tandem) ......................... Example 4.........................................77: Copying a File from OS/390 to OS/2 Warp................................. Example 4............................................................103: Copying Files from UNIX to NetWare..98: Copying Files from UNIX to a Member on OS/400......... Copying Between OS/390 and OS/2 Warp Node ...........76: Copying a File from OS/390 to Windows 95/NT........................................... Example 4....................... Example 4.........................99: Copying Files from UNIX to a Member on OS/400......................................................... Example 4................... Example 4.............................84: Copying Files from Tandem to VM....................................80: Copying Files Between Tandem Spooler Systems .............................83: Copying Binary Files from Tandem to UNIX ...................................87: Copying a Tandem Key-Sequenced File to a CONNECT:Direct for OpenVMS Node... Example 4.102: Copying Executables from UNIX to OS/400 .................................85: Copying a VSAM File from VM to an Entry-Sequenced Tandem File ...................................... Copying Between UNIX and Windows 95/NT Nodes ....................... Example 4.............. Copying Between UNIX Nodes....................................................................................Contents vii Copying Between OS/390 and Windows 95/NT Nodes .........................................................................92: Copying Files and Using sysopts (UNIX to UNIX) ......................78: Copying Files Between OS/2 Warp and OS/390.................................................................................................................................................

..116: Copying VM files to a Shared File System (SFS) ...............................................110: Copying Files and Using the Checkpointing Feature (UNIX to OpenVME)...113: Copying an Entire Minidisk ..................119: Copying Files from VM to OS/2 Warp......................128: VM-Initiated Copy from OS/400 to VM Spool .129: Copying a VM VSAM file to OS/390......................................................................... 4-55 4-55 4-55 4-55 4-56 Example 4......120: Copying a VM Sequential File to a CA-DYNAM/T Tape File (VSE) ......121: Copying a DYNAM-Controlled File to a VM Node........131: Copying a VM CMS Sequential File to UNIX ..................132: Copying a CMS Sequential File from VM to Windows 95 .............................................. 4-60 Example 4.................viii CONNECT:Direct Process Guide Concepts and Examples Copying Between Stratus VOS Nodes................................126: VM-Initiated Copy from OS/400 to VM......... Example 4... Example 4................................................................................................................... 4-60 Example 4.......................... 4-59 Example 4....... 4-56 Example 4.............................. Copying Between VM and VSE Nodes .............................................106: Copying Files and Using the Checkpointing Feature (Stratus VOS to Stratus VOS)..............................................................................124: Copying Files from VM to OS/400......................................... 4-50 Example 4.......................122: Copying VM Sequential Files to CA-DYNAM/D Files (VSE)............. 4-57 Copying Between VM and OS/400 Nodes.............................................................................118: Copying Files from VM to OpenVMS...... 4-51 Example 4................ 4-50 4-50 4-51 Example 4........................................................................................................ 4-58 Example 4......................................... 4-51 Example 4..................112: Copying a VM File to VM Spool........................ Copying Between OpenVME Nodes .................................................. Example 4...................................................................... 4-50 Copying Files Between OpenVME and Windows 95/NT .................. 4-59 Example 4.................... 4-58 Example 4..................123: Using a Typekey to Copy a DYNAM-Controlled File to a VM Node.................................105: Copying Files and Using sysopts (Stratus VOS to Stratus VOS) . Copying Between OpenVMS Nodes.......130: Copying a CMS Disk File to an OS/390 Node ......... Copying Between VM and OS/2 Warp Nodes......................................................................................................... 4-58 Example 4............109: Copying Files and Using SYSOPTS (OpenVME to UNIX)..................................... 4-51 Example 4........125: Copying VSAM Files from VM to OS/400 ...... 4-61 Copying Between VM and UNIX Nodes.......... Example 4.......................... Copying Files Between OpenVME and UNIX ................................................................................114: Copying from Disk to Tape...........................................................................117: Extracting an SFS File and Placing the File on the VM Reader Spool................................. Example 4.................................... Example 4...................................108: Copying Files and Using the Checkpointing Feature (OpenVME to OpenVME)......................................................................127: VM-Initiated Copy VM to OS/400 Spool .................107: Copying Files and Using the Compression Feature (Stratus VOS to Stratus VOS) ............................................................................................. 4-51 Example 4................................................................................................................. Example 4.133: Copying a VM CMS File to Windows NT . 4-60 Copying a VM VSAM file to OS/390........................... 4-52 Example 4........................................................................... 4-55 Copying Between VM and OpenVMS Nodes ........... 4-56 Example 4........................................ Example 4.........111: Copying a File from OpenVME to Windows 95/NT............. Example 4................................................................................................................................................................................. Copying Between VM Nodes...... 4-47 4-47 4-48 4-48 4-49 4-49 4-50 Example 4............................... 4-56 Example 4.. Example 4................................................115: VM to VM Group File Copy................. Copying VM and Windows 95/NT Nodes .............................................. 4-61 4-61 4-62 4-62 4-62 4-63 ............................

Contents

ix

Example 4.134: Copying a File from Disk to Tape ....................................................... Example 4.135: Copying a File from Tape to Disk ....................................................... Example 4.136: Using Symbolics in a COPY Statement (CONNECT:Direct for OpenVMS) ..................................................................................... Example 4.137: Copying a Sequential File to a Text Library........................................ Copying Between OpenVMS and VSE Nodes ..................................................................... Example 4.138: Copying a VSE Sequential File to an OpenVMS Node ...................... Copying Between VSE Nodes .............................................................................................. Example 4.139: Copying a VSE Sequential File to Another VSE Sequential File ....... Example 4.140: Copying a VSE Non-Labeled Tape to a VSE Sequential File............. Example 4.141: Copying the CONNECT:Direct Message File to SL Tape.................. Example 4.142: Copying a Non-managed Disk Data Set into Another Non-managed CKD Disk Data Set ...................................................... Example 4.143: Copying a Non-controlled Disk Data Set to a Managed CKD Disk Data Set ....................................................................................... Example 4.144: Copying a Non-managed Disk File into a Start Track 1 FBA Non-controlled Data Set ...................................................................... Example 4.145: Copying to Non-TMS Controlled Tapes............................................. Example 4.146: Copying a Non-managed Disk File to a CA-DYNAM/D or CA-EPIC Start Track 1 FBA Non-controlled Data Set ....................... Example 4.147: Printing a Managed Disk Data Set....................................................... Example 4.148: Copying a Non-controlled Sequential File to a MSAM File ............... Example 4.149: Copying a Non-controlled Tape Data Set to a Controlled Disk File............................................................................................... Example 4.150: Copying Non-managed Disk Data Set to a Non-managed Tape Data Set................................................................................................ Example 4.151: Copying a Managed Disk Data Set to Another Managed Data Set ..... Example 4.152: Copying a Managed Generation Disk Data Set to Another Managed Data Set ................................................................................ Example 4.153: Copying a Controlled Disk Data Set to a Controlled Tape Output File ........................................................................................... Example 4.154: Copying a Controlled BSAM Data Set to a MSAM Output Data Set................................................................................................ Example 4.155: Copying a Controlled Tape Data Set to a Controlled FBA Disk Output Data Set.................................................................................... Example 4.156: Copying a Controlled CKD Disk Data Set to a Non-controlled Tape Data Set....................................................................................... Example 4.157: Copying a VSE Sublibrary Member from a BSAM Sublibrary to a Controlled Disk Data Set .................................................................. Example 4.158: Copying a VSE Sublibrary Member from a BSAM Sublibrary to a Controlled Tape Data Set .................................................................. Example 4.159: Copying a VSE/POWER LST Queue Member to a Controlled Disk Data Set ....................................................................................... Example 4.160: Copying a BSAM VSE Sublibrary to a New VSE BSAM Library..... Example 4.161: Copying a BSAM VSE Sublibrary to a New OS/390 PDS ................. Example 4.162: Copying a MSAM Data Set to a Controlled BSAM Data Set ............. Copying Between VSE and OS/2 Warp Nodes .................................................................... Example 4.163: Copying a Controlled File to an OS/2 HPFS File................................ Example 4.164: Copying from a Specific VSE Librarian Member to an OS/2 HPFS or FAT File................................................................................ Copying Between VSE and OS/400 Nodes .......................................................................... Example 4.165: Copying a VSE VSAM to an OS/400 PDS Member ........................... Example 4.166: Copying a VSE VSAM File to an OS/400 Spooled File .....................

4-63 4-63 4-63 4-63 4-64 4-64 4-64 4-64 4-65 4-65 4-66 4-66 4-67 4-67 4-68 4-68 4-69 4-69 4-70 4-70 4-71 4-71 4-72 4-73 4-73 4-74 4-75 4-76 4-77 4-78 4-79 4-80 4-80 4-81 4-82 4-82 4-82

x

CONNECT:Direct Process Guide Concepts and Examples

Copying Between VSE and OS/390 Nodes .......................................................................... Example 4.167: Copying a VSE Librarian BSAM Member to a Preallocated OS/390 PDS Member........................................................................... Example 4.168: Copying a VSAM VSE Library Member to a Preallocated OS/390 PDS Member........................................................................... Example 4.169: Copying a VSE/POWER LST Queue Member to a Preallocated OS/390 PDS ......................................................................................... Copying Files Between VSE and UNIX ............................................................................... Example 4.170: Copying a File from UNIX HP to a Controlled Disk Data Set Using LU6.2 ......................................................................................... Example 4.171: Copying a File from HP UNIX to a Controlled Disk Data Set Using TCP/IP ....................................................................................... File Allocation (MSP to MSP) .............................................................................................. Example 4.172: Using Defaults to Allocate a File ......................................................... Example 4.173: Using a Type File to Allocate a File .................................................... Example 4.174: Copying a SAM File ............................................................................ Copying PDS to PDS (MSP to MSP).................................................................................... Example 4.175: Copying an Entire PDS ........................................................................ Example 4.176: Copying an Entire PDS Using Rename and NOREPLACE Functions...................................................................... Example 4.177: Specifying a Range and the NR Subparameter to Copy Selected PDS Members ...................................................................................... Example 4.178: Copying One Member of a PDS .......................................................... Example 4.179: Copying a PDS and Excluding an Individual Member ........................ Example 4.180: Copying a PDS and Excluding Members Generically ......................... Example 4.181: Copying a PDS and Using a Range to Exclude PDS Members ........... Example 4.182: Copying a PDS and Generically Selecting Members........................... Example 4.183: Copying PDS Members Using the EXCLUDE and SELECT Parameters ............................................................................ Example 4.184: Copying a PDS Using the ALIAS Parameter with SELECT and EXCLUDE .................................................................................... Copying to Tape (MSP to MSP) ........................................................................................... Example 4.185: Copying a PDS Member to Tape ......................................................... Copying Files Using Exits (MSP to MSP)............................................................................ Example 4.186: Using the IOEXIT Parameter............................................................... Copying Between MSP and OS/400 Nodes .......................................................................... Example 4.187: Copying a Sequential File from MSP to a Member of a Physical Data Base File ...................................................................................... Example 4.188: Copying a Member of a Physical Data Base File from OS/400 to a Sequential File on MSP................................................................. Example 4.189: Copying a Data Set from MSP to a Spooled File on OS/400 .............. Example 4.190: Copying a Member of a PDS from MSP to a Spooled File on OS/400............................................................................................. Copying Between MSP and Tandem Nodes ......................................................................... Example 4.191: Submitting a Process from a CONNECT:Direct for Tandem Node that Copies a File from MSP to Tandem .................................... Example 4.192: Copying to an Entry-Sequenced File (MSP to Tandem)...................... Example 4.193: Creating an Unstructured Code Type 101 File (MSP to Tandem)....... Example 4.194: Creating an Unstructured Code Type 0 File (MSP to Tandem)........... Example 4.195: Copying an Unstructured Code Type 0 File from Tandem to MSP..... Example 4.196: Copying a Sequential File from an MSP Node to a Tandem Node ..... Example 4.197: Copying a File Submitted from MSP to Tandem................................. Example 4.198: Copying a File from Tandem on an EXPAND Network to MSP ........

4-83 4-83 4-84 4-85 4-86 4-86 4-87 4-87 4-87 4-88 4-88 4-89 4-89 4-89 4-89 4-89 4-90 4-90 4-90 4-91 4-91 4-91 4-92 4-92 4-93 4-93 4-93 4-93 4-94 4-95 4-95 4-96 4-96 4-96 4-97 4-97 4-97 4-98 4-98 4-98

Contents

xi

Example 4.199: Copying a File from Tandem to MSP After Running DMRTDYN on MSP ........................................................................... Example 4.200: Using FUP in a Process Submitted on MSP to Delete a File on Tandem ........................................................................................... Example 4.201: Using CONNECT:Direct to Allocate a Partitioned File on a Single System (MSP to Tandem)........................................................ Example 4.202: SYSOPTS Syntax Conventions (MSP to Tandem) ............................. Example 4.203: Copying a File from a Tandem Spooler to an MSP Node ................... Example 4.204: Copying Between an MSP Node and a Remote Tandem Spooler on an EXPAND Network..................................................................... Example 4.205: Copying Files Between the Tandem Spooler System and an MSP Node Using Job Number............................................................. Example 4.206: Copying a Disk File from Tandem to a Tape Device at MSP ............. Example 4.207: Copying a Tape File from MSP to a Disk File on Tandem ................. Example 4.208: Copying a File from MSP to Tandem Using the FASTLOAD Option............................................................................. Example 4.209: Allocating a VSAM Data Set and Copying a File from Tandem to MSP .................................................................................................

4-99 4-99 4-99 4-100 4-100 4-101 4-101 4-102 4-102 4-102 4-103

Copying Between MSP and Stratus VOS Nodes.................................................................. 4-103 Example 4.210: Copying a File from Stratus VOS to MSP........................................... 4-103 Example 4.211: Copying Files Between Stratus VOS and MSP ................................... 4-104 Copying Between MSP and VM Nodes ............................................................................... 4-104 Example 4.212: Copying a File from MSP to VM ........................................................ Example 4.213: Copying an MSP PDS to a Set of Files on VM ................................... Example 4.214: Copying an MSP File to Tape on VM ................................................. Example 4.215: Copying an MSP File to Spool on VM................................................ Example 4.216: Copying PDS Members from MSP to OpenVMS ............................... Example 4.217: Using the SYSOPTS Parameter (MSP to OpenVMS)......................... Example 4.218: Copying a File from Disk to Tape ....................................................... Example 4.219: Copying a File from Tape to Disk ....................................................... Example 4.220: Copying from MSP to OpenVMS and Specifying a User-Defined Translation Table ................................................................................. Example 4.221: Copying a Single Entry from the OpenVMS Text Library to an MSP Member ....................................................................................... Example 4.222: Copying All Entries from an OpenVMS Text Library to MSP ........... Example 4.223: Copying a Data Set from an MSP Node to an Executable File on an OpenVMS Node.............................................................................. Example 4.224: Copying an Executable File from an OpenVMS Node to an MSP Node............................................................................................ 4-104 4-105 4-105 4-105 4-106 4-106 4-106 4-107 4-107 4-107 4-107 4-108 4-108

Copying Between MSP and OpenVMS Nodes..................................................................... 4-106

Copying Between MSP and VSE Nodes .............................................................................. 4-109 Example 4.225: Copying a File from MSP to VSE (DYNAM/T Tape Files) ............... 4-109 Example 4.226: Copying an MSP PDS Member to a New VSE File in a DYNAM Pool ...................................................................................... 4-110 Copying Between NetWare and OS/390 Nodes ................................................................... 4-110 Example 4.227: Copying a File from NetWare to OS/390 ............................................ 4-110 Copying Between NetWare and UNIX Nodes ..................................................................... 4-111 Example 4.228: Copying a File from NetWare to UNIX .............................................. 4-111 Copying Between NetWare and OS/400 Nodes ................................................................... 4-111 Example 4.229: Copying a File from NetWare to OS/400 ............................................ 4-111 Example 4.230: Copying an OS/400 Text File to a NetWare Node .............................. 4-112 Copying Between Windows 95/NT and OS/390 Nodes ....................................................... 4-112 Example 4.231: Copying a File from Windows 95/NT to OS/390 ................................ 4-112

....................................................................................5: Example 6................3: Example 6..........6: Example 6.......................... Running a Job on the OS/390 Node from a Process Submitted on the Tandem Node . Creating and Saving an Online Save File Through CONNECT:Direct for OS/400 ..............4: Example 6......................8: Example 6................................. 4-113 Example 4...............................................................10: Example 6.................... Using Concatenation Characters (OS/390 to Tandem) ............................ Running a Job on OS/390 from a Process Submitted on Stratus VOS............ Notifying the OS/400 User of Successful Process Completion ............................................................. Running a Job on OS/390 from a Process Submitted on UNIX ......................11: Example 6.......................................................................................................................................................................................... Running a Job on OS/390 from a Process Submitted on NetWare ...............12: Example 5............................1: Example 5. Submitting a RUN JOB on OS/2 Warp... Restoring Libraries Through CONNECT:Direct for OS/400 ...........................................15: Example 5......... Executing Commands on Stratus VOS from a Process Submitted from OS/390 ...................................................................................................1: Example 6.............................................18: Example 5....... Executing Commands on UNIX from a Process Submitted from OS/390 ........................... Printing and Deleting the Log File (CONNECT:Direct for OpenVMS)..........9: Example 6.............................................................5: Example 5.......................13: Example 5.11: Example 5........ RUN TASK Using Control-M .....................................2: Example 5................................................................................................................ Executing Commands on UNIX from a Process Submitted from Tandem .......................................................................................................... Running a Job on OS/390 from a Process Submitted on OpenVME .......................... Copying a Member of an Object from OS/400 to a PDS Member and then Deleting the Library...................8: Example 5..... Running a Job on Stratus VOS from a Process Submitted from Another Stratus VOS node..........10: Example 5...19: Submitting a Job to the OS/390 Internal Reader............17: Example 5...2: Example 6............ Initiating a RUN TASK Statement at the Tandem Node (OS/390 to Tandem) ........... Submitting a Process with a RUN TASK on OpenVMS from an OS/390 Node .......13: RUN TASK Examples for CA-7 (OS/390 to OS/390) ......................4: Example 5.6: Example 5.............................................................7: Example 5...................... RUN TASK Using DMRTDYN ............xii CONNECT:Direct Process Guide Concepts and Examples Copying Between Windows 95/NT and Tandem................................................232: Copying a File from Windows 95/NT to Tandem ................................... Running a Job on the OS/400 Node from a Process Submitted on the OS/390 Node ................. Printing and Keeping the Log File (CONNECT:Direct for OpenVMS).............................................................................. Using Symbolics with a RUN TASK Statement (OS/390 to Tandem) ......3: Example 5....... Using Bracketing Backslashes and Quotation Marks (OS/390 to Tandem) ......................... 4-113 Chapter 5 RUN JOB Statement Examples Example 5.....16: Example 5.. 6-1 6-2 6-2 6-3 6-3 6-4 6-4 6-4 6-5 6-5 6-6 6-6 6-7 ..............14: Example 5. Running a Job on UNIX from a Process Submitted from Another UNIX Node .......................................................................................................................................................12: Example 6............................. Running a Job on Windows 95/NT from a Process Submitted on UNIX......................................................9: Example 5........................ Running FUP (CONNECT:Direct for Tandem) ... Keeping the Log File (CONNECT:Direct for OpenVMS) ........................................7: Example 6........................ Submitting a Process with a RUN JOB on OpenVMS .................................................................... 5-1 5-2 5-2 5-2 5-2 5-2 5-3 5-3 5-3 5-4 5-4 5-4 5-4 5-5 5-5 5-5 5-5 5-6 5-6 Chapter 6 RUN TASK Statement Examples Example 6............ RUN JOB Facility (VM to VM) ...................

........................................................................................30: Submitting a Process from OS/390 to Execute Stratus VOS Commands .........................................31: Submitting a Process from Stratus VOS to Run a Program on OS/390 .........................................5: Example 7.............19: Executing DMRTDYN in a RUN TASK Environment (VM) ....................18: Submitting a Process with a CONNECT:Direct for Tandem RUN TASK from a OpenVMS Node ................................32: Submitting a Process with a Run Task on Stratus VOS from Another Stratus VOS Node....................... Submitting a Windows 95/NT Process from a UNIX Node.............................. Example 6. Example 6..... Example 6.......................26: Submitting a Process from UNIX to Run a Program on OS/390 ..........................9: Using submit with the startt Parameter (Stratus VOS to Stratus VOS) ........................ Example 6...........................8: Using SUBMIT with Symbolic Substitution (OS/390 to OS/390)................................................ Using SUBMIT at the CONNECT:Direct for Tandem Node... 7-1 7-2 7-3 7-3 7-4 7-4 7-4 7-4 7-5 7-5 ........................................................22: Submitting a Process with a RUN TASK on OpenVMS from an OpenVMS Node................................... Example 6......... Example 6........................20: Resolving Symbolics Within DMRTDYN in a RUN TASK Environment (VM)............................10: Using SUBMIT at the CONNECT:Direct for OS/2 Warp Node.. Example 6..........37: Submitting a Process from CONNECT:Direct Requester for Windows to Run DMRTSUB on OS/390..................................15: Selecting Statistics for the Current Day (CONNECT:Direct for Tandem) ..........................................................16: Submitting a Process with a CONNECT:Direct for OpenVMS RUN TASK from a Tandem Node ........ Example 6................................................ Using SUBMIT with the DSN Parameter (OS/390 to OS/390) .. Submitting an OS/390 Process from a NetWare Node........................ Example 7..............6: Example 7............ Using submit with the hold Parameter (UNIX to UNIX) ......1: Example 7........................... Example 6................................................29: Submitting a Process from UNIX to Run a Program on Windows 95/NT............................................. Using submit with the hold Parameter (Stratus VOS to Stratus VOS) ..................34: Submitting a Process from OpenVME to Run a Program on Windows 95/NT........ Example 6.. Example 6............... Example 6........................................................................................................24: Submitting a Process from OS/390 to Execute UNIX Commands... Example 6...............4: Example 7..................................................................... Example 6........25: Submitting a Process from OS/390 to Execute Windows 95/NT Programs ........... Example 6................................................................................ Example 6.........35: Notifying the OS/400 User of the Start of a Process .................................................... Example 6........................ Example 6........ Example 6................................................... Using submit with the startt Parameter (UNIX to UNIX) ............................................. Example 7...........28: Submitting a Process from UNIX to Run a Program on OS/400 ................. Example 6.................23: Defining a VSE VSAM File and Copying a Sequential File from OS/390..............................21: Submitting a Process with a RUN TASK on OS/400 from a VM Node ..................... Example 6...33: Submitting a Process with a Run Task on an OpenVME Node to Run a Program on Another OpenVME Node ........7: Example 7.. Example 6........................ 6-7 6-8 6-8 6-9 6-10 6-10 6-10 6-11 6-11 6-12 6-12 6-12 6-13 6-13 6-13 6-13 6-14 6-14 6-14 6-14 6-15 6-15 6-15 6-16 Chapter 7 SUBMIT Statement Examples Example 7..27: Submitting a Process with a Run Task on UNIX from Another UNIX Node.......36: Submitting a RUN TASK on OS/2 Warp ...3: Example 7..................................14: Running RESTORE (CONNECT:Direct for Tandem)...2: Example 7.................................................. Example 6...Contents xiii Example 6....17: Submitting a Process with a CONNECT:Direct for OS/390 RUN TASK from a Tandem Node .....................

.....2: Example 9. Using Symbolics in a COPY Statement (CONNECT:Direct for Tandem)............................................................................................. Using Conditional Logic (CONNECT:Direct for OS/400 to CONNECT:Direct for OS/390)... Using SYMBOL Statements for Input and Output Data Sets (OS/390 and OS/400) ................................................6: Example 8.............4: Example 8...................... Using Conditional Logic (OS/390 to VSE)................................................................................ 9-1 9-2 9-3 9-4 Index ...1: Example 9....... Using Conditional Logic Where the PNODE is a CONNECT:Direct for Tandem Node ..............................3: Example 9...............xiv CONNECT:Direct Process Guide Concepts and Examples Chapter 8 SYMBOL Statement Examples Example 8......................................2: Example 8..........4: Using Conditional Statements....................... Using Symbolics Within DMRTSUB to Substitute a Windows 95/NT Pathname into OS/390 JCL ..................................... Using Symbolics in a COPY Statement (Tandem to UNIX) .........................5: Example 8.7: Using the SYMBOL Statement to Construct a Symbolic Value for Data Set Names (OS/390)...........................3: Example 8. 8-1 8-2 8-3 8-4 8-5 8-5 8-6 Chapter 9 Conditional Statements Examples Example 9............ Passing Parameters to a DCL Command Procedure from a RUN JOB Statement (CONNECT:Direct for OpenVMS)...............................1: Example 8............. Using Symbolics in a COPY statement (OS/390 to UNIX)....

provides an overview of the CONNECT:Direct product. CONNECT:Direct Process Guide for Midrange Products. CONNECT:Direct for UNIX . CONNECT:Direct for OpenVMS Part IV. and includes numerous examples. consists of Process statements for the following operating environments: w w w w Part I. w w Part I. CONNECT:Direct Process Guide Concepts and Examples. and workstation products. describes the structure and syntax rules for the Process language. and CONNECT:Direct Processes that illustrate the full functionality of CONNECT:Direct. Subsequent volumes are dedicated to CONNECT:Direct mainframe. Organization of the Documentation Set The organization of the CONNECT:Direct Process Guide documentation set follows: v Volume 1. CONNECT:Direct for MSP v Volume 3. CONNECT:Direct Process Guide Concepts and Examples. CONNECT:Direct for OS/390 Part II.Preface The CONNECT:Direct Process Guide is a multivolume documentation set that provides the information you need to write Processes for CONNECT:Direct. Example Processes v Volume 2. introduces you to the Process language and includes examples of syntax. CONNECT:Direct Process Guide for Mainframe Products. CONNECT:Direct for VM/ESA Part IV. statements. This volume. consists of Process statements for the following operating environments: w w w w w Part I. CONNECT:Direct for OS/400 Part III. CONNECT:Direct for VSE/ESA Part V. CONNECT:Direct for Tandem NonStop Kernel Part II. midrange. CONNECT:Direct for MVS Part III. Concepts Part II.

NetWare. CONNECT:Direct for OS/2 Warp Part III. and Windows 95/NT: This convention does not apply. Therefore. For example. Refer to Italic Letters for the notational convention used for variable substitution for these products. . CONNECT:Direct for Stratus VOS Part VI. network. and Windows 95/NT: This convention does not apply. PNODE=primary-node-name indicates that you must provide the name of the primary node. OpenVME. OpenVME. NetWare. Stratus VOS. and environment. Stratus VOS. For additional information about CONNECT:Direct. v Volume 4.2 or TCP/IP sessions to remote CONNECT:Direct nodes. This section describes the conventions used the documentation set. no examples of Processes initiated from CONNECT:Direct for OS/400 are included in this document. For example. OpenVME.xvi CONNECT:Direct Process Guide Concepts and Examples w w Part V. Uppercase Letters Uppercase letters in the statement format indicate that you type in information as shown. including its applications. For CONNECT:Direct for UNIX. CONNECT:Direct for OpenVME Note: CONNECT:Direct for OS/400 uses CL commands instead of the CONNECT:Direct Process language to initiate processes using LU6. CONNECT:Direct for OS/2 Part II. Notational Conventions The CONNECT:Direct Process Guide documentation set uses certain notational conventions. Uppercase and Lowercase Letters A statement in uppercase letters followed by lowercase letters indicates an alternative to typing the entire statement. refer to the appropriate library of manuals. CONNECT:Direct for Windows 95/NT The CONNECT:Direct Process Guide documentation set assumes knowledge of the operating systems for CONNECT:Direct products. For CONNECT:Direct for UNIX. CONNECT:Direct Process Guide for Workstation Products. For CONNECT:Direct for UNIX. PROCess means that you need only type PROC for the statement to be valid. consists of Process statements for the following operating environments: w w w w Part I. refer to the library of CONNECT:Direct documentation. If you are not familiar with a specific operating system. Lowercase Letters Lowercase letters or words in statements or syntax boxes require substitution by the user. For CONNECT:Direct for NetWare and Windows 95/NT: This convention does not apply. CONNECT:Direct for NetWare Part IV. and Stratus VOS: Values must be in the proper case for the node on which they will be processed.

a date or a day plus a time. STARTT=([date|day][. indicates that you can specify multiple symbolic parameters. Italic Letters Italics indicate book. Horizontal Ellipsis Horizontal ellipsis indicates that the preceding item may be repeated. Brackets Brackets indicate optional information within an optional parameter. DSN=filename indicates that the parameter DSN is required. RETAIN=Yes|No|Initial specifies that the default for RETAIN is NO.hh:mm:ssXM]) indicates that you can specify either a date or a day. commands. Because brackets are not available on most keyboards on IBM systems. or just a time. part. For example. and Windows 95/NT: Italic letters also act as placeholders for information you must provide. . For example. Process. For example HOLD=Yes|No|Call specifies that Yes or No or Call is valid. For CONNECT:Direct for UNIX. Stratus VOS. Processes. and section titles or show emphasis in the text. &symbolic_name_2=variable-string-2. refers to a CONNECT:Direct Process. NetWare. For example. and reports. as shown with a capital P. Additional Notations Code all commas and parentheses as they appear. OpenVME. For example. statements. Vertical Bars Vertical bars indicate that you can supply one of a series of values separated by the vertical bars. dsn=filename indicates that you would type the actual name for a file instead of the word shown in italic type. . parameters are shown in boldface characters to differentiate them from surrounding text. For CONNECT:Direct for OpenVMS: OpenVMS uses brackets in its directory naming convention. and Windows 95/NT: In text. NetWare. Stratus VOS. the vertical series of ellipses is used in examples. and parameters. Vertical Ellipsis Vertical ellipsis indicates that not all of the data is displayed. chapter. OpenVME. For example. For CONNECT:Direct for UNIX. use less than and greater than signs (< >) in a CONNECT:Direct Process that is submitted from the IBM node.Preface xvii Bold Letters Bold print in syntax boxes indicates required labels. Typically. Underlined Letters Underlining indicates default values for parameters and subparameters. . Monospaced characters (characters of equal width) represent information for screens.

These messages range from mild to severe and alert you to unusual circumstances. Note: This message provides information about situations that have no drastic effects. . Caution: This message calls your attention to an operation that may have undesirable results.xviii CONNECT:Direct Process Guide Concepts and Examples Note and Caution Messages Important information you should not overlook is highlighted in this guide in the form of note and caution messages. You need to decide whether to continue.

Part I Concepts .

CONNECT:Direct Process Guide Concepts and Examples .

COPY statement initiates a data transfer. and commands v Handling error situations through conditional logic v Starting another Process Structure and syntax of CONNECT:Direct Process statements are discussed in Chapter 2. . CONNECT:Direct Process statements are defined as follows: PROCESS statement defines general Process characteristics. Parameters are specified to further qualify Process instructions. RUN TASK statement executes a program or command within the CONNECT:Direct environment synchronous to the remaining steps in a Process. The CONNECT:Direct Process language consists of statements and parameters that provide instructions for initiating such activities as: v Copying files between systems v Running jobs. For command usage and syntax. monitor. The work can execute on either the local or remote node. refer to the CONNECT:Direct user’s guide for your operating environment. Process Statement Structure and Syntax. The program or command can execute on either the local or remote node. including identification of the remote node.Chapter 1 About CONNECT:Direct Processes A CONNECT:Direct Process is a collective unit of work. An integral part of CONNECT:Direct are commands that allow users to submit. Description of Process Statements A CONNECT:Direct Process consists of a Process definition statement (PROCESS statement) and one or more additional CONNECT:Direct statements that may be coded in any sequence. and control the execution of CONNECT:Direct Processes. Steps in each work unit are defined using a scripting language unique to the CONNECT:Direct product. RUN JOB statement submits work to the host operating system that executes asynchronous to the remaining steps in a Process. programs. and is always the first statement in a Process. User programs can be run in different environments. COPY parameters include source and destination file names and attributes.

depending upon the user interface(s) available on your operating environment. and EXIT conditional logic statements. There are no parameters associated with the pend statement. interactive (online). and Conditional statements for the operating environment from which you are initiating the Process. MVS. ELSE. refer to the structure of the SUBMIT statement for CONNECT:Direct for UNIX. EIF. For example. Conditional statements controls Process step execution by allowing conditional tests of Process step return codes using IF THEN. . To accommodate a larger Process. if you are writing a CONNECT:Direct Process to copy a file from UNIX to OS/390 and the Process is submitted from the UNIX node. VM/ESA. For example. and Windows 95/NT) marks the end of a Process. refer to the COPY FROM information for CONNECT:Direct for UNIX and the COPY TO information for CONNECT:Direct for OS/390. refer to the RUN JOB format for CONNECT:Direct for OS/390. if you are submitting a Process on OpenVMS that will submit a batch job on OS/390. Stratus VOS. Use the SUBMIT statement format for the platform on which the Process will execute. For CONNECT:Direct for OS/390. Use the RUN JOB and RUN TASK formats for the platform on which the job will execute. use the PROCESS. The Process can execute on either the local or remote node. SYMBOL statement allows symbolic substitution of Process parameter values. or MSP: The maximum storage area allowed for a Process statement is 64K. Use the COPY FROM and COPY TO formats for the appropriate FROM and TO platforms. Refer to the Example Processes part in this volume for examples of activities that can be performed in various operating environments. and user-written programs through the CONNECT:Direct Application Program Interface (API). operator background (batch) utilities. pend statement (valid only for CONNECT:Direct for UNIX. refer to the structure of the PROCESS statement for CONNECT:Direct for UNIX. VSE/ESA. SYMBOL. GOTO. For example. Note: All OS/390 examples are also valid for MVS except where specified. Writing CONNECT:Direct Processes When writing a Process. split the Process in half and include a SUBMIT statement in the first Process to run the second Process. OpenVME. If you are writing a Process on OS/390 that submits another Process on UNIX.1-2 CONNECT:Direct Process Guide Concepts and Examples SUBMIT statement allows one Process to be submitted from within another executing Process. These CONNECT:Direct user interfaces include command line. if you are writing a Process to copy a file from UNIX to OS/390. Summary of CONNECT:Direct Process Submission A Process can be constructed and submitted for execution in several ways.

DELETE. CHANGE. a copy of the Process will remain in the hold queue after successful execution. The Process statements have been checked for syntax. If a Process is submitted with a RETAIN parameter. The CONNECT:Direct work queues are jointly referred to as the Transmission Control Queue (TCQ) or the process queue. the following tasks are performed: Step 1-User Submits a Process The user creates and submits a new Process or submits a predefined Process from a CONNECT:Direct Process library. . and SUSPEND PROCESS.Chapter 1 / About CONNECT:Direct Processes 1-3 When a Process is submitted. v 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. class. date. FLUSH. A message indicating that the Process completed successfully is returned when the Process is placed in the TCQ. v HOLD indicates that the Process was submitted with a Process HOLD or RETAIN parameter. A Process is found in one of the following states in the TCQ: v EXECUTION indicates that the Process is executing. Processes will retry automatically. v TIMER indicates that the Process was submitted with a Process STARTT parameter that designates the time. refer to the CONNECT:Direct user’s guide for your platform. such as priority. but the Process may not have been selected for execution. The HOLD queue state also applies to Processes that stop executing when an error (HOLDERROR) occurs. Processes may also be waiting for their turn to execute on an existing session. Process execution is held on the queue until released by an operator or the SNODE connects with a request for held work. or both that the Process should begin execution. For complete information on the CONNECT:Direct commands and the various queues. Step 4-CONNECT:Direct Finds an Available Connection and Process Execution Begins The Process is selected for execution based on Process parameters and the availability of the remote node. it is placed in an appropriate work queue according to Process parameters. Step 2-Parsing for Correct Syntax The parser checks the syntax of the Process. and start time. Step 3-Process Queued for Execution and Submit Message Issued If the Process passes syntax checking. A queued Process can be queried and manipulated through CONNECT:Direct commands such as SELECT. 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.

1-4 CONNECT:Direct Process Guide Concepts and Examples .

Parameters or Subparameters Parameters or subparameters specify further instructions for the statement and must be set apart by one or more blanks or commas. The label consists of a 1-8 character alphanumeric string. Parameters can be either keyword or positional. with the first character alphabetic only.Chapter 2 Process Statement Structure and Syntax This chapter describes the components of a CONNECT:Direct Process and the syntax used in the Process language. The PROCESS statement is the only statement that requires a label. A statement identifier beginning in column one is considered a label by CONNECT:Direct. An example Process is included. A label is any character or character string beginning in column one. . Label CONNECT:Direct statements are identified by user-defined labels. Components of a Process A CONNECT:Direct statement consists of the following components: v Label v Statement Identifier v Parameters or Subparameters A discussion of each element follows. Statement Identifier The statement identifier specifies the function requested. Statements must begin after column one. Keyword Parameters Keyword parameters are usually followed by an equal sign and may have a set of subparameters. Statement identifiers are separated from parameters by one or more blanks or commas.

(not sign) (slash) (backslash) (comma) (period) ’ " [ ] {} * (single quotation mark) (double quotation mark) (brackets) (braces) (asterisk) Note: The EBCDIC Hex value for the slash ( /) is X’EO. The hyphen must be separated from the preceding characters by at least one blank.newpswd) Continuation Marks Use the hyphen as a continuation mark to indicate the statement continues on multiple lines. Positional parameters must be enclosed in parentheses. Special Characters Those symbols defined to be special characters in the CONNECT:Direct product are hyphens (-). These parameters are always on the right of the equal sign. The list may contain both positional and keyword parameters. CONNECT:Direct Syntax This section describes the syntax used in constructing CONNECT:Direct Process statements. with commas replacing any parameter omitted. The EBCDIC Hex value for the vertical bar (|) is X’4F. Note: All OS/390 examples are also valid for MVS except where specified. Commas Commas have two functions. For CONNECT:Direct for UNIX. ampersands (&). For CONNECT:Direct for Tandem: Both hyphen (-) and ampersand (&) are supported as continuation characters. and Stratus VOS: Continuation characters are not required.2-2 CONNECT:Direct Process Guide Concepts and Examples Positional Parameters Positional parameters must be entered in a specific order. SIGNON USERID=(id. two vertical bars (||). which are to: v Separate items within a list. A comma must be used to indicate omission of a positional parameter. . v Control the order of values specified as positional parameters. with the parentheses optionally preceded and followed by blanks or commas. OpenVME. with the parentheses optionally preceded and followed by blanks or commas. and the following CONNECT:Direct delimiters or operators: < > ( ) = (blank) (less-than sign) (greater-than sign) (parentheses) (equal sign) ¬ / \ . . Positional subparameters must be enclosed in parentheses. Subparameters A positional parameter or the variable information in a keyword parameter is sometimes a list of subparameters..

Asterisks Asterisks are used to indicate generic specifications of parameters. that one. * enable the CONNECT:Direct for UNIX node. followed by the comment.SOURCE. /* This type of comment can be written on one line*/ /* It can also continue across multiple lines. Lists in the FROM clause are nested in subsequent pairs of parentheses. The following example illustrates all of the ways you can use comments. Comments are allowed in the following formats: v An asterisk (*) in column one. you request information by specifying a single asterisk (*) or a character string plus an asterisk. Note: This format can be used after a continuation mark as well as at the beginning of a line./* SYMBOLIC DATA SET */ . followed by the comment. Remember the terminating asterisk-slash cannot begin in column */ COPY FROM ( DSN=&DSN1 UNIT=SYSDA) * After submitting this Process. For example. For example. continuing over multiple lines.SOURCE SELECT=(ACCT*)) For Processes for CONNECT:Direct for 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. 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. With generics. Note: The terminating */ cannot begin in column one. COPY FROM (DSN=PDS. and terminated by an asterisk-slash (*/). v Preceded by a slash-asterisk (/*) and followed by an asterisk-slash (*/). /* INPUT */ . the FROM clause of the COPY statement is enclosed in one set of parentheses. Note: The only permitted form of commenting for statements that will be processed by DMBATCH is an asterisk (*) in column one.Chapter 2 / Process Statement Structure and Syntax 2-3 Parentheses Parentheses enclose lists and associate a group of values. Comments Comments allow you to include additional information within a CONNECT:Direct Process. v Preceded by a slash-asterisk (/*).

ampersands are used to indicate continuation of the PROCESS statement. For example: DSN=CD || NODE Resolves to: DSN=CDNODE Concatenation for CONNECT:Direct for Tandem The CONNECT:Direct for Tandem supports two concatenation operators . When used for concatenation. PROC1 PROCESS SNODE=CD.PASWRD) PROCESS Example of Vertical Bar Concatenation in CONNECT:Direct for Tandem The following example shows two vertical bars (||) used as a concatenation character.2-4 CONNECT:Direct Process Guide Concepts and Examples Concatenation for the CONNECT:Direct for OS/390.OS390. PROC1 SNODE=CD. Typically.PASWRD) & & . concatenation is not necessary for any other parameters. VM/ESA. and OS/400 Products Concatenation joins character strings to form a single string. In both examples. The following example PROCESS statements illustrate the differences between the two types of concatenation for the SACCT parameter. The entire string must be enclosed in single quotation marks. MVS. Do not use blanks before or after the two vertical bars (||) so blanks are not added to the string.NODE SACCT=‘12345678901234567890’||& ‘1234567890123456789’ SNODEID=(USERID.NODE & SACCT=‘1234567890123456789012345678901234567890123456789& 012345678901234567890’ & SNODEID=(USERID. PACCT is used only for documentation for CONNECT:Direct for Tandem.vertical bars (||) or the ampersand (&) for the PACCT and SACCT parameters.OS390. Each line of the SACCT string must begin and end with single quotation marks. VSE/ESA. Example of Ampersand Concatenation in CONNECT:Direct for Tandem The following example shows an ampersand (&) used as a concatenation character. MSP. The operator blank-vertical bar-vertical bar-blank ( || ) indicates concatenation. the ampersand (&) must be in column 80 and the remainder of the string must begin in column one of the next line to ensure that blanks are not added to the string.

MSP. The exception is that comment identifiers (asterisks [*] and pound [#] signs) in column one are positional. for details. For this to occur. grammar is based on the sequence of parameters and arguments instead of position within the inline buffer. . and OpenVMS: Bracketing backslashes are not valid. For example: CONCAT PROCESS SNODE=CD. MVS.NODE SYMBOL &TO="$DISK1:" - "<DIRECTORY>TEST. Those symbols defined as bracketing characters are backslashes (\\). For Processes submitted from CONNECT:Direct for Tandem.VMS. UNIX. Special Purpose Bracketing Special characters must often be maintained as part of a string. and double quotation marks (“ ”). The second and subsequent records must begin in column one. OpenVME. For CONNECT:Direct for Tandem and OpenVMS: Refer to the following section. the string must be enclosed within bracketing characters. CONNECT:Direct for OpenVME. Note: Concatenation is also used in conjunction with Special Purpose Bracketing and in Symbolic Substitution to join values that are represented as symbolic parameters. Stratus VOS. 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. Single and Double Quotation Marks. &USERID=BOB DSN=CD || &USERID Resolves to: DSN=CDBOB Note: Resolution of the symbolic occurs before concatenation. Also. Please see the Special Purpose Bracketing and Symbolic Substitution sections beginning on page page 5 for more information.DAT" STEP01 COPY FROM (DSN=IBMFILE SNODE) TO (DSN=&TO PNODE DISP=NEW) Concatenation for CONNECT:Direct for UNIX.Chapter 2 / Process Statement Structure and Syntax 2-5 Concatenation for CONNECT:Direct for OpenVMS Either double quotation marks (“ ”) or single quotation marks (‘ ’) can be used in conjunction with the continuation character to allow a string spanning multiple records to be concatenated without extraneous blanks. and CONNECT:Direct for Stratus VOS Use stream input instead of concatenation or continuation symbols as required by other CONNECT:Direct operating environments. and VSE/ESA: Use backslashes for bracketing. VM/ESA. single quotation marks (‘ ’). For CONNECT:Direct for OS/390.

EXE"\) For CONNECT:Direct for OS/400 and OpenVMS: Syntax conventions require the entire SYSOPTS string to be enclosed in double quotation marks (“ ”). OpenVME. If a string containing special characters continues across multiple lines. For CONNECT:Direct for UNIX. v Ensure that quotation marks in the string are maintained. . For example: PACCT= \‘DEPT\\MIS\ \602’\ || - Resolves to: PACCT=‘DEPT\MIS602’ Single and Double Quotation Marks Single and double quotation marks are used to allow special characters or blanks to be embedded within a parameter or subparameter value. For CONNECT:Direct for OS/390 and MVS: The DMRTSUB utility requires parameters to be enclosed in double quotation marks (“ ”). For example. v Double-quoted strings allow the resolution of &values in a quoted string. Any other exceptions are noted in the text. the following SYSOPTS parameter for CONNECT:Direct for 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)” If the bracketing character being used to enclose the string is also part of the character string. each line containing a special character must be enclosed in backslashes and must be concatenated.2-6 CONNECT:Direct Process Guide Concepts and Examples Bracketing backslashes should be used to: v Continue a string containing special characters across multiple lines. you must place an additional bracketing character where the single bracketing character is needed. Both backslashes must be in the same line. The rules for using single and double quotation marks are as follows: v Single-quoted strings allow the parsing of parameters as entered. For example: COPY TO (DSN=‘VMFILE FILETYPE’) COPY TO (DSN=\"C:\\PCDIR\\BAT. and Stratus VOS: The software supports the use of double quotation marks.

For example: &USERID=BOB DSN=CD || &USERID Resolves to: DSN=CDBOB Note: Resolution of the symbolic occurs before concatenation.W. When CONNECT:Direct encounters an ampersand (&) plus 1-8 alphanumeric characters. The following Process shows an example of enclosing a string in double quotation marks to allow resolution of the symbolic &FILTYP. .191) DISP=(RPL)) - Note: Double quotation marks are not valid for symbolic substitution in Windows NT.WIVVB.Chapter 2 / Process Statement Structure and Syntax 2-7 Symbolic Substitution Symbolic substitution is used to substitute information in a Process. Termination A statement is terminated by the end of data without a continuation mark. PROC2 PROCESS COPY FROM TO SNODE=CD. CONNECT:Direct will substitute a string represented by the ampersand and alphanumeric characters.DATA DISP=SHR) (DSN="FN || &FILTYP" LINK=(IVVB.VM &FILTYP=FT (DSN=OS390. The SYMBOL statement and concatenation must be used.

the return code [RC] is less than 8). /* COPY01 PROCESS -copies PDS members beginning with INV* to the Chicago node if successful.bat)\ || \ARGS (PO_num)"\ FROM (DSN=MUNGE. PNODE is used for documentation only. sends NOTIFY to inform about STEP01 failure Modification History: 04. the ELSE path is taken and STEP04 executes.ME) IF STEP02 RUN JOB (STEP01 < 8) THEN (DSN="xxNT") SNODE SYSOPTS=\"PGM(fix.CHICAGO COPY FROM (DSN=MASTER. STEP01 is a COPY statement that copies a file on the PNODE to a file on the SNODE. The DMNOTIFY program executes within the CONNECT:Direct environment.ME SNODE) TO (DSN=MODIFIED || %SUBDATE) CSG Initial Implementation - /* send PDS member INVxxxx /* to Chicago and place in /* file “MUNGE.CHICAGO. PARM=(’FAIL’. FILEA || %SUBDATE)) PNODE A description of the Process follows: COPY01 is a PROCESS statement that identifies the secondary node (SNODE) as CD. The PNODE may also be referred to as the local node. The SNODE can also be referred to as the participating. If STEP01 completes successfully (that is. runs USERJOB on the Chicago node to modify data copies modified FILEA back from Chicago if not successful. If STEP01 fails. STEP04 is a RUN TASK statement.ME” (only 1 /* member matches criteria) /* if copy successful */ */ */ */ */ /* run “data modify” job */ STEP03 COPY /* and bring file back */ ELSE STEP04 RUN TASK EIF /* or if step 1 failed */ (PGM=DMNOTIFY. target.Jul. STEP02 and STEP03 use Conditional statements. The PNODE is the CONNECT:Direct node on which the Process is submitted. .1998 */ COPY01 STEP01 PROCESS SNODE=CD. the THEN path is taken and STEP02 and STEP03 execute. or remote node. See the Example Processes part in this volume for examples of activities that can be performed in various operating environments.PDS SELECT=INV*) TO (DSN=MUNGE.2-8 CONNECT:Direct Process Guide Concepts and Examples Example The following example Process uses CONNECT:Direct for OS/390 Process statements to illustrate product functionality. The SNODE is the CONNECT:Direct node that interacts with the primary node (PNODE) during Process execution. A remote node must be specified in every Process.

Part II Example Processes .

CONNECT:Direct Process Guide Concepts and Examples .

In addition. The parameter RETAIN=INITIAL causes the Process to remain in the queue (TCQ) after execution and run every time the CONNECT:Direct system is initialized. CD1 PROCESS SNODE=CD. Note: All OS/390 examples are also valid for MVS except where specified.NODE CLASS=4 PRTY=15 PACCT=’ACCOUNTING DATA FOR PNODE’ RETAIN=INITIAL SACCT=’INFORMATION FOR SNODE’ - .1: Basic PROCESS Statement This example illustrates the minimum requirements of a PROCESS statement. 15.Chapter 3 PROCESS Statement Examples This chapter contains examples of Process Statements. Example 3. PROCESS is the statement identifier and is required. this Process runs in CLASS 4 and is assigned the highest priority.NODE Example 3. The only required parameter is SNODE. CDACCT PROCESS SNODE=CD. which specifies the secondary node to be used in the CONNECT:Direct Process. Each Process statement example contains a different set of parameters.OS390. The label CD1 must begin in column one. accounting data is specified for both nodes (PACCT and SACCT).VM.2: Detailed PROCESS Statement Using the RETAIN Parameter According to parameters specified.

OpenVMS.5: Using a TCP/IP Dotted-Form Address for the SNODE Keyword This Process shows how to code the standard dotted-name form for the TCP/IP address when the real address is known to the user. The names specified must be identified to the TCP/IP network name resolution task.OS390.PWD) - Example 3.SCENTER NOTIFY=USER1 - . VSE/ESA.NODE SNODE=TCPNAME=111. Because of the NOTIFY parameter.3: Detailed PROCESS Statement Using the NOTIFY Parameter The priority for this Process is set to 8 and runs in CLASS 4. Note: For CONNECT:Direct for OS/390 and MVS nodes only: %PNODE is only valid for CONNECT:Direct for OS/390 and MVS nodes.6: Using TCPNAME to Identify the PNODE/SNODE Sites This Process shows how the user can identify the TCP/IP nodes by name when the real network addresses for the nodes are unknown. &DSN’) EIF - - Example 3.444 NOTIFY=USER1 - Example 3. PROC1 PROCESS PNODE=CD. For CONNECT:Direct for UNIX. and Tandem nodes: NOTIFY is ignored. PROC1 PROCESS SNODE=CD.OS390.FILE DISP=NEW) IF (STEP1 EQ 0) RUN TASK (PGM=USERPGM PARM=’&NODE.333.AS400 PRTY=8 NOTIFY=USER1 CLASS=4 SNODEID=(USER1.4: Using %PNODE This Process shows using a variable to substitute to %PNODE.3-2 CONNECT:Direct Process Guide Concepts and Examples Example 3. PROC1 STEP1 PROCESS &NODE=%PNODE COPY FROM (PNODE DSN=JSMITH.NODE SNODE=RESTON. USER1 will be notified upon Process completion.FILE DISP=SHR) TO (SNODE DSN=JSMITH.222. %PNODE is set to the node name from which the Process is submitted. PROC1 PROCESS PNODE=CD.

CONNECT:Direct for Stratus VOS. proc2 process snode=unix. CONNECT:Direct for Stratus VOS. the Process will execute today at 3:31 p.Chapter 3 / PROCESS Statement Examples 3-3 Example 3. The string must be enclosed in double quotation marks. and the string enclosed in parentheses.8: Specifying a Process Starting Day and Time (CONNECT:Direct for UNIX. oc2 step01 process copy from snode=unix. In this example.7: Specifying Accounting Data (CONNECT:Direct for UNIX. and CONNECT:Direct for OpenVME) This Process shows how to specify PNODE and SNODE accounting data in the PROCESS statement. and CONNECT:Direct for OpenVME) This Process shows how to specify the day and time for execution of a Process.node pacct="abc" sacct="123" ( file=file1 snode ) ( file=file2 pnode ) step01 copy from to pend Example 3. 03:31:00 pm) ( file=file1 snode ) ( file=file1 pnode ) to pend . The day and time must be separated by a comma.m.node startt=(today.

3-4 CONNECT:Direct Process Guide Concepts and Examples .

Chapter 4 COPY Statement Examples 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: v File Allocation (OS/390 to OS/390) v Copying PDS to PDS (OS/390 to OS/390) v Copying to Tape (OS/390 to OS/390) v Copying Files Using Exits (OS/390 to OS/390) v Copying Files Using SMS Parameters v Copying to OS/390 Nodes with Unique Member Name Allocation (AXUNIQ Exit) v Copying between OS/390 and OS/400 Nodes v Copying between OS/390 and Tandem Nodes v Copying between OS/390 and UNIX Nodes v Copying between OS/390 and Stratus VOS Nodes v Copying between OS/390 and OpenVME Nodes v Copying between OS/390 and VM Nodes v Copying between OS/390 and OpenVMS Nodes v Copying between OS/390 and VSE Nodes v Copying between OS/390 and Windows 95/NT Nodes v Copying between OS/390 and OS/2 Warp Nodes v Copying between Tandem Nodes v Copying between Tandem and OS/400 Nodes v Copying between Tandem and UNIX Nodes v Copying between Tandem and VM Nodes v Copying between Tandem and OpenVMS Nodes v Copying between Tandem and VSE Nodes v Copying between UNIX Nodes v Copying between UNIX and OS/400 Nodes . Note: All OS/390 examples are also valid for MVS except where specified.

4-2 CONNECT:Direct Process Guide Concepts and Examples v Copying between UNIX and NetWare Nodes v Copying between UNIX and Windows 95/NT Nodes v Copying between Stratus VOS Nodes v Copying between OpenVME Nodes v Copying between OpenVME and UNIX Nodes v Copying between OpenVME and Windows 95/NT Nodes v Copying between VM Nodes v Copying between VM and OpenVMS Nodes v Copying between VM and OS/2 Warp Nodes v Copying between VM and OS/400 Nodes v Copying between VM and VSE Nodes v Copying a VM VSAM file to an OS/390 Node v Copying a VM CMS file to an OS/390 Node v Copying between VM and UNIX Nodes v Copying between VM and Windows 95/NT Nodes v Copying between OpenVMS Nodes v Copying between OpenVMS and VSE Nodes v Copying between VSE Nodes v Copying between VSE and OS/2 Warp Nodes v Copying between VSE and OS/400 Nodes v Copying between VSE and OS/390 Nodes v Copying between VSE and UNIX Nodes v File Allocation (MSP to MSP) v Copying PDS to PDS (MSP to MSP) v Copying to Tape (MSP to MSP) v Copying Files Using Exits (MSP to MSP) v Copying between MSP and OS/400 Nodes v Copying between MSP and Tandem Nodes v Copying between MSP and Stratus VOS Nodes v Copying between MSP and VM Nodes v Copying between MSP and OpenVMS Nodes v Copying between MSP and VSE Nodes v Copying between NetWare and OS/390 Nodes v Copying between NetWare and UNIX Nodes v Copying between NetWare and OS/400 Nodes v Copying between Windows 95/NT and OS/390 Nodes .

LRECL=80..NODE &DATE=%SUBDATE &TIME=%SUBTIME - STEP01 COPY FROM ( DSN=ACCTNG.40). Because DCB information is not specified for the destination data set.1: Using Defaults to Allocate a File This Process designates that the destination file is placed on a specified unit and volume. because REQUEUE=YES is specified in the PROCESS statement.CATLG) UNIT=3380 VOL=(SER=SYS009) SPACE=(4096. CD1 PROCESS SNODE=CD. and %SUBTIME are exclusive to CONNECT:Direct for OS/390.RECFM=FB. Both checkpointing and compression are requested.PSDATA) CKPT=128K COMPRESSTO (SNODE DSN=$CHI.D || %DATE || .UPDATES.VM. The SPACE information is also supplied.Chapter 4 / COPY Statement Examples 4-3 File Allocation (OS/390 to OS/390) Example 4.CHICAGO REQUEUE=YES COPY FROM (PNODE DSN=$DAL.DAILY. the Process is requeued. COPYSEQ STEP01 PNODE=CD.(200.DALLAS SNODE=CD.2: Using %SUBDATE and %SUBTIME for a File Name This Process shows how to use the %SUBDATE and %SUBTIME variables to construct a unique dataset name based on the date and time of a file transfer submission.PSDATA DISP=(NEW.DATA SELECT=(PL*) ) TO ( DSN=ACCTNG.BLKSIZE=8000) ) - .ROUND)) PROCESS - Example 4.CATLG) DCB=(DSORG=PO. If the Process receives an X37-type abend. Corrective action can then be taken. DCB information from the source data set is used.. %JDATE. %SUBDATE.T || %TIME DISP=(NEW.

COPYSEQ STEP01 PNODE=CD.. Refer to the CONNECT:Direct User’s Guide for the appropriate platform for details on setting up entries in the TYPE file. Any parameters specified on the COPY statement take precedence over those coded in the TYPE file. PSFILE.LRECL=80. The receiving node allocates the file using the same file attributes as the source data set because no file information is supplied.DALLAS to a new file located at another site.DALLAS SNODE=CD. The submitting user is notified when the Process completes. UNIT.40).4-4 CONNECT:Direct Process Guide Concepts and Examples Example 4..PSDATA) CKPT=128K COMPRESS TO (DSN=CHI. PSFILE.PSDATA) PROCESS - . therefore.ROUND) Note: You can also place the IOEXIT parameter in a TYPE entry. VOLUME. DISP=(NEW.CHICAGO.CHICAGO COPY FROM (DSN=DAL. This TYPE record must be present at the destination node (SNODE).3: File Allocation Using a TYPE File The following Process uses a TYPE file to allocate a data set. CD. The destination data set is allocated using definitions specified in the TYPE record. COPYSEQ STEP01 PNODE=CD.PSDATA TYPE=PSFILE) PROCESS - The following parameters make up the TYPE record. Example 4. Both checkpointing and compression are requested within the Process.DSORG=PS) UNIT=3380 VOL=(SER=SYS009) SPACE=(4096.4: Copying a SAM File The following Process copies a SAM file from CD.PSDATA) CKPT=128K COMPRESS TO (DSN=CHI.CHICAGO REQUEUE=YES COPY FROM (DSN=DAL. and SPACE parameters are not specified within the COPY statement.CATLG) DCB=(BLKSIZE=3120.(200.DALLAS NOTIFY=%USER SNODE=CD.

v In STEP01. COPY FROM (DSN=PDS.DEC91 DISP=OLD DCB=(RECFM=U. v In STEP02..8: Copying One Member of a PDS This example illustrates three ways to copy a single member of a PDS.6: Copying an Entire PDS This COPY statement transmits a PDS to a new file located at another site. the receiving node allocates the file using the same file attributes as the source data set.DEST.CATLG) LABEL=(.DEST) - Example 4.DEC91 DISP=(NEW. All members from FAA through GBB are copied if they do not already exist.NR). Because allocation data is not included in the Process. PQR)) TO (DSN=PDS.SL. the FROM and TO member names are specified in the data set names. BLKSIZE=32760)) COMPRESS TO (DSN=DAT. (FAA/GBB. .P44ECH. Note that the RECFM must be U. Checkpointing only takes place at the member level when copying a PDS. BLKSIZE=32760) UNIT=CART SNODE) - Copying PDS to PDS (OS/390 to OS/390) Example 4.Chapter 4 / COPY Statement Examples 4-5 Example 4.OS390. PDS. the FROM and TO member names are specified in the data set names. Both checkpointing and compression are requested within the Process.SOURCE) CKPT=1M COMPRESS TO (DSN=PDS. The member ABC is copied to the PDS. with the output member name changed. DFDSS COPY1 PROCESS SNODE=CD. The member PQR is also copied..RETPD=15) DCB=(RECFM=U.P34ECH.ALTO /* STEP NAME */ COPY FROM (DSN=DAT.DEST DISP=OLD) */ - Example 4. /* USE OF NR WHEN A RANGE IS SPECIFIED COPY FROM (DSN=PDS.SOURCE SELECT=(ABC..5: Copying a DFDSS Volume Dump This Process transmits an OS/390 Data Facility Data Set Services (DFDSS) volume dump to tape.7: Specifying a Range and the NR Subparameter to Copy Selected PDS Members The following COPY statement shows how the NR (NOREPLACE) subparameter can be used when a range is specified.

SOURCE within the specified range.DEST(NEWNAME) DISP=RPL) - STEP02 STEP03 Example 4.10: Copying a PDS and Excluding Members Generically This COPY statement shows how to exclude members generically.11: Copying a PDS and Using a Range to Exclude PDS Members The following COPY statement copies an entire PDS but uses a range to exclude any members from AAB through BBC.SOURCE(MEMBER)) TO (DSN=PDS. There is no member BBC to exclude.DEST) - Example 4.SOURCE(OLDMEM)) TO (DSN=PDS. COPY FROM (DSN=PDS. all members are copied. BBCA. BBB was the last member in PDS.DEST) - The source file. . BBA. MEM3. contains the following members: AAA.SOURCE EXCLUDE=MEM3) TO (DSN=PDS. XXX Members AAA. A generic range. it is copied. except members with names beginning with ABC. like AAB*/BBC*. ABB.SOURCE SELECT=OLDMEM) TO (DSN=PDS.DEST(MEMBER) DISP=RPL) COPY FROM (DSN=PDS. with a new member name specified on the data set name for the destination data set. is not valid. In this example. ABB.DEST(NEWNAME) DISP=RPL) COPY FROM (DSN=PDS. named in the EXCLUDE parameter. STEP01 COPY FROM (DSN=PDS. BGG. COPY FROM (DSN=PDS. BBCA. ABC.9: Copying a PDS and Excluding an Individual Member This COPY statement copies an entire PDS. COPY FROM (DSN=PDS. and BBB are not copied because they are within the range of members excluded in AAB/BBC. PDS.SOURCE. ABC. BBA. and XXX are copied. AAB.SOURCE EXCLUDE=((AAB/BBC))) TO (DSN=PDS. Because BBCA is not part of the range to be excluded.SOURCE EXCLUDE=ABC*) TO (DSN=PDS. with the exception of the member. BGG.DEST) - Example 4. Members AAB. Note: All range entries must be specified as subparameters and enclosed in parentheses. BBB.4-6 CONNECT:Direct Process Guide Concepts and Examples v STEP03 uses the SELECT parameter as part of the FROM clause of the COPY statement.

ABB. ABC. v BAB and BAC are copied because they are selected by the range (BA/BBB). ACB.SOURCE are not copied. v ACB.C1)) TO (DSN=PDS. AB.(ABC/AZ))) TO (DSN=PDS.13: Copying PDS Members Using the EXCLUDE and SELECT Parameters In this example. ABA. v ABD and ABE are not copied because they are excluded by the range ABC/AZ. COPY FROM (DSN=PDS. BAC.DEST) - Example 4.DEST) - . The remaining members of PDS. ACC.SOURCE. ABA. PDS.(CDF. ACD. CDE. Refer to the CONNECT:Direct Process Guide for Mainframe Products volume for the precedence for the SELECT and EXCLUDE parameters. ZZZ is the new name.SOURCE ALIAS=Y EXCLUDE=C3 SELECT=(A. Example 4. BAB. BAA. ABE. v CDE is not copied because it is not selected.ZZZ)) EXCLUDE=(AC*.A*.Chapter 4 / COPY Statement Examples 4-7 Example 4. v BAA is not copied because the specific BAA EXCLUDE overrides the SELECT range (BA/BBB).14: 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. and ACD are not copied because they are excluded generically by AC*.SOURCE SELECT=(PAID*)) TO (DSN=PDS.12: Copying a PDS and Generically Selecting Members This COPY statement shows how to select generically all member names starting with PAID (the first four characters of the data set names). ACC.ZZZ).ABC. the data set. contains the following members: A. AB. ABB are copied because they are generically selected by A*. v CDF is copied because it is specifically selected by (CDF. CDF This COPY statement shows the use of the SELECT and EXCLUDE parameters: COPY FROM (DSN=PDS.BAA.SOURCE SELECT=((BA/BBB). v ABC is copied because a specific ABC selection overrides the EXCLUDE range (ABC/AZ). COPY FROM (DSN=PDS. ABD.DEST) - Results from the COPY are as follows: v A.

Copying to Tape (OS/390 to OS/390) Example 4. v C2 is copied because ALIAS=Y and C1 (another alias for member C) was selected by member name.FILE(MEMBER) DISP=SHR PNODE) TO (DSN=TAPE.DEST contains the following members and aliases: Members A C Aliases A1 A2 C1 C2 The explanation follows: v A is copied because it was selected by member name.DEST contained no members and no aliases before the COPY operation. v C3 is not copied because it was specifically excluded. PDS. v C is copied because ALIAS=Y and C is the true member name for C1.CATLG) UNIT=TAPE LABEL=(. COPYSEQ STEP01 PNODE=CHICAGO SNODE=MINNEAPOLIS COPY FROM (DSN=MY.FILE DISP=(NEW. the data set PDS. v A1 is copied because ALIAS=Y and A1 is an alias for member A. v B is not copied because it was not selected. specifying the PDS member as part of the DSN. v A2 is copied because ALIAS=Y and A2 is an alias for member A.SL) DCB=(DSORG=PS)) PROCESS - . DSORG=PS must be coded on the TO clause of the CONNECT:Direct for OS/390 COPY statement. Because you can only copy a single PDS member to tape in one copy step.SOURCE has the following members and associated aliases: Members A B C C1 C2 C3 Aliases A1 A2 The data set PDS.15: Copying a PDS Member to Tape The following Process copies a PDS member to a tape device.PDS. v C1 is copied because it was selected by member name. After the COPY operation.4-8 CONNECT:Direct Process Guide Concepts and Examples In this example.

FILE DISP=(MOD.PDS. however. on the source CONNECT:Direct node will be invoked and passed two parameters-a character string (‘DB0A05’) and a hexadecimal value (X‘0E’). COPY FROM (PNODE IOEXIT=(INEXT01.CATLG) UNIT=TAPE LABEL=(.FILE(MEMB) DISP=SHR PNODE) TO (DSN=TAPE. an IOEXIT program. INEXT01. It will pass records using CONNECT:Direct to OUEXT03.CATLG) UNIT=TAPE DCB=(DSORG=PS)) COPY FROM (DSN=MY.SL) DCB=(DSORG=PS)) PROCESS - STEP02 Copying Files Using Exits (OS/390 to OS/390) Example 4.FILE(MEMA) DISP=SHR PNODE) TO (DSN=TAPE. The IOEXIT keyword is valid in either the FROM or TO clause of the COPY statement. The exit referenced in this COPY (OUEXT03) must reside in an authorized loadlib at the destination site. In the following example.Chapter 4 / COPY Statement Examples 4-9 You can copy multiple PDS members by coding multiple COPY steps in a Process. COPYSEQ STEP01 PNODE=CHICAGO SNODE=MINNEAPOLIS COPY FROM (DSN=MY.X’0E’)) TO SNODE IOEXIT=OUEXT03) - .FILE DISP=(NEW. MEMB is appended to TAPE. In this example. reside on the node where it is referenced.FILE.16: Using the IOEXIT Parameter You can specify use of an I/O exit by the inclusion of the IOEXIT keyword on the COPY statement. and either append the additional PDS members to the first file or create separate tape files for each member.C’DB0A05’. You can specify a different user-written IOEXIT on each side as shown in the following example. The exit must. an IOEXIT on the destination CONNECT:Direct node.PDS.

18: Copying to a New SMS Data Set Using LIKE This COPY statement transmits a sequential file to a new SMS-controlled file at another site.SOURCE) TO (DSN=SEQ. COPY FROM (DSN=SEQ.SOURCE) TO (DSN=PDSE. The data set is also allocated with the STORCLAS parameter to ensure that the SMS controls the data set. The DSNTYPE parameter is used to specify that the receiving data set is a LIBRARY (another name for a PDSE file).SOURCE) TO (DSN=SEQ. The new data set will be allocated using the DCB parameters from the data set specified on the LIKE parameter. COPY FROM (DSN=PDS.DEST STORCLAS=SCLASS1 MGMTCLAS=MCLASS1) - Example 4.DEST DSNTYPE=LIBRARY DATACLAS=DCLASS1 STORCLAS=SCLASS1) - .DEST DATACLAS=DCLASS1 STORCLAS=SCLASS1 MGMTCLAS=MCLASS1) - Example 4.19: Creating and Copying a PDSE Data Set This COPY statement transmits a PDS file to a new PDSE file at another site.DATASET.4-10 CONNECT:Direct Process Guide Concepts and Examples Copying Files Using SMS Parameters Example 4. COPY FROM (DSN=SEQ.17: Copying to a New SMS-Controlled Data Set This COPY statement transmits a sequential file to a new SMS-controlled file at another site.DEST LIKE=MODEL. The new data set will be allocated using the DCB parameters that are specified within the DATACLAS definition on the receiving node.

COPY FROM (DSN=VSAM.RRDS. COPY FROM (DSN=VSAM.ESDS.DEST DISP=(NEW.RRDS.DEST DISP=(NEW. The LRECL parameter specifies the maximum length of a record in the VSAM data set. The RECORG parameter specifies that the target VSAM data set is an ESDS. The LRECL parameter specifies the maximum length of a record in the VSAM data set.CATLG) RECORG=KS KEYLEN=16 KEYOFF=20 LRECL=256 STORCLAS=SCLASS1 MGMTCLAS=MCLASS1) - Example 4. The LRECL parameter specifies the maximum length of a record in the VSAM data set.CATLG) RECORG=RR LRECL=300 STORCLAS=SCLASS1 MGMTCLAS=MCLASS1) - . COPY FROM (DSN=VSAM.Chapter 4 / COPY Statement Examples 4-11 Example 4. The RECORG parameter specifies that the output VSAM data set is a KSDS. The RECORG parameter specifies that the target VSAM data set is an RRDS. The KEYOFF parameter specifies the offset to the key within each record.20: Creating and Copying a VSAM KSDS Data Set This COPY statement transmits a VSAM KSDS file to a new VSAM KSDS at another site.22: Creating and Copying a VSAM RRDS Data Set This COPY statement transmits a VSAM RRDS file to a new VSAM RRDS at another site.KSDS.SOURCE) TO (DSN=VSAM.SOURCE) TO (DSN=VSAM.CATLG) RECORG=ES LRECL=128 STORCLAS=SCLASS1 MGMTCLAS=MCLASS1) - Example 4.KSDS. The KEYLEN parameter is used to specify the length of the key for the data set. Note that the offset is relative to 0.21: Creating and Copying a VSAM ESDS Data Set This COPY statement transmits a VSAM ESDS file to a new VSAM ESDS at another site.ESDS.SOURCE) TO (DSN=VSAM.DEST DISP=(NEW.

COPY FROM (DSN=SEQ.SOURCE) TO (DSN=VSAM.OS390FILE DCB=(DSORG=PS.DEST.TANDEM SNODE=CD.CATLG) RECORG=LS STORCLAS=SCLASS1 MGMTCLAS=MCLASS1) - Example 4. The RECORG parameter specifies that the target VSAM data set is a LINEAR file. SMS1 STEP1 PROCESS PNODE=CD.OS390.DEST DISP=(NEW.(1500.TANFILE DISP=SHR TO (SNODE DISP=(NEW. LRECL=80) SPACE=(80.CATLG) SECMODEL=(SEQ.DATASET.CATLG) DSN=DATA1.DEST DISP=(NEW.GENERIC) STORCLAS=SCLASS1 MGMTCLAS=MCLASS1) - Example 4.NODE COPY FROM (PNODE DSN=$VOL.SOURCE) TO (DSN=SEQ. COPY FROM (DSN=VSAM.4-12 CONNECT:Direct Process Guide Concepts and Examples Example 4.23: Creating and Copying a VSAM Linear Data Set This COPY statement transmits a VSAM LINEAR file to a new VSAM LINEAR file at another site.100).LINEAR. The security profile of the model data set is used as a model to create a generic security profile for the new data set.SUBVOL.25: Copying a File from CONNECT:Direct for Tandem to CONNECT:Direct for OS/ 390 This Process copies a file from a CONNECT:Direct for Tandem node to a new SMS-controlled file at a CONNECT:Direct for OS/390 node.RLSE) UNIT=SYSDA SYSOPTS="AVGREC=U MGMTCLAS=TEST01 STORCLAS=TEST01 DATACLAS=TEST01") - .LINEAR.SEQ.24: Copying a Data Set with a Security Profile This COPY statement transmits a sequential file to a new sequential file at another site.

and DATA11. Resolution Method The member name is made to be unique as follows: v The member name specified in the TO DSN (or defaulted from the FROM DSN) is used as a seed for comparison. the suffix is incremented until a unique name is created. Example 4. v If the seed name is eight characters long. DATAFILE. The AXUNIQ exit. DATA1.PDS already contains the member DATEABLE. If the member name formed by the seed and the suffix exists already. v If the seed name is less than eight characters long. This truncation will also take place if the seed name and its appended suffix are more than eight characters long.Chapter 4 / COPY Statement Examples 4-13 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. If the seed name is not unique on the receiving node. DATA. starting with 1. CONNECT:Direct will truncate the name from the right to limit the name to eight characters. CONNECT:Direct will modify the specified member name to create a unique name. invoked by SYSOPTS=“UNIQUE=YES” does this for you by adding numeric digits to the specified member name until a unique member name is achieved.PDS(DATA) SYSOPTS="UNIQUE=YES") - CONNECT:Direct resolves the member name to DATA3. Because the member name in the example. a different member name will have to be specified. already exists on the OS/390 TO node. Because the member name in the example. Example 4. does this for you by dropping the rightmost byte and adding a numeric digit to the specified member name until a unique member name is achieved. . invoked by SYSOPTS=“UNIQUE=YES”. v The suffix appended can be as long as seven digits. CONNECT:Direct appends a unique numeric character to the member name. The AXUNIQ exit.PDS already contains the members DATA.26: Resolution of a Unique Member Name by Appending a Digit This example assumes that HLQ. DATA2. COPY FROM (DSN=\app101\data) TO (DSN=HLQ.27: Resolution of a Unique Member Name by Truncating and Appending a Digit This example assumes that HLQ. COPY FROM (DSN=\app101\data) TO (DSN=HLQ. already exists on the OS/390 TO node. a different member name will have to be created.PDS(DATAFILE) SYSOPTS="UNIQUE=YES") - CONNECT:Direct resolves the member name to DATAFIL1.

Specifying COMPRESS without a subparameter indicates that blanks are compressed during transmission and converted back to the original string during decompression.4-14 CONNECT:Direct Process Guide Concepts and Examples Copying Between OS/390 and OS/400 Nodes Example 4. PROC#01 PROCESS SNODE=OS400.SEQFILE1 DISP=SHR) COMPRESS TO (SNODE DSN=’CD/OS400(TEST01)’ SYSOPTS=\"TYPE(MBR)\ \TEXT(’CREATED BY PROC#001’)\ \RCDLEN(133)"\ DISP=RPL) RUN TASK (PGM = OS400) SNODE SYSOPTS=\"\ \CMD(\ \SNDBRKMSG\ \MSG(’PROCESS PROC#01 HAS COMPLETED’)\ \TOMSGQ(DSP07)\ \ )\ \"\ - STEP001 STEP002 . Bracketing backslashes allow for continuation of quotation marks when they begin and end on different lines. and the entire SYSOPTS string must be enclosed in double quotation marks. CONNECT:Direct syntax requires backslashes to continue the SYSOPTS over multiple lines when the Process is submitted from an OS/390 node.OS390.CDI1 PNODE=SC.CD5A PRTY=8 NOTIFY=%USER CLASS=4 SNODEID=(USERID. The default for the COMPRESS parameter is PRIMEchar=X’40’.28: Copying a Sequential File from OS/390 to a Member of a Physical Data Base File This Process copies a sequential file from OS/390 to a member of a physical data base file on the OS/400 node.PSWRD) COPY FROM (PNODE DSN=CD. All SYSOPTS keyword values must be enclosed in parentheses. The RUN TASK then sends a message notifying an OS/400 user that the Process completed.OS400.

BLKSIZE=23408) DISP=RPL) - STEP001 Example 4.ROGER) COPY FROM (PNODE DSN=CD. and the SYSOPTS string is enclosed in double quotation marks.OS390.REPORTS DISP=SHR) TO (SNODE DSN=REPORTS401 SYSOPTS=\"TYPE(SPLF)\ \DEV(*JOB)\ \DEVTYPE(*IPDS)\ \CTLCHAR(*FCFC)\ \SPOOL(*YES)\ \PRTQLTY(*NLQ)\ \PRTTXT(’*** END OF PAGE ***’)\ \JUSTIFY(100)\ \OUTQ(*JOB)\ \COPIES(2)\ \MAXRCDS(999)\ \FILESEP(2)\ \HOLD(*YES)\ \SAVE(*YES)\ \OUTPTY(*JOB)\ \USRDTA(RSMITH)"\ DISP=RPL) - STEP001 .CDI1 PNODE=SC. PROC#001 PROCESS SNODE=OS400.SEQFILE9 DCB=(RECFM=FB.OS390.CD5A PRTY=8 NOTIFY=%USER CLASS=4 HOLD=NO SNODEID=(RSMITH.Chapter 4 / COPY Statement Examples 4-15 Example 4. The parameter CTLCHAR(*FCFC) is always used when the source OS/390 file has a record format (RECFM) of xxA.29: 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. TEST01A PROCESS SNODE=OS400.30: Copying a Data Set from OS/390 to a Spooled File on OS/400 This example copies a data set from OS/390 to a spooled file on an OS/400 node.CD5A PRTY=8 NOTIFY=%USER CLASS=4 HOLD=NO SNODEID=(RSMITH.LRECL=133. The specified SYSOPTS parameters override the defaults defined for the print device at installation.OS400.ROGER) COPY FROM (SNODE DSN=’ABC/OS400(TEST01)’ SYSOPTS="TYPE(MBR)" DISP=SHR) COMPRESS EXT TO (PNODE DSN=ABC.OS400.CDI1 PNODE=SC. DCB information is specified for file allocation on OS/390. The SYSOPTS keyword value is enclosed in parentheses. which indicates that it contains ANSI carriage control. Specifying COMPRESS EXT indicates that repetitive strings in the data will be compressed and converted to the original string during decompression.

32: Submitting a Process from a CONNECT:Direct for Tandem Node that Copies a File from OS/390 to Tandem This Process is submitted from a CONNECT:Direct for Tandem node. EFILE is an entry-sequenced file.BILL. and copies the sequential file JSMITH.EFILE DCB=(DSORG=PS. EBCDIC-to-ASCII translation is enabled with the SYSOPTS parameter SET XLATE ON. to $B.JSMITH COPY FROM (SNODE DSN=JSMITH.CDI1 PRTY=8 NOTIFY=RSMITH CLASS=4 SNODEID=(RSMITH.4-16 CONNECT:Direct Process Guide Concepts and Examples Example 4.EFILE DCB=(DSORG=E) SYSOPTS=\"’SET XLATE ON’" DISP=RPL) \ - .EFILE.ROGER) COPY FROM (PNODE DSN=CD. The SYSOPTS parameter PRTQLTY specifies near-letter-quality print.31: Copying a Member of a PDS from OS/390 to a Spooled File on OS/400 This Process copies a member of a PDS from OS/390 to a spooled file on an OS/400 node.OS390.OS400.EFILE from a CONNECT:Direct for OS/390 node. the PNODE.BILL.RECFM=FB) DISP=SHR) TO (PNODE DSN=$B.CNTL(LRECL80) DISP=SHR) TO (SNODE DSN=REPORTS402 SYSOPTS=\"\ \TYPE(SPLF)\ \PRTQLTY(*NLQ)\ \"\) - STEP001 Copying Between OS/390 and Tandem Nodes Example 4. PROC#001 PROCESS SNODE=OS400. EPROC STEP01 PROCESS SNODE=CD. This parameter must be positioned in the Process wherever the Tandem file (DSN) is specified. the SNODE.

UNST1).Chapter 4 / COPY Statement Examples 4-17 Example 4.NODE SNODE=CD.SEQ.A110257. STEP1 will execute FUP to purge $B.NODE SNODE=CD.A110257 from the OS/390 node (SNODE) to the entry-sequenced file.TANDEM COPY FROM (DSN=DATA1.#FUPTEST/’ ’PURGE A110257 ’)) PNODE COPY FROM (DSN=DATA1. CHECK1 STEP1 PROCESS PNODE=SC.DATA PNODE) TO (DSN=$B.FILERESO.TANDEM COPY FROM (DSN=DATA1.FILERESO.DATA PNODE) TO (DSN=$B. SYSOPTS subparameters are used to define the attributes of the new receiving file on the Tandem system.2)’" \) - . A110257 STEP1 PNODE=CD.VSAME001.34: Creating an Unstructured Code Type 101 File (OS/390 to Tandem) This Process is submitted at the OS/390 node and will copy a file from OS/390 and create a Tandem unstructured code type 101 file ($B.UNST1 DISP=(NEW) SYSOPTS=\"’SET TYPE U’ \|| \’SET CODE 0’ \|| \’SET BLOCK 4096’ \|| \’SET EXT (2.UNST1 DISP=(NEW) SYSOPTS=\"’SET TYPE U’ \|| \’SET CODE 101’ \|| \’SET BLOCK 2048’ \|| \’SET EXT (2.A110257 PNODE DISP=NEW SYSOPTS=\"’SET TYPE E’ \’SET BLOCK 4096’ \’SET MAXEXTENTS 16’ \’SET XLATE ON’" PROCESS - STEP2 \|| \|| \|| \) Example 4. code type 0 file ($B.#FUPTEST) that indicates whether FUP executed successfully.OS390. A message will be sent to the spooler ($S.FILERESO.FILERESO.FILERESO.VSAME001.TANDEM SNODE=SC. STEP2 will copy DATA1.OS390.FILERESO.SEQ.FILERESO.A110257 SNODE DISP=SHR) TO (DSN=$B.2)’" \) - Example 4.UNST1).33: Copying to an Entry-Sequenced File (OS/390 to Tandem) In this multi-step Process.OS390 RUN TASK (PGM=FUP PARM=(’/OUT $S.35: Creating an Unstructured Code Type 0 File (OS/390 to Tandem) This Process is submitted at the OS/390 node and will copy a file from OS/390 and create a Tandem unstructured.A11025 on the PNODE. $B.CD. CHECK1 STEP1 PROCESS PNODE=SC. at the PNODE.

LRECL=100 .37: Copying a Sequential File from an OS/390 Node to a Tandem Node The following Process transfers a sequential file from OS/390 to Tandem. .DSORG=PS .BLKSIZE=4000) DISP=NEW) - Example 4.200. The userid and password are validated before the CONNECT:Direct for OS/390 system copies the JSMITH.202.JOHN.NODE COPY FROM (DSN=$B.TANDEM SNODE=SC.BILL SNODEID=(127. single quotation marks must enclose the data set name.38: Copying a File Submitted from OS/390 to Tandem The following Process. CHECK1 STEP1 PROCESS PNODE=CD. from the Tandem node to the OS/390 node.$B. Because the file is unstructured Code 0. reading in records of 100 bytes.VSAME001. The Process is submitted on the OS/ 390 node.DATA SNODE DCB=(RECFM=FB .UNST1 PNODE DCB=(LRECL=100)) TO (DSN=DATA1.MONEY) COPY FROM (PNODE DSN=JSMITH.TESTOUT’ DISP=NEW SYSOPTS=\"’SET TYPE E’ \|| \’SET XLATE ON’" \) - Note: Because the source file includes the special backslash character.TESTSND’ SYSOPTS=\"’SET EXT(50 50)’" DISP=NEW) - STEP01 \ Example 4. The following Process illustrates copying a file submitted from OS/390 to Tandem. Using the default for MAXEXTENTS results in a file with a capacity of 16 x 50 x 2048. GENSEND1 PROCESS STEP01 SNODE=ACCT. The SNODEID field passes the userid 147. the Tandem file system allocates 50 pages (one page=2048 bytes) to the primary extent and 50 pages to all secondary extents.ROGER. copies a data set from OS/390 to a remote node on a Tandem EXPAND network.JOHN SNODEID=(147. In this example.DALL SNODE=CD. along with the password MONEY. Because the parameter SET EXT (50 50) is specified.36: Copying an Unstructured Code Type 0 File from Tandem to OS/390 This Process will copy an unstructured file code type 0.WILLIE) COPY FROM (PNODE DSN=SMITH. include LRECL on the FROM clause of the COPY statement as instruction to the CONNECT:Direct for Tandem system on reading logical records. TANDEM PROCESS PNODE=CD.DATAFILE DISP=SHR) TO (SNODE DSN=’\TSCIEXT. file attributes are specified using the DCB parameter.FDATA DISP=SHR) TO (DSN=’$C. submitted on a CONNECT:Direct for OS/390 node.4-18 CONNECT:Direct Process Guide Concepts and Examples Example 4.OS390.200 to the Tandem. or 1638400 bytes.OS390.JOHN volume on the \TSCIEXT system.FILERESO.DATA file into the TESTOUT file in the $B.

NODE RUN TASK (PGM=DMRTDYN.#SFUP01/PURGE $USER.SEQ.FILE01. The CONNECT:Direct for Tandem data transformation facility (DTF) (or server) is on system \SYSTEM.SEQ.LRECL=1024.WILLIE) COPY FROM (DSN=’\SYSEXT. single quotation marks must enclose the data set name.SEQ.$A.KSDSFILE") SNODE) COPY FROM (DSN=$B. Note: Because the Process was submitted from a CONNECT:Direct for OS/390 node.BLKSIZE=2048)) - STEP2 Example 4.SEQ. the FUP utility is used to delete a Tandem file. GENSEND2 PROCESS STEP01 SNODE=CD.VSAMKSDS DISP=NEW SPACE=(2048.10)) DCB=(DSORG=PS.FILETEST.39: Copying a File from Tandem on an EXPAND Network to OS/390 This Process is submitted on the OS/390 node to copy a file from a Tandem node on an EXPAND network to an OS/390 node.RECFM=FB.40: Copying a File from Tandem to OS/390 After Running DMRTDYN on OS/390 In this Process. Then $B. STEP1 will invoke DMRTDYN to delete and unallocate DATA1.SMITH SNODEID=(149.SEQ. but the file is being copied from system \SYSEXT.KSDSFILE will be copied from the Tandem node to DATA1.* !" SNODE ) - .VSAMKSDS at the Tandem node.KSDSFILE PNODE DISP=SHR) TO (DSN=DATA1.KSDSFILE DISP=(OLD.(2048. The Process is submitted on OS/390.OS390.205.CD (PGM=FUP SYSOPTS="/OUT $S.41: Using FUP in a Process Submitted on OS/390 to Delete a File on Tandem In this Process.TANDEM SNODE=CD. PART0003 PROCESS STEP1 RUN TASK SNODE=TANDEM.KSDSFILE at the SNODE.ABC. PARM=(C’ALLOC DSN=DATA1.TESTOUT’ SNODE DISP=SHR) TO (DSN=JSMITH.TESTDATA PNODE DISP=RPL) - Example 4.Chapter 4 / COPY Statement Examples 4-19 Example 4. VSAMKS STEP1 PROCESS PNODE=CD.DELETE)’ F’-1’ C"UNALLOC DSN=DATA1.FILETEST.

TYPE E\ || \ .5)’ \ ’SET MAXEXTENTS 16’ \ ’SET XLATE ON’" ) \|| \|| \|| \|| \|| \ - Example 4.10)\ || \ . the CONNECT:Direct system is used to allocate a Tandem partitioned file. Because the Process is submitted from the OS/390 node.10.$B.XLATE ON\ || \ .TESTFILE.SMALLER UNIT=SYSDA) TO (DSN=$C.PCODE0 DISP=NEW SYSOPTS=\"’SET CODE 0’ \ ’SET TYPE U’ \ ’SET PART (1.NODE1 SNODE=TSCI.TANDEM SNODEID=(157. The Process is submitted on OS/390.42: Using CONNECT:Direct to Allocate a Partitioned File on a Single System (OS/390 to Tandem) In this Process. In this example.4-20 CONNECT:Direct Process Guide Concepts and Examples Example 4. PART0001 PROCESS SNODE=TANDEM.214 ABLE1) COPY FROM (DSN=DATA1.$C.ACCTPROC.TESTFILE.NODE1 SNODE=TSCI. bracketing backslashes are used to continue a string containing special characters across multiple lines.TANDEM SYSOPTS=\"’SET EXT(10.5)’ \ ’SET PART (2.SMALLER UNIT=SYSDA) TO (DSN=$C. syntax conventions must follow those established for OS/390.SEQ.REC 100’"\ DISP=RPL) - STEP01 Multiple SET commands can also be specified as follows: SYSOPTS PROCESS PNODE=SC.214 ABLE1) COPY FROM (DSN=DATA1.OS390.10)\ || \ SET XLATE ON\ || \ SET TYPE E\ || \ SET REC 100’"\ DISP=RPL) - STEP01 .FB80L DISP=SHR ) TO (SNODE DSN=$A.CD STEP1 COPY FROM (PNODE DSN=DATA1.OS390.TANDEM SNODEID=(157.ACCTPROC.10.TANDEM SYSOPTS=\"’SET EXT(10.43: SYSOPTS Syntax Conventions (OS/390 to Tandem) This Process will copy a file from the OS/390 node to the Tandem node. SYSOPTS PROCESS PNODE=SC. All partitions reside on the same system.

SMITH COPY FROM (DSN=JSMITH.DELETE)’ F’-1’ C"UNALLOC DSN=DATA1.LRECL=132.LRECL=132.$S. The Process is submitted from the Tandem node. A record format of FBA is used to maintain ANSI control characters.SEQ.Chapter 4 / COPY Statement Examples 4-21 Example 4.DSORG=PS.SEQ.ACCT SNODE DCB=(RECFM=FBA. DISP=(OLD.SEQ. BLKSIZE=13200) SPACE=(13200.EXTOS390F.OS390 RUN TASK (PGM=DMRTDYN. spooler files and edit files (unstructured.SEQ. STEP2 will copy a file from the Tandem spooler to DATA1. Note that \SYSEXT is an EXPAND node other than the one that the CONNECT:Direct for Tandem server resides on.EXTOS390F.EXTOS390F at the SNODE.2)) UNIT=SYSDA) - STEP2 Example 4.CATLG) DCB=(DSORG=PS. STEP02 copies a file from the Tandem spooler to an OS/390 node. code 101) are translated automatically.#SPL1’ PNODE DISP=RPL COPY FROM (FILE=’\SYSEXT. EXTOS390F PROCESS STEP1 PNODE=CD. STEP01 copies a file from a DSN on the OS/390 node to the Tandem spooler. the most recent job in the spooler for the job owner will be copied. Because the Tandem files are spooler files.#EXTTANF PNODE DISP=SHR) TO (DSN=DATA1.EXTOS390F")) SNODE COPY FROM (DSN=\TANEXT.EXTOS390F SNODE DISP=(NEW.44: Copying a File from a Tandem Spooler to an OS/390 Node In this multi-step Process.2)) DISP=RPL) - STEP02 . SPL STEP01 PROCESS SNODE=CD.SEQ.(10. A record format of FBA is used to maintain ANSI control characters. PARM=(C’ALLOC DSN=DATA1.$S.RECFM=FBA. BLKSIZE=13200) SPACE=(13200. Because a spooler job number was not specified.CDACT SNODE DISP=SHR) TO (FILE=’\SYSEXT. STEP1 will execute a RUN TASK to invoke DMRTDYN at the SNODE to delete DATA1.$S.TANDEM SNODE=SS.#SPL2’ PNODE DISP=SHR) TO (DSN=RJONES.(10.45: 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.CD. the SYSOPTS SET XLATE subparameter does not have to be specified for translation.

OS390..ACCTDATA DISP=RPL SYSOPTS=("SET TYPE U" "SET BLOCK 4096" "SET EXT (5. PROCESS1 PROCESS PNODE=CD.SPLFILE DCB=(RECFM=FBA. DCB attributes must be specified to identify the file on the volume.4-22 CONNECT:Direct Process Guide Concepts and Examples Example 4.2)) DISP=RPL) - Example 4. SYSOPTS is used to specify file creation parameters specific to Tandem.OS390 COPY FROM (DSN=$C.DSORG=PS..BILLPROC. The Tandem file has a job number of 3722 and a location (name) of #SPLFILE.JSMITH COPY FROM (DSN=\SYSEXT.BLKSIZE=4096) VOL=(. The SPOOLER command is used to specify a supervisor other than the default of $SPLS.. PROCESS1 PROCESS PNODE=CD.(10.1) LABEL=(.47: Copying a Disk File from Tandem to a Tape Device at OS/390 This Process is submitted on the Tandem node to copy a disk file on Tandem to a tape device at the OS/390 node. Because NL (no labels) is specified.EXPDT=91044) UNIT=REEL) - STEP01 Example 4. SPLPROC STEP01 PROCESS SNODE=CD. DCB attributes must be specified to identify the file on the volume.NL.48: Copying a Tape File from OS/390 to a Disk File on Tandem This Process is submitted at the Tandem node to copy a tape file from the OS/390 node to a disk file on the Tandem node.#SPLFILE SYSOPTS=("SET SPOOLER=$SPLA" "SET SPOOLNUM=3722") DISP=SHR) TO (DSN=RJONES.ROGER) SNODE=CD.TANDEM SNODEID=(RJONES.RECFM=FB.OS390 COPY FROM (DSN=RJONES.LRECL=132. A record format of FBA is used to maintain ANSI control characters..RECFM=FB.LRECL=80.$S.ACCTTAPE SNODE UNIT=REEL VOL=SER=010196 LABEL=(.BILLPROC. Because NL (no labels) is specified.LRECL=80.46: 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.TANDEM SNODEID=(RJONES.BLKSIZE=4096) DISP=SHR) TO (PNODE DSN=$C.ACCTTAPE DISP=RPL DCB=(DSORG=PS.5)")) - STEP01 . BLKSIZE=13200) SPACE=(1320.ACCTDATA DISP=SHR) TO (DSN=RJONES.NL.EXPDT=91044) DCB=(DSORG=PS.ROGER) SNODE=CD.

C" INDEX -".49: Copying a File from OS/390 to Tandem Using the FASTLOAD Option This Process is submitted at the Tandem node to copy an entry-sequenced file from OS/390 to a key-sequenced file at the Tandem node.VSAM01.OUTPUT.KSDS DISP=RPL SYSOPTS=("SET FAST. C" SHAREOPTIONS(2)) -".DATA2) -". C" (CONTROLINTERVALSIZE(512) -".CDFILES. PARM=(C"FREE=CLOSE. C" RECORDSIZE(262 880) -".OUTPUT) -". The XLATE subparameter is included in the Process to turn on the text conversion utility and translate from EBCDIC to ASCII. The file transmitted is a Tandem key-sequenced file. C" DEFINE CLUSTER -".DATA.VSAM01.FILE DISP=SHR SNODE) TO (DSN=$C. DMRTAMS (using IDCAMS commands specified in the Process) first deletes the old data set if it exists. C" (CONTROLINTERVALSIZE(4096) -". C" DATA -". C" FREESPACE(0 0) -". C" NOIMBED -".TANDEM SNODE=CD.OUTPUT) CLUSTER ".KDSDFIL DISP=SHR PNODE) TO (DSN=RSMITH. C" NAME(RSMITH.ESDS.RSMITH) SACCT=’CHARGE TO ACCOUNTING’ RUN TASK (PGM=DMRTAMS.50: Allocating a VSAM Data Set and Copying a File from Tandem to OS/390 This Process invokes CONNECT:Direct DMRTAMS for VSAM file allocation.VSAM01.OS390.VSAM01. The SYSOPTS subparameter SET FASTLOAD SORTED sets FASTLOAD and indicates to FUP that the data is sorted. VSAM01 PROCESS SNODE=SC.RSMITH PNODE=CDCLX SNODEID=(RMITH.VSAM01. C" KEYS (8 6) -".OUTPUT. C" (NAME(RSMITH. C" NAME(RSMITH. It then defines and allocates it for use in the subsequent COPY statement.LOAD.SORTED Y" "SET XLATE ON") PNODE) - Example 4.OS390 COPY FROM (DSN=OS390.INDEX2))")) SNODE COPY FROM (DSN=$B. The FASTLOAD option can be used to reduce disk I/O overhead.RETURN=(DD) SYSOUT=X" C" DELETE (RSMITH. FASTLOAD PROCESS STEP01 PNODE=CD. C" VOLUMES(M80003) -". C" RECORDS(2500 100) -". C" INDEXED -".OUTPUT DISP=SHR SNODE) - STEP1 STEP2 .Chapter 4 / COPY Statement Examples 4-23 Example 4. This option (particularly useful for key-sequenced files) will bypass invocation of FASTSORT by FUP. C" NOREPLICATE -".

.(2. The ckpt parameter is generally coded between the FROM and TO clauses of the COPY statement.JANUARY DISP=(NEW. submitted from the OS/390 node.DSORG=PS) PNODE) - . The DSN and SYSOPTS strings for the UNIX system must be in the proper case for UNIX and enclosed in double quotation marks.51: Copying Files Between UNIX and OS/390 This Process copies a file from UNIX to OS/390.CATLG) SPACE=(23040. blksize=2400) space=(TRK.NODE COPY FROM (DSN="/company/payroll/monthly/jan" SYSOPTS=":datatype=text:" SNODE) TO (DSN=OS390.MONTHLY.)) snode disp=rpl) pend This Process. copies a text file from UNIX to OS/390.LRECL=0. OS390xx step01 process snode=OS390.1)) DCB=(RECFM=U. lrecl=80.BLKSIZE=23040. The Process was initiated from the UNIX node.node copy from (file=file1 pnode) ckpt=no to (file=file2 dcb=(dsorg=PS.(1. recfm=FB.4-24 CONNECT:Direct Process Guide Concepts and Examples Copying Between OS/390 and UNIX Nodes Example 4. The ckpt parameter specifies that no checkpoints will be taken. PROC2 STEP01 PROCESS SNODE=UNIX.PAYROLL.

copies a text file from Stratus VOS to OS/390. The Process was initiated from the Stratus VOS node.node copy from (file=%mymodule#m1_d01>cds>cfg>mynode>data>myfile pnode) ckpt=no to (file=file2 dcb=(dsorg=PS.53: Copying a File from Stratus VOS to OS/390 This Process. submitted from the OS/390 node. The DSN and SYSOPTS strings for the Stratus VOS system must be in the proper case for Stratus VOS and enclosed in double quotation marks. The ckpt parameter is generally coded between the FROM and TO clauses of the COPY statement.)) snode disp=rpl) pend Example 4. OS390xx step01 process snode=OS390.PAYROLL.1)) DCB=(RECFM=U.(2.BLKSIZE=23040.Chapter 4 / COPY Statement Examples 4-25 Copying Between OS/390 and Stratus VOS Nodes Example 4. PROC2 STEP01 PROCESS COPY FROM SNODE=VOS.. recfm=FB.MONTHLY.JANUARY DISP=(NEW.(1.52: Copying Files Between Stratus VOS and OS/390 This Process copies a file from Stratus VOS to OS/390.NODE (DSN="%mymodule#m1_d01>cds>cfg>mynode>data>myfile" SYSOPTS=":datatype=text:" SNODE) (DSN=OS390. The ckpt parameter specifies that no checkpoints will be taken.CATLG) SPACE=(23040.DSORG=PS) PNODE) TO - .LRECL=0. blksize=2400) space=(TRK. lrecl=80.

If the file exists.(2. OS390xx step01 process snode=OS390.56: Copying a File from OS/390 to VM This Process copies an OS/390 data set to a file on the 191 disk of VM user IVVB. If the file does not exist.BLKSIZE=23040.55: Copying a File from OpenVME to OS/390 This Process. .MONTHLY.DSORG=PS) PNODE) - Copying Between OS/390 and VM Nodes Example 4. The Process was initiated from the OpenVME node.1)) DCB=(RECFM=U.CATLG) SPACE=(23040. The ckpt parameter is generally coded between the FROM and TO clauses of the COPY statement. The DSN and SYSOPTS strings for the OpenVME system must be in the proper case for OpenVME and enclosed in double quotation marks.54: Copying Files Between OpenVME and OS/390 This Process copies a file from OpenVMS to OS/390..4-26 CONNECT:Direct Process Guide Concepts and Examples Copying Between OS/390 and OpenVME Nodes Example 4.(1.LRECL=0.DECEMBER DISP=(NEW.node copy from (file=newfile pnode) ckpt=no to (file=newfile2 dcb=(dsorg=PS.)) snode disp=rpl) pend Example 4.TAXLOG. the CONNECT:Direct system creates it as indicated by the DISP=RPL parameter. PROC2 STEP01 PROCESS SNODE=VME. submitted from the OS/390 node. recfm=FB. blksize=4800) space=(TRK.NODE COPY FROM (DSN="/company/tax/monthly/dec" SYSOPTS=":datatype=text:" SNODE) TO (DSN=OS390. lrecl=80. copies a text file from OpenVME to OS/390. The ckpt parameter specifies that no checkpoints will be taken. the CONNECT:Direct system replaces it.

NODE1 NOTIFY=USERID COPY FROM (DSN=CHELSEN. the CONNECT:Direct system creates it as indicated by the DISP=RPL parameter.300) DISP=(RPL)) - Example 4. the CONNECT:Direct system replaces it. READER STEP01 SNODE=CD.VM. excluding all members with names beginning with the characters DM. OS390TOVM1 STEP01 PROCESS SNODE=CD.VM.FILE DISP=SHR) TO (DSN=TAPE.Chapter 4 / COPY Statement Examples 4-27 The following Process illustrates copying a file from OS/390 to VM.DATA DISP=OLD) TO (DSN=’!SPOOL VKK SALES DATA’ DCB=(DSORG=PS. The file type is ACCTDATA. to files on VM with file names corresponding to the member names on OS/390. TAPE STEP01 PROCESS SNODE=CD.NODE1 NOTIFY=USERID COPY FROM (DSN=RRT.EXPDT=92067) SNODE DISP=RPL) - Example 4.57: Copying an OS/390 PDS to a Set of Files on VM The COPY statement in this example copies a PDS.58: Copying an OS/390 File to Tape on VM This Process copies a disk file from a CONNECT:Direct for OS/390 node to tape at the CONNECT:Direct for VM node.59: Copying an OS/390 File to Spool on VM This Process copies a disk file from a CONNECT:Direct for OS/390 node to spool at a CONNECT:Direct for VM node.SALES.DATA.FILE UNIT=TAPE LABEL=(1. If the file exists.LRECL=80.191) DISP=(RPL)) - Example 4.W.DATA.BLKSIZE=80)) PROCESS - .VM. If the file does not exist.WPEI.PDS.RECFM=F.WIVVB.SL.NODE1 CLASS=10 COPY FROM (DSN=SMITH.W.ACCT DISP=SHR EXCLUDE=(DM*) UNIT=SYSDA) TO (DSN=’* ACCTDATA’ LINK=(PEI. STEP01 COPY FROM (DSN=OS390.FDATA DISP=SHR UNIT=SYSDA) TO (DSN=’TEMP1 OUTPUT’ LINK=(IVVB.

NODE NOTIFY=CDA1 SNODEID=(RSMITH.CDTEST]PDSTEST.62: Copying a File from Disk to Tape The following example copies an OpenVMS file from disk to tape. SYSOPTS3 PROCESS STEP01 SNODE=CD.MEMBERS SNODE) TO (DSN=DUA0:[RJONES.O:E. CONNECT:Direct syntax requires using backslashes to continue the SYSOPTS over multiple lines when the Process is submitted from an OS/390 node. T1 STEP01 PROCESS SNODE=SC.61: Using the SYSOPTS Parameter (OS/390 to OpenVMS) This Process shows how to specify the SYSOPTS parameter with the MOUNT and PROTECTION keywords.VMS.NODE COPY FROM (DSN=SMITH.OS390.CNTL(IEBGENER) PNODE) TO (DSN=’MSA0:TAPE.JOEUSER SNODEID=(JOEUSER.DAT) TO (DSN=MUXX:TESTFILE. When one or more SYSOPTS parameters are specified and they continue across several lines.ROGER) HOLD=YES COPY FROM (DSN=SMITH.TLB DISP=OLD DCB=(DSORG=PO) SYSOPTS="LIBRARY=’TEXT’ REPLACE" PNODE) - Example 4.G:E.PASSWORD) COPY FROM (DSN=DUXX:<DIRECTORY>TESTFILE. bracketing backslashes (\) and the double bar (||) concatenation characters are required.INPUT83.DAT’ DISP=RPL SNODE SYSOPTS=\"MOUNT=’MSA0:/NOLABEL’\ || \ NODISMOUNT\ || \ PROTECTION=’S:E.DAT SYSOPTS="MOUNT=’MUXX: TAPE /OVERRIDE=ID’ ") - .60: Copying PDS Members from OS/390 to OpenVMS This Process copies a PDS and all of its members from OS/390 to a text library on the VAX. The /OVERRIDE qualifier can be added either to the MOUNT command or to the tape label parameter.W:E’ "\) - Example 4.VMS. The entire SYSOPTS string must be enclosed in double quotation marks. PDSCPY1 STEP01 PROCESS SNODE=CD.4-28 CONNECT:Direct Process Guide Concepts and Examples Copying Between OS/390 and OpenVMS Nodes Example 4. The example shows the qualifier added to the parameter. Specifying the /OVERRIDE qualifier causes the name of the tape volume to be ignored. Note that the string of SYSOPTS parameters is enclosed in double quotation marks.

DAT SYSOPTS="MOUNT=’MUXX: TAPE /OVERRIDE=ID’ ") TO (DSN=DUXX:<DIRECTORY>TESTFILE. copies from a CONNECT:Direct for OS/390 node to a CONNECT:Direct for OpenVMS node. SINGENT1 PROCESS SNODE=CD.63: Copying a File from Tape to Disk The following example copies an OpenVMS file from tape to disk.JOEUSER SNODEID=(JOEUSER.Chapter 4 / COPY Statement Examples 4-29 Example 4.MEMBERS DISP=RPL SNODE) - .PASSWORD) COPY FROM (DSN=MUXX:TESTFILE.TXT SYSOPTS="NOBINARY XLATE=’$DSK:[JS.TBL.W:RWED’ LIBRARY=’TEXT’ STREAM" PNODE) - Example 4.TLB PNODE SELECT=(*) SYSOPTS="LIBRARY=’TEXT’" DISP=OLD DCB=(DSORG=PO)) TO (DSN=JSMITH.DEF}’ PROTECTION=’S:RW. T2 STEP01 PROCESS SNODE=SC.NODE STEP01 COPY FROM (DSN=DUA0:[SMITH.TXT]CD_1.CDTEST]PDSTEST.DAT) - Example 4.VMS. ALLENT1 STEP01 PROCESS SNODE=CD.OS390.OS390.DATA]ACCT.66: Copying All Entries from an OpenVMS Text Library to OS/390 This Process copies all the modules of a text library to respective members of a PDS on OS/390.TLB PNODE SELECT=(BOOLEAN) SYSOPTS="LIBRARY=’TEXT’" DISP=OLD DCB=(DSORG=PO)) TO (DSN=SMITH. It illustrates how a user can specify a user-defined translation table.65: 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. the CONNECT:Direct system will extract a module from the OpenVMS text library CD_1.CDTEST]PDSTEST.MEMBERS(DATA) DISP=RPL SNODE) - Example 4.NODE COPY FROM (DSN=DUA0:[JSMITH.OS390.CDTEST SNODE DISP=SHR ) TO (DSN=$DISK:[JONES. Specifying the /OVERRIDE qualifier causes the name of the tape volume to be ignored. RECV_VB STEP01 PROCESS SNODE=CD.NODE COPY FROM (DSN=SMITH.TBL{JS.64: Copying from OS/390 to OpenVMS and Specifying a User-Defined Translation Table This Process. submitted from the OpenVMS node. Note the use of the asterisk (*) with the SELECT parameter. Using the XLATE keyword in a Process overrides the default translation table.

OS390 SNODEID=(RSMITH.ACCTJAN DISP=RPL SNODE) - To submit this Process from the OS/390 node (the PNODE is an OS/390 node). v Change the brackets ([ ]) to less than and greater than signs (< >).EXE PNODE SYSOPTS="BINARY") TO (DSN=RSMITH. copies the OS/390 data set RSMITH. The modified Process is as follows: PROCESS1 PROCESS STEP01 SNODE=CD.ACCTJAN at the OS/390 node.ACCTJAN DISP=RPL PNODE) - .COM]JAN. PROCESS1 PROCESS STEP01 SNODE=CD.OS390 SNODEID=(RSMITH.EXE at the OpenVMS node. BINARY must be specified as part of the SYSOPTS parameter so that EBCDIC to ASCII translation will not occur.4-30 CONNECT:Direct Process Guide Concepts and Examples Example 4.67: Copying a Data Set from an OS/390 Node to an Executable File on an OpenVMS Node This Process.COM] on device DUC4 to data set RSMITH.ACCTJAN SNODE ) TO (DSN=DUC4:[ACCT. the following syntax changes must be made: v Enclose the OpenVMS file specification between single or double quotation marks to allow special characters to be passed to the OpenVMS node.EXE’ SNODE SYSOPTS="BINARY") TO (DSN=RSMITH.VMS SNODEID=(RSMITH.ROGER) COPY FROM (DSN=RSMITH. copies the OpenVMS file JAN. submitted from the OpenVMS node.COM]JAN. For the appropriate file attribute information. PROCESS1 PROCESS STEP01 SNODE=CD.EXE PNODE SYSOPTS="TYPE=’IMAGE’ BINARY" DISP=RPL) - Example 4. Also. submitted from the OpenVMS node.COM>JAN.ROGER) COPY FROM (DSN=’DUC4:<ACCT.ACCTJAN to file specification DUC4:[ACCT.EXE in directory [ACCT.COM]JAN. BINARY must be specified as part of the SYSOPTS parameter so that ASCII to EBCDIC translation will not occur.68: Copying an Executable File from an OpenVMS Node to an OS/390 Node This Process.ROGER) COPY FROM (DSN=DUC4:[ACCT. the SYSOPTS parameter TYPE=IMAGE must be specified.

REPORT DISP=SHR) TO (DSN=REPORT.SOURCE DISP=SHR) TO (DSN=SOURCE.DYMT.VSE.FDATA DISP=SHR) TO (DSN=FDATA. Note that a TYPE file record is specified in STEP03.DYMT.STEP01 DCB=(DSORG=PS BLKSIZE=80 LRECL=80 RECFM=FB) DISP=RPL LABEL=(RETPD=0007) UNIT=TNOASGN SNODE) COPY FROM (DSN=$ABC. Different record formats are specified in the steps.69: Copying a File from OS/390 to VSE (DYNAM/T Tape Files) This multi-step Process copies various sequential files from an OS/390 node (the SNODE) to VSE DYNAM/T tape files at the PNODE.DYMT.Chapter 4 / COPY Statement Examples 4-31 Copying Between OS/390 and VSE Nodes Example 4.DALLAS NOTIFY=%USER COPY FROM (DSN=$ABC.STEP04 DCB=(DSORG=PS BLKSIZE=80 LRECL=0 RECFM=U) UNIT=TNOASGN DISP=RPL LABEL=(RETPD=0007) SNODE) COPY FROM (DSN=$ABC.STEP05 DCB=(DSORG=PS BLKSIZE=88 LRECL=84 RECFM=V) UNIT=TNOASGN LABEL=(RETPD=0007) DISP=RPL SNODE) - STEP02 STEP03 STEP04 STEP05 .DYMT. This record contains the DCB and UNIT information for this file.VDATA DISP=SHR) TO (DSN=VDATA.DYMT. The TYPE record must be in the TYPE file at the destination (VSE node).STEP03 TYPE=OS390DYMT LABEL=(RETPD=0007) DISP=RPL SNODE) COPY FROM (DSN=$ABC. DYMTVSE STEP01 PROCESS SNODE=CD.UDATA DISP=SHR) TO (DSN=UDATA.STEP02 DCB=(DSORG=PS BLKSIZE=3120 LRECL=80 RECFM=FB) UNIT=TNOASGN LABEL=(RETPD=0007) DISP=RPL SNODE) COPY FROM (DSN=$ABC.

VSEOS390 PROCESS PNODE=SC.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.RECFM=FBA. This Process was written with symbolics for substitution.4-32 CONNECT:Direct Process Guide Concepts and Examples Example 4.DYNAM.70: Copying an OS/390 PDS Member to a New VSE File in a DYNAM Pool This Process copies a PDS member on OS/390 to a DYNAM-controlled file on VSE.PDS.&VSEDSN)) PNODE EIF - - .COPYFILE - STEP0001 COPY FROM ( SNODE DSN=USER01.LRECL=121.OS390PRT01 DISP=SHR ) TO ( PNODE DSN=&VSEDSN UNIT=DLBLONLY DCB=(DSORG=PS.NODE1 STEP01 COPY FROM (DSN=OS390. The file on VSE will be dynamically allocated by DYNAM in a virtual disk pool defined to DYNAM as POOL01.DATASET(TESTDATA) DISP=(SHR. these will be taken from the input data set.FILE DISP=NEW UNIT=DNOASGN VOL=SER=POOL01 SPACE=(1.VSE.OS390.NODE PNODE=SC.VSE.71: Copying an OS/390 BSAM File to a VSE-Controlled Disk Data Set Use this Process to transfer a OS/390/ESA BSAM file into a VSE CA-DYNAM/D or CA-EPIC controlled disk data set.NODE &VSEDSN=USER01. OS3902DYD1 PROC SNODE=SC.TEST.TEST.(300)) PNODE) - Example 4.NODE1 SNODE=SC. PARM=(’GOOD’.KEEP) SNODE) TO (DSN=VSE. The disk data set has already been defined to the appropriate system catalog.BLKSIZE=27951) ) COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY. PARM=(’FAIL’. You do not need to specify DCB attributes for the output data set.OS390.

.USER01 FROM ( SNODE DSN=RPITT1. OS3902DYT1 PROC STEP0001 COPY SNODE=SC.RECFM=FB.FILE DISP=SHR ) TO ( PNODE DSN=USER01. Processes.OS390.BLKSIZE=1600) ) - Example 4.CATLG) DCB=(DSORG=PS. Source. Phase. The input resides on OS/390 and the output file is written to tape (or cartridge) on VSE.LARGE. This sample Process is coded with symbolic parameters to allow you to use a generic Process to move any type of members (Dump.NODE0 PNODE=SC.NONDYNAM UNIT=TNOASGN LABEL=(1.VSE21.LRECL=80.Chapter 4 / COPY Statement Examples 4-33 Example 4. OBJ.TEST. JCL) Use this Process when you are moving files from OS/390 to VSE with the Process running on VSE.72: 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 non-controlled tape data set.SL) DISP=(NEW.OS390.73: Copying an OS/390 PDS Member to a VSE BSAM Sublibrary Member This Process copies an OS/390 PDS library member into a VSE BSAM sublibrary member.

This Process was written with symbolics for substitution. . Use this Process when you are moving files from OS/390 to VSE with the Process running on VSE. Note: If you are connecting with CONNECT:Direct for MVS Version 2.&VSELIB)) PNODE EIF - STEP0001 COPY STEP0002 IF ELSE - Example 4.NODE &MEMBER=. and VOL=SER= parameters.VSE. OS3902LIB1 PROC SNODE=SC. Processes. JCL). OBJ. PARM=(’GOOD’. UNIT. When you reference BSAM libraries in a CONNECT:Direct Process. Otherwise the Process will not run.2 or less.LIBRARIES &VSESUB=USER01 &VSETYP=N &VSEVOL=USER03 FROM ( SNODE DSN=&OS390PDS DISP=SHR SELECT=(&MEMBER) ) TO ( PNODE DSN=&VSELIB DISP=SHR UNIT=DISK DCB=(DSORG=PS) VOL=SER=&VSEVOL LIBR=(REPLACE=YES SLIBDISP=SHR SUBLIB=&VSESUB TYPE=&VSETYP) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY. your SYSOPTS statement must be contained on one line. PARM=(’FAIL’. Source.LIB &VSELIB=CONN.DIRECT.&VSELIB)) PNODE RUN TASK (PGM=DMNOTIFY.PROCESS.74: Copying an OS/390 PDS Member to a VSE VSAM Sublibrary Member This Process copies an OS/390 PDS library member into a VSE VSAM sublibrary member.4-34 CONNECT:Direct Process Guide Concepts and Examples The disk data set has already been defined to the appropriate system catalog. you must specify: DSORG. This sample Process is coded with symbolic parameters to allow you to use a generic Process to move any type of members (Dump. DSN. &OS390PDS=USER01.NODE PNODE=SC. Phase.OS390.

TEST.NODE PNODE=SC.LIB1 &VSESUB=RXUSER01 &VSETYP=JCL 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) ) - STEP0001 COPY Example 4.DIRECT.OS390.TAPE.FILE DISP=SHR DCB=(DSORG=PS.JCLLIB %VSELIB=CONN. PARM=(’FAIL’. PARM=(’GOOD’.&VSEDSN)) PNODE EIF - - - .FILE STEP0001 COPY FROM ( SNODE DSN=RPITT1.VSE.VSE. OS3902TAP1 PROC SNODE=SC. &OS390PDS=USER01.BLKSIZE=800) ) TO ( PNODE DSN=&VSEDSN UNIT=&VSECUU LABEL=(1. The input is from OS/390 with the Process running on VSE.OS390.Chapter 4 / COPY Statement Examples 4-35 For VSAM libraries you must specify the DSN and DSORG parameters on the FROM statement.NODE &VSECUU=CART &VSEDSN=TEST.BLKSIZE=16000) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.LARGE.LRECL=80.NODE &MEMBER=.RECFM=FB.LRECL=80. You can optionally specify the catalog parameter if needed.SL) DISP=(NEW. The disk data set has already been defined to the appropriate system catalog.NODE PNODE=SC.KEEP) DCB=(DSORG=PS.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.OS390.75: 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. This Process was written with symbolics for substitution.RECFM=FB. OS3902LIB2 PROC SNODE=SC.

m. TONT1 PROCESS SNODE=NT. O2WCPY01 PROCESS SNODE=OS2.77: Copying a File from OS/390 to OS/2 Warp This Process.OS390.TXT’ SYSOPTS="DATATYPE(TEXT)" DISP=(RPL)) - STEP1 The following Process is a variation on the previous example. The SYSOPTS string for the OS/2 Warp system must be enclosed in double quotation marks.TXT’ COPY FROM (DSN=&DSN1) TO (DSN=&DSN2 SYSOPTS="DATATYPE(TEXT)" DISP=(RPL)) - STEP1 Copying Between OS/390 and OS/2 Warp Node Example 4.DEL. In this example.BLANKS(NO)" ) - . The SYSOPTS parameter DATATYPE(TEXT) indicates that the data contains text (rather than binary data) and EBCDIC to ASCII translation will be performed.SNA HOLD=NO RETAIN=NO COPY FROM (DSN=TEST. This process also uses the STARTT parameter to specify a day of the week and time when the process will execute.DATA99) TO (DSN=’\\NT-NODE\ROOT_D\USERS\TEST1\DATA1. copies a text file from OS/390 to OS/2 Warp.1200. and are resolved at the time the process is submitted. 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).TEST99’ &DSN2=’\\NT-NODE\ROOT_D\USERS\TEST1\DATA1. and must be used when copying a file to a remote computer where the CONNECT:Direct server is not running. submitted from the OS/390 node. This Process will execute automatically each Monday at 3:00 a.NODE STEP1 COPY FROM (PNODE DSN=VALID.76: Copying a File from OS/390 to Windows 95/NT This Process copies a file from an OS/390 node to a Windows 95/NT node.DEL.SNA HOLD=NO RETAIN=YES STARTT=(MONDAY.03:00) &DSN1=’TEST. TONT1 PROCESS SNODE=NT.1200. The DSN (data set name) for the NT file uses the Universal Naming Convention (UNC) to specify the computer name \\NT-NODE and the share name \ROOT_D.4-36 CONNECT:Direct Process Guide Concepts and Examples Copying Between OS/390 and Windows 95/NT Nodes Example 4. the data set names (DSN) are defined as symbolic variables in the COPY statement (&DSN1 and &DSN2).FILENAME DISP=SHR) CKPT=0K COMPRESS EXTENDED TO (SNODE DSN=’C:\VALID\OS2\FILENAME’ DISP=NEW SYSOPTS="DATATYPE(TEXT) STRIP. This can be used as an alternative to specifying a drive letter such as C:\.

A110257 STEP01 PNODE=CD.FILERESO.78: Copying Files Between OS/2 Warp and OS/390 This Process copies a file from OS/2 Warp to OS/390. os2proc PROCESS SNODE=OS390.ETYPE PNODE DISP=SHR) TO (DSN=$B.OS390.Chapter 4 / COPY Statement Examples 4-37 Example 4.FILEDATA.1))) PEND Copying Between Tandem Nodes Example 4. $B. ’VOLUME $B.TANA SNODE=CD. Specifying the SYSOPTS subparameter TYPE=E ensures that file attribute defaults defined in the type file E will be used when creating the file.#FUPTEST/’.FILERESO.FILERESO. ’PURGE A110257 ’) PNODE) COPY FROM (DSN=$B.NODE /*$OS390$*/ HOLD=NO CLASS=1 PRTY=10 RETAIN=NO step01 COPY FROM ( FILE=c:\valid\os2\filename PNODE /*$OS/2 Warp$*/) TO ( SNODE /*$OS390$*/ DSN=VALID.(20.#FUPTEST) that indicates whether FUP executed successfully.FILEDATA.A110257. at the SNODE. BLKSIZE=2400) SPACE=(TRK.ETYPE from the PNODE to the entry-sequenced file.FILENAME DISP=(RPL. LRECL=80.FILERESO’. STEP01 will execute FUP to purge $B. A message will be sent to the spooler ($S.CATLG) DCB=(DSORG=PS.A11025 on the PNODE. The Process was initiated from the OS/2 Warp node. RECFM=FB.TANB RUN TASK (PGM=FUP SYSOPTS=(’/OUT $S. STEP02 will copy $B.A110257 SNODE DISP=NEW SYSOPTS="SET TYPE E") PROCESS - STEP02 .79: Copying to an Entry-Sequenced File (Tandem to Tandem) In this multi-step Process.

TESTPROC PROCESS PNODE=CD400 SNODE=CDTAN SNODEID=(USER1.82: Copying Text Files from Tandem to UNIX This Process.$S.80: Copying Files Between Tandem Spooler Systems This Process selects a spooler job by job number and copies it to another Tandem spooler system at a remote node.TANB COPY FROM (DSN=\SYSA.81: Copying a Tandem File to an OS/400 Node This Process copies a Tandem file to a member of a physical data base file on OS/400.$S. For CONNECT:Direct for UNIX nodes. The SPOOLER command is used to specify a supervisor other than the default of $SPLS. unix1 step1 process snode=unix. The OS/400 file is created with maximum members specified as 100.smith to / payroll/monthly/jan on the CONNECT:Direct for UNIX node.datafile pnode) to (file=’/payroll/monthly/jan ’ snode sysopts=":datatype=text:" disp = rpl) ckpt=128K - . the security userids and passwords are case sensitive.FILE DISP=SHR PNODE) SYSOPTS=("SET XLATE ON") TO (DSN=’CDTAN/SOURCE(FILE)’ DISP=NEW SNODE SYSOPTS=("TYPE(MBR) MAXMBRS(100)")) - STEP01 Copying Between Tandem and UNIX Nodes Example 4. submitted from the CONNECT:Direct for Tandem node.user1) copy from (file=$B.node snodeid=(user.#SPLFILB DISP=NEW SNODE) PROCESS - Copying Between Tandem and OS/400 Nodes Example 4.4-38 CONNECT:Direct Process Guide Concepts and Examples Example 4. The Tandem file is translated from ASCII to EBCDIC.PASSWRD) COPY FROM (DSN=$SYSTEM.smith.TANA SNODE=CD. SPLPROC STEP01 PNODE=CD.#SPLFILA SYSOPTS=("SET SPOOLER=$SPLA" "SET SPOOLNUM=3722") DISP=SHR PNODE) TO (DSN=\SYSB. The Tandem file being copied has a job number of 3722 and a location (name) of #SPLFILA. will copy datafile in $B.SOURCE.

The Process is submitted on the Tandem node.83: Copying Binary Files from Tandem to UNIX This Process. submitted from the CONNECT:Direct for Tandem node. Use this Process when you copy files from Tandem to VM. TOBIN01 STEP01 SNODE=cd.’ COPY FROM DSN=$B.191) DISP=(RPL) DCB=(RECFM=F.BOSTON SNODEID=(IDXXXX.v1200 snodeid=(user. EBCDIC-to-ASCII translation is requested with the SYSOPTS parameter SET XLATE ON. All SYSOPTS keyword values must be enclosed in parentheses.VM.unixdata.unixdata.SMITH. and the entire SYSOPTS string must be enclosed in double quotation marks.DATAFILE DISP=(SHR) SYSOPTS=("SET XLATE ON") PNODE) TO (DSN=’TEST FILE’ LINK=(TRA. BLKSIZE=80) SNODE) PROCESS - STEP01 . LRECL=80. PASSWD) SACCT=’TRANSFERRING FROM TANDEM TO VM.pswd) COPY FROM (DSN=$user. will copy a file in $user.cdcom to a binary file on the CONNECT:Direct for UNIX node.TX SNODE=CD.Chapter 4 / COPY Statement Examples 4-39 Example 4.WPSWD.84: Copying Files from Tandem to VM This Process illustrates the transmission of a file from a Tandem node to a VM node.W.cdcom PNODE SYSOPTS=(’SET XLATE OFF’) DISP=SHR) TO (dsn=’tdata/cdcomu’ SNODE SYSOPTS=":datatype=binary:" DISP=RPL) PROCESS - Copying Between Tandem and VM Nodes Example 4. TANTOVM PNODE=DALL.

the CONNECT:Direct system assumes the file is a VSAM file.DALLAS SNODE=BOSTON.RR.85: Copying a VSAM File from VM to an Entry-Sequenced Tandem File The following Process copies a VM VSAM file to an entry-sequenced Tandem file.87: Copying a Tandem Key-Sequenced File to a CONNECT:Direct for OpenVMS Node This Process.210. The entry-sequenced file with extents of 100 pages each is created as indicated by the SYSOPTS parameter.VMS COPY FROM (PNODE FILE=$B. Note that the VM file name is not enclosed in single quotation marks.VM.TANDEM SNODE=CD.RR.VM. copies a key-sequenced file to the CONNECT:Direct for OpenVMS node.DAT’ DCB=(DSORG=KSDS LRECL=100 KEYLEN=10 RECFM=F) DISP=RPL) - .JONES) COPY FROM (DSN=ABC.RIVVB6.86: Copying a VSAM File from VM to a Key-Sequenced Tandem File The following Process copies a VM VSAM file to a key-sequenced Tandem file.200)) TO (DSN=$C.01 NOTIFY=%USER SNODEID=(127. The key-sequenced file with extents of 100 pages each is created as indicated by the SYSOPTS parameter.RPTFILE LINK=(IVVB6.ABC. submitted from the CONNECT:Direct for Tandem node. SEND1 STEP01 PROCESS PNODE=CD.200)) TO (DSN=$C.DALLAS HOLD=YES SNODE=BOSTON.JONES.VSAMERR SNODE SYSOPTS=\"’SET EXT(100 100)’\ || \ ’SET KEYLEN 8’\ || \ ’SET REC 880’\ || \ ’SET TYPE K’"\ DISP=(RPL)) PROCESS - SEND01 Copying Between Tandem and OpenVMS Nodes Example 4.RIVVB6. Because the VM file name is not placed between quotation marks.SMITH) COPY FROM (DSN=ABC.KSDS DISP=SHR) COMPRESS PRIMECHAR=C’*’ TO (SNODE FILE=’[DUC4:-DATA. OpenVMS file names must be in single quotation marks. When Processes are submitted from CONNECT:Direct for Tandem to CONNECT:Direct for OpenVMS nodes. If the VM file name is not placed between quotation marks.200. the CONNECT:Direct system assumes the file is a VSAM file. Note that COMPRESS is coded between the FROM and TO clauses of the COPY statement.01 NOTIFY=%USER SNODEID=(127.TESTF. TANDEM2 PNODE=CD. TANDEM6 PNODE=CD.FILE]KSDS1.TST LINK=(IVVB6.4-40 CONNECT:Direct Process Guide Concepts and Examples Example 4.VSAME SNODE SYSOPTS=\"’SET EXT(100 100)’\ || \ ’SET TYPE E’"\ DISP=(RPL)) PROCESS - SEND01 Example 4.

LOAD Y") PROCESS - Copying Between Tandem and VSE Nodes Example 4.TANDEM SNODEID=(GRP. The FASTLOAD option is used to reduce disk I/O overhead.DAT) TO (DSN=$B. submitted from the OpenVMS node. DSORG=PS) SNODE) - TAN_VSE .PSWD) SACCT=’CHARGE TO GROUP 199’ COPY FROM (DSN=&FROM SYSOPTS=("SET XLATE ON") PNODE) TO (DSN=&TO UNIT=DLBLONLY DISP=(OLD) DCB=(RECFM=FB.VMS SNODE=CD.88: Copying an OpenVMS Key-Sequenced File to a CONNECT:Direct for Tandem Node This Process.USR. the XLATE subparameter will turn on the text conversion utility and translate from EBCDIC to ASCII. XLATE translates the file from ASCII to EBCDIC. LRECL=80.PASWRD) COPY FROM (DSN=[USER.89: Copying Files from Tandem to VSE This Process illustrates the transmission of files from a Tandem node to a VSE node.DATA]KSDS1.NODE SNODEID=(IDXXXX.VSE. BLKSIZE=80. Because the CONNECT:Direct for OpenVMS system translates ASCII characters to EBCDIC. will copy a key-sequenced file to the CONNECT:Direct for Tandem node. When copying files from CONNECT:Direct for OpenVMS to CONNECT:Direct for Tandem nodes.NODE SNODE=CD.Chapter 4 / COPY Statement Examples 4-41 Example 4. Symbolics will be resolved at submission. SEND2VSE PROCESS PNODE=BOSTON. The parameter XLATE must be set to ON and positioned in the Process where the Tandem file is specified.DATA. VAXSND STEP1 PNODE=CD. include SET XLATE ON in the SYSOPTS parameter of the TO clause of the COPY statement.KSDS DCB=(DSORG=K BLKSIZE=4096 LRECL=100 KEYLEN=10) DISP=RPL SYSOPTS="SET XLATE ON FAST.

VSAM DISP=RPL DCB=(DSORG=VSAM) PNODE) TO (DSN=\$SUP1.TSTPROC.TANUSR) COPY FROM (DSN=VSE.VSETEST DISP=NEW SYSOPTS=\"’SET XLATE ON\ \ .456.NODE) SNODEID=(123. The transfer is initiated by the VSE node.blanks=yes:" pnode) pend .node copy from (file=blank. EXT= (100. REC=100\ \ .100)’"\) SNODE) PROCESS - STEP01 Copying Between UNIX Nodes Example 4.dat sysopts=":datatype=text:" snode) to (file=blank_no sysopts=":datatype=text:strip.TEST. The sysopts parameter specifies to remove trailing blank characters from a line of text before writing it to a text file.NODE SNODEID=(TANDEM. strip step01 process snode=unix. The SYSOPTS SET XLATE ON parameter enables ASCII to EBCDIC translation.91: Copying a VSE VSAM File to a Tandem Node This Process copies a VSE VSAM file to a Tandem ESDS file. VSE2TAN PNODE=SC. The transfer is initiated by the VSE node.VSAM DISP=RPL DCB=(DSORG=VSAM) PNODE) PROCESS - STEP01 Example 4. VSE2TAN PNODE=SC.NODE1 SNODE=TANDEM.$SUP1. The sysopts subparameters are a series of field names and values.SENDTEST’ DISP=SHR SYSOPTS="SET XLATE ON" SNODE) TO (DSN=VSE.NODE1 SNODE=TANDEM.TANUSR) COPY FROM (DSN=’\CLX.4-42 CONNECT:Direct Process Guide Concepts and Examples Example 4.XFILES.TEST. TYPE=E\ \ .92: Copying Files and Using sysopts (UNIX to UNIX) This Process copies a file between two UNIX nodes.90: Copying a Tandem File to a VSE VSAM File This Process copies a file from a Tandem node to a VSE VSAM file.NODE SNODEID=(TANDEM.VSE.NODE) SNODEID=(123. The SYSOPTS SET XLATE ON parameter enables EBCDIC to ASCII translation.VSE.456. each of which is delimited by a colon and enclosed in double quotation marks.

which reduces the amount of data transmitted as the file is copied from one node to another. The compress parameter specifies that data is to be compressed.Chapter 4 / COPY Statement Examples 4-43 Example 4. v Step02 specifies use of character 1 as a compression character. comp step01 process copy snode=unix. ckpt01 step01 process snode=unix. Code the compress parameter between the FROM and TO clauses of the COPY statement. .node snodeid=(userid. the CONNECT:Direct system will restart that COPY step at the last checkpoint. The ckpt parameter specifies that checkpoints will be taken at 128K intervals. Code the ckpt parameter between the FROM and TO clauses of the COPY statement.93: Copying Files and Using the Checkpointing Feature (UNIX to UNIX) This Process copies a file between two UNIX nodes. The file is automatically decompressed at the destination. CMP specifies the compression level. If the COPY operation is interrupted.passwrd) from (file=text2 snode) compress to (file=file3 pnode) from (file=text2 snode) compress primechar=c’1’ to (file=file3 pnode) from (file=text2 snode) compress primechar=x’11’ to (file=file3 pnode) from (file=text2 snode) compress extended [=(CMP=1 WIN=9 MEM=1 ) ] to (file=file3 pnode) step02 copy step03 copy step04 copy pend.94: Copying Files and Using the Compression Feature (UNIX to UNIX) This Process shows the syntax of the compress parameter. as a compression character. v Step04 specifies use of the extended compression method. Compression activities for each step are as follows: v Step01 specifies use of hex 20. v Step03 specifies use of hex 11 as a compression character. WIN specifies the window size.node copy from (file=file1 snode) ckpt=128k to (file=file2 disp=new pnode) pend Example 4. the default. MEM specifies the memory level. Use this Process when you copy files from UNIX to UNIX using the compress parameter.

pipe_ex2 process snode=testcdu step01 copy from (file=unix. No checkpointing occurs when pipe=yes is specified.95: Archiving Files Using the CONNECT:Direct for UNIX Pipe I/O Function This Process changes the pnode directory to the se subdirectory. No checkpointing occurs when pipe=yes is specified.se. . Example 4. No checkpointing occurs when pipe=yes is specified.97: Archiving and Restoring Files in a Single Step Using the CONNECT:Direct for UNIX Pipe I/O Function This Process changes the pnode directory to the se subdirectory.c files in the se subdirectory using the tar command. tar -xf -” snode sysopts=“:pipe=yes:”) pend. tar -xf -” pnode sysopts=“:pipe=yes:”) pend.c files in the se subdirectory using the tar command. and then transfers the archive to the snode. then transfers the archive to the snode.4-44 CONNECT:Direct Process Guide Concepts and Examples Example 4.tar snode) to (file=“cd se. this Process changes the directory to the testdir subdirectory and extracts the *. pipe_ex1 process snode=testcdu step01 copy from (file=“cd se.c files from the archive using the tar -xf command. At the snode.96: Restoring Files Using the CONNECT:Direct for UNIX Pipe I/O Function This Process copies a tar archive from the snode and extracts files from the archive. pipe_ex3 process snode=testcdu step01 copy from (file=“cd se. archives all the *.c” pnode sysopts=“:pipe=yes:”) to (file=unix.*.c” pnode sysopts=“:pipe=yes:”) to (file=“cd testdir. Example 4. tar -cf .tar snode disp = rpl) pend. tar -cf .*.se. archives all the *.

* COPY TO MEMBER * copy01 process step01 snode=os400 snodeid=(userid. * COPY TO SPOOL FILE * copy01 process snode=os400 snodeid=(userid. Example 4.100: Copying Save Files from OS/400 to UNIX This Process copies a save file from OS/400 to UNIX. Example 4.passwrd) step01A copy from (file="URGRSSSV1/SAVEFILE1" snode sysopts="TYPE(OBJ)") compress to (file=/cd/usavefile1 sysopts=":datatype=binary:permiss=774:" pnode disp=new) pend. See the CONNECT:Direct for OS/ 400 User’s Guide for the spool file parameters.99: Copying Files from UNIX to a Member on OS/400 This Process copies an ASCII file from UNIX to a spool file on the OS/400.98: Copying Files from UNIX to a Member on OS/400 This Process copies an ASCII file from UNIX to a member on the OS/400.passwrd) step01 copy from (file=/cd/file1 pnode sysopts=":datatype=text:xlate=yes:") to (file=FILE2 snode sysopts="TYPE( SPLF ) PRTQLTY( *NLQ )" disp=rpl) pend.passwrd) copy from (file=/cd/file1 pnode sysopts=":datatype=text:xlate=yes:") to (file="LIB/FILENAME(MBR_NAME)" sysopts="TYPE( MBR )" disp=rpl) pend. * COPY SPECIFYING DCB INFORMATION * copy01 process snode=os400 snodeid=(userid.Chapter 4 / COPY Statement Examples 4-45 Copying Between UNIX and OS/400 Nodes Example 4. .

* COPY SPECIFYING DCB INFORMATION * copy02 process snode=os400 snodeid=(userid. * COPY UNIX EXECUTABLE TO OS/400 * copy01 process snode=os400 snodeid=(userid.nw.103: Copying Files from UNIX to NetWare This Process copies an ASCII file from UNIX to a text file on CONNECT:Direct for NetWare.v1100 snodeid=(user01.passwrd) step01 copy from (file=/cd/xdt3 sysopts=":datatype=binary:permiss=777:" pnode) to (snode file="CD/BINARY(UDESKTOP)" sysopts="TYPE(MBR) FILETYPE(*DATA)" disp=new) Copying Between UNIX and NetWare Nodes Example 4. Specify FILETYPE(*DATA) in the sysopts parameter. netware step1 snode=cd.101: Copying Save Files from UNIX to OS/400 This Process copies a save file from UNIX to OS/400. Set datatype=binary for save files.passwrd) step02B copy from (file=/cd/usavefile1 sysopts=":datatype=binary:permiss=774:" pnode) compress to (file="URGRSSSV1/SAVEFILE1" snode sysopts="TYPE(OBJ) MAXRCDS(*NOMAX)" disp=new) pend.pswd01) copy from (file=testfile sysopts=":datatype=text:" pnode) ckpt=0k to (file=DATA1:\OUTPUT\UNIX.4-46 CONNECT:Direct Process Guide Concepts and Examples Example 4. Example 4. Specify DCB information to copy a save file to OS/400.TXT sysopts="DATATYPE(TEXT)" snode disp=rpl) pend process .102: Copying Executables from UNIX to OS/400 This Process copies an executable from UNIX to OS/400.

dat pnode) to (file=d:\users\data\in\invoi01.11.blanks=yes:" pnode) pend . The sysopts parameter specifies to remove trailing blank characters from a line of text before writing it to a text file.105: Copying Files and Using sysopts (Stratus VOS to Stratus VOS) This Process copies a file between two Stratus VOS nodes.dat" copy from (file=&file1 pnode) to (file=&file2 sysopts="datatype(binary)" snode) pend.104: Copying a File from UNIX to Windows 95/NT This Process copies a binary file from a UNIX node to a Windows 95/NT node. copy1 Copying Between Stratus VOS Nodes Example 4.111 &file1="/usr/data/out/invoi01.dat" &file2="d:\users\data\in\invoi01.11. In this example.dat sysopts="datatype(binary)" snode) pend.node copy from (file=%mymodule#m1_d01>cds>cfg>mynode>data>myfile sysopts=":datatype=text:" snode) to (file=%mymodule2#m1_d01>cdcfg>mynode>data>xyz sysopts=":datatype=text:strip. strip step01 process snode=VOS. A TCP/IP address is specified instead of the CONNECT:Direct node name for the SNODE.111 hold=no retain=no copy from (file=/usr/data/out/invoi01. The sysopts subparameters are a series of field names and values. copy1 The following Process is a variation on the previous example.Chapter 4 / COPY Statement Examples 4-47 Copying Between UNIX and Windows 95/NT Nodes Example 4.11. each of which is delimited by a colon and enclosed in double quotation marks. proc1 process snode=111.11. 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. ux2nt process snode=111.

Code the compress parameter between the from and to clauses of the copy statement. v Step02 specifies use of character 1 as a compression character. The file is automatically decompressed at the destination. Code the ckpt parameter between the from and to clauses of the copy statement. Compression activities for each step are as follows: v Step01 specifies use of hex 40. the default. If the copy operation is interrupted. .node copy from (file=%mymodule#m1_d01>cds>cfg>mynode>data>myfile snode) ckpt=128k to (file=%mymodule2#m1_d01>cdcfg>mynode>data>xyz disp=new pnode) pend Example 4. The compress parameter specifies that data is to be compressed. ckpt01 step01 process snode=VOS. the CONNECT:Direct system will restart that copy step at the last checkpoint.4-48 CONNECT:Direct Process Guide Concepts and Examples Example 4.107: Copying Files and Using the Compression Feature (Stratus VOS to Stratus VOS) This Process shows the syntax of the compress parameter. v Step03 specifies use of hex 11 as a compression character.106: Copying Files and Using the Checkpointing Feature (Stratus VOS to Stratus VOS) This Process copies a file between two Stratus VOS nodes. v Step04 specifies use of the extended compression method. which searches for repetitive strings of data. which reduces the amount of data transmitted as the file is copied from one node to another. The ckpt parameter specifies that checkpoints will be taken at 128K intervals. as a compression character.

Code the ckpt parameter between the FROM and TO clauses of the COPY statement. The ckpt parameter specifies that checkpoints will be taken at 128K intervals. comp step01 process snode=VOS. ckpt01 step01 process snode=vme. the CONNECT:Direct system restarts the COPY step at the last checkpoint.node copy from (file=%mymodule#m1_d01>cdcfg>mynode>data>text2 snode) compress to (file=%mymodule2#m1_d01>cdcfg>mynode>data>file3 pnode) copy from (file=%mymodule#m1_d01>cdcfg>mynode>data>text2 snode) compress primechar=c’1’ to (file=%mymodule2#m1_d01>cdcfg>mynode>data>file3 pnode) copy from (file=%mymodule#m1_d01>cdcfg>mynode>data>text2 snode) compress primechar=x’11’ to (file=%mymodule2#m1_d01>cdcfg>mynode>data>file3 pnode) copy from (file=%mymodule#m1_d01>cdcfg>mynode>data>text2 snode) compress extended [=(CMP=1 WIN=9 MEM=1 ) ] to (file=%mymodule2#m1_d01>cdcfg>mynode>data>file3 pnode) pend step02 step03 step04 Copying Between OpenVME Nodes Example 4.108: Copying Files and Using the Checkpointing Feature (OpenVME to OpenVME) This Process copies a file between two OpenVME nodes. If the COPY operation is interrupted.node copy from (file=newpmts snode) ckpt=128k to (file=newpmts disp=new pnode) pend .Chapter 4 / COPY Statement Examples 4-49 Use this Process as an example of copying files from Stratus VOS to Stratus VOS using the compress parameter.

11.dat sysopts=":datatype(binary):" snode) pend. If the COPY operation is interrupted.11. The sysopts parameter specifies to remove trailing blank characters from a line of text before writing it to a text file.109: Copying Files and Using SYSOPTS (OpenVME to UNIX) This Process copies a file from an OpenVME node to a UNIX node. Code the ckpt parameter between the FROM and TO clauses of the COPY statement.4-50 CONNECT:Direct Process Guide Concepts and Examples Copying Files Between OpenVME and UNIX Example 4. the CONNECT:Direct system will restart that COPY step at the last checkpoint. copy1 .node copy from (file=pmts1 snode) ckpt=128k to (file=pmts2 disp=new pnode) pend Copying Files Between OpenVME and Windows 95/NT Example 4.blanks=yes:" pnode) pend Example 4. ux2nt process snode=111. each of which is delimited by a colon and enclosed in double quotation marks.dat sysopts=":datatype=text:" snode) to (file=arch_no sysopts=":datatype=text:strip. strip step01 process snode=unix. The ckpt parameter specifies that checkpoints will be taken at 128K intervals. ckpt01 step01 process snode=vme.110: Copying Files and Using the Checkpointing Feature (UNIX to OpenVME) This Process copies a file from UNIX to OpenVME. The sysopts subparameters are a series of field names and values. A TCP/IP address is specified instead of the CONNECT:Direct node name for the SNODE.111: Copying a File from OpenVME to Windows 95/NT This Process copies a binary file from an OpenVME node to a Windows 95/NT node.node copy from (file=arch.dat pnode) to (file=d:\acct1\in\tue07.111 hold=no retain=yes copy from (file=/acct1/out/tue07.

RIVVB7.115: VM to VM Group File Copy This Process illustrates a VM group file copy.RR. Because a copy to VM spool does not involve writing to disk. TAPE STEP01 PROCESS SNODE=CD. VM2RDR2 STEP01 PROCESS SNODE=CD.114: Copying from Disk to Tape This Process copies a VM disk file from the 191 disk of IVVB8 to tape. This causes the CONNECT:Direct for VM system to send members of the group beginning . you do not need to specify link information.ONE UNIT=TAPE LABEL=(1.112: Copying a VM File to VM Spool This Process copies a file to the VM reader of user RJONES. as well as a group name.113: Copying an Entire Minidisk This example shows the COPY statement of a Process that copies an entire minidisk to another minidisk (301).W.199) DISP=SHR) TO (GROUP=‘%1% %2%’ LINK=(N4100.301) DISP=RPL) - Example 4.191)) TO (DSN=’!SPOOL RJONES TEST DATA’ DCB=(DSORG=PS.LRECL=80.READPW.VM.VM.RECFM=F.EXPDT=900967) SNODE DISP=RPL) - Example 4.191) DISP=SHR) TO (DSN=TEST.SL. which copies source modules from one minidisk to a minidisk at another site.RMDSKI. STEP01 COPY FROM (GROUP=‘* *’ LINK=(MDSKI. Notice that a source file name.BLKSIZE=80)) - Example 4.WN14100.RR.RR. is specified on the FROM clause of the COPY statement.NODE NOTIFY=CDA8 COPY FROM (DSN=’TEST FILE’ LINK=(IVVB8.Chapter 4 / COPY Statement Examples 4-51 Copying Between VM Nodes Example 4.EXPDT.JSMITH NOTIFY=RJONES COPY FROM (DSN=’JIM SCRIPT’ LINK=(RRT.

which are used to build the destination name.191) DISP=SHR) TO (GROUP=’%1% A%2%’ LINK=(IVVB6. therefore.301) DISP=RPL) - The parameter GROUP on the TO clause contains the special symbols %1% and %2%. Each step performs the following task: v STEP1 copies a CMS file in a SFS to another SFS.RIVVB7. if the file exists. 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 After the transfer completes. CDA7 191. CONNECT:Direct replaces it. If the file does not exist.W. the CDA6 300 disk contains: CF2C 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. the CONNECT:Direct system creates it as indicated by the DISP=RPL parameter. v STEP5 copies a VSAM ESDS to a sequential file in a SFS. The source disk.116: Copying VM files to a Shared File System (SFS) This multi-step Process copies several different types of VM files to a SFS.RR.VM. members of a group are excluded from the transfer.WIVVB6. Each symbol is replaced by characters from the name determined to be in that source group. v STEP3 copies a VSAM RRDS to a sequential file in a SFS. All of the files (input and output) are fixed length 80 byte records.4-52 CONNECT:Direct Process Guide Concepts and Examples with that source file name instead of beginning with the first member of the group. v STEP2 copies a CMS file from a Minidisk to a SFS. Example 4.NODE COPY FROM (DSN=’ACF2C A*’ GROUP=’* A*’ LINK=(IVVB7. In each step. v STEP4 copies a VSAM KSDS to a sequential file in a SFS. GROUP9 STEP01 PROCESS SNODE=CD. .

NODE1 SNODE=&SNODE COPY FROM ( PNODE SFSDIR=("&DIR1") DSN=’MYINPUT FILE’ DISP=SHR ) CKPT=&CKPT &COMPRESS &EXT TO ( SNODE SFSDIR=("&DIR2") DSN=\’FILETEST\&PROCESS.DSORG=PS) DISP=SHR ) CKPT=&CKPT &COMPRESS &EXT TO ( SNODE SFSDIR=("&DIR2") DSN=\’FILETEST\&PROCESS.RECFM=F) DISP=RPL ) COPY FROM ( PNODE LINK=(&INUSER. &CUU1=0199 &CUU2=0195 &DIR1=’MYSFS:USER01.RR.&INUSERP.1\’\ DCB=(LRECL=80.2\’\ DCB=(LRECL=80.Chapter 4 / COPY Statement Examples 4-53 SFSPROC STEP1 STEP2 PROCESS &PROCESS=SFSPROC &CKPT=0K &COMPRESS=COMPRESS &EXT=.&CUU1) DSN=’MYINPUT FILE2’ DCB=(LRECL=80.PASSWD) &SNODE=CD.MYSFS’ &DIR2=’COSFS:USER02.RECFM=F.COSFS’ &INUSER=USER01 &INUSERP=RPASS SNODEID=(USERID.RECFM=F) DISP=RPL ) - Continued .VM.

BLKSIZE=3120) DISP=RPL ) &COMPRESS &EXT - .VKSDS.FB80 DCB=(DSORG=VSAM) DISP=SHR ) CKPT=&CKPT TO ( SNODE SFSDIR=("&DIR2") DSN=\’FILETEST\&PROCESS.RR.LRECL=80.LRECL=80.&CUU2) DSN=MYHLQ.RR.4\’\ DCB=(RECFM=FB.TESTFILE.&INUSERP.3\’\ DCB=(RECFM=FB.BLKSIZE=3120) DISP=RPL ) FROM ( PNODE LINK=(&INUSER.5\’\ DCB=(RECFM=FB.&INUSERP.VRRDS.RR.&INUSERP.FB80 DCB=(DSORG=VSAM) DISP=SHR ) CKPT=&CKPT TO ( SNODE SFSDIR=("&DIR2") DSN=\’FILETEST\&PROCESS.TESTFILE.TESTFILE.LRECL=80.FB80 DCB=(DSORG=VSAM) DISP=SHR ) CKPT=&CKPT &COMPRESS &EXT TO ( SNODE SFSDIR=("&DIR2") DSN=\’FILETEST\&PROCESS.4-54 CONNECT:Direct Process Guide Concepts and Examples STEP3 COPY ( FROM PNODE LINK=(&INUSER.BLKSIZE=3120) DISP=RPL &COMPRESS &EXT - STEP4 COPY STEP5 COPY ( ) FROM PNODE LINK=(&INUSER.&CUU2) DSN=MYHLQ.VESDS.&CUU2) DSN=MYHLQ.

RR.NODE NOTIFY=USER1 COPY FROM (DSN=’PROFILE EXEC’ SFSDIR=(’CDSFS:USER1.Chapter 4 / COPY Statement Examples 4-55 Example 4.DAT’ DISP=OLD) - Copying Between VM and OS/2 Warp Nodes Example 4.118: Copying Files from VM to OpenVMS This Process copies an existing VM file to an existing OpenVMS file.TOM.192) DSN=’TESTFILE FB80S’ DISP=SHR ) TO (SNODE DSN=’C:\OUTPUT\VM\DATA’ DISP=RPL) - .’) TO (DSN=’!SPOOL USER1 TSET DATA’) - Copying Between VM and OpenVMS Nodes Example 4. Note that the format of the SFSDIR statement must end with a period when only the main directory is referenced.UNISEF) COPY FROM (DSN=’TEST FILE’ LINK=(SE9GWWT.RR.119: Copying Files from VM to OS/2 Warp This Process copies a VM CMS file to an OS/2 WARP node.OS2WARP SNODEID=(USER1.191) DISP=SHR PNODE) TO (DSN=’DISK:<RGL>VMTEST.117: Extracting an SFS File and Placing the File on the VM Reader Spool In this example. PROC01 STEP1 PROCESS SNODE=CD. VMSTEST COPY01 PROCESS SNODEID=(RGL.ALL.PASSWD1) COPY FROM ( PNODE LINK=(MYUSR1. TESTSFS STEP01 PROCESS SNODE=CSD. one file is being extracted from the CDSFS filepool to be placed upon a VM reader spool.VM.

AMFTAPE STEP01 PROCESS SNODE=CD. The file is copied to the CDUSR CMS ID. v STEP03 copies to a DYNAM/D file using a TYPEKEY containing DCB information. v STEP05 copies a sequential file to a DYNAM/D file (not previously defined). The DYNAM/D file has different DCB information specified.FILE DISP=SHR UNIT=DLBLONLY DCB=(DSORG=PS. RPL specifies the Process is to allocate the file NEW using the DCB information. Note that DCB information and the disposition of RPL are specified.VM.RR.NODE1 COPY FROM (DSN=VSE.BLKSIZE=8000. v STEP04 copies to an existing DYNAM/D file that has not been defined to DYNAM/D.202) DISP=SHR) TO (DSN=’DYNAM.WIVB4100.301) SNODE) - Example 4. v STEP01 and STEP02 copy to a DYNAM/D file that has not been defined to DYNAM/D.4-56 CONNECT:Direct Process Guide Concepts and Examples Copying Between VM and VSE Nodes Example 4. .RECFM=FB) PNODE) TO (DSN=’VMDYND TEMP02’ DISP=RPL LINK=(CDUSR. If the VSE file does not exist.120: Copying a VM Sequential File to a CA-DYNAM/T Tape File (VSE) This Process copies a sequential file to a DYNAM/T volume tape file.122: Copying VM Sequential Files to CA-DYNAM/D Files (VSE) This multi-step Process shows various ways of copying sequential files to DYNAM/D.TAPE***’ DCB=(DSORG=PS BLKSIZE=3200 LRECL=80 RECFM=F) DISP=RPL UNIT=TNOASGN SNODE) - Example 4.NODE1 SNODE=SC.NODE NOTIFY=%USER COPY FROM (DSN=’TESTA INPUT’ LINK=(IVB4100.VSE.LRECL=80.121: Copying a DYNAM-Controlled File to a VM Node This Process copies a DYNAM-controlled file from a VSE node to a VM node.XCDUSR.RR.VSE. VSE2VM STEP01 PROCESS PNODE=SC.DYNAM.

VSE2VM STEP01 PROCESS PNODE=SC.202) PNODE DISP=SHR) TO (DSN=’VSE.STEP05’ DCB=(DSORG=PS BLKSIZE=1000 LRECL=100 RECFM=F) UNIT=DNOASGN VOL=SER=POOLNAME SNODE DISP=RPL) - Example 4.202) PNODE DISP=SHR) TO (DSN=’VSE.NODE1 COPY FROM (DSN=VSE.RR.NODEF.VSE.RR.NODE1 SNODE=SC.STEP03’ TYPE=DYNAMD SNODE DISP=RPL) STEP04 COPY FROM (DSN=’TESTA INPUT’ LINK=(IVB4100.RIVB4100.XCDUSR.202) PNODE DISP=SHR) TO (DSN=’VSE.RR.DYNAM.NODEF.VM.NODEF.RIVB4100.RR.RIVB4100.RR.RIVB4100.VSE.FILE TYPE=DYNAMD PNODE) TO (DSN=’VMDYND TEMP02’ DISP=RPL LINK=(CDUSR.Chapter 4 / COPY Statement Examples 4-57 NODEFINE PROCESS SNODE=CD.RR. DCB and UNIT information is supplied through a TYPEKEY named DYNAMD.123: Using a Typekey to Copy a DYNAM-Controlled File to a VM Node This Process copies a DYNAM-controlled file from a VSE node to a VM node.NODEF.202) PNODE DISP=SHR) TO (DSN=’VSE.RSMI4100.301) SNODE) - .NODEF.NODE STEP01 COPY FROM (DSN=’TESTA INPUT’ LINK=(IVB4100.STEP03’ DCB=(DSORG=PS BLKSIZE=3200 LRECL=80 RECFM=F) UNIT=DNOASGN SNODE DISP=RPL) STEP05 COPY FROM (DSN=’TESTC INPUT’ LINK=(SMI4100.202) PNODE DISP=SHR) TO (DSN=’VSE.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.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.

PASSWD1) ************************************************************* * STEP 1 WILL COPY SEQUENTIAL TO SEQUENTIAL ( VM TO OS400) ************************************************************* STEP1000 COPY FROM (PNODE LINK=(QACD.DSORG=PS. CKPT=0K turns off the checkpointing feature. The DSN parameter on the COPY TO side specifies the destination object name based on the OS/400 standard file naming conventions and must be in single quotation marks. TEST1 SNODE=OS400 SNODEID=(USER1.TESTFILE DCB=(DSORG=VSAM.BLKSIZE=80) DISP=SHR CKPT=0K TO (SNODE DSN=’TEST/PDS(STEP1000)’ SYSOPTS=\"\ \ TYPE ( MBR ) \ \ MAXMBRS ( *NOMAX ) \ \ RCDLEN ( 92 ) \ \ TEXT ( ’ADDED BY PROCESS TEST \ \ IN STEP1000’ ) \ \"\ DISP=RPL) PROCESS - - Example 4.RR.RECFM=F.LRECL=80) DISP=SHR) CKPT=0K TO (SNODE DSN=’TEST1/PDS(STEP2000)’ SYSOPTS=\"\ \ TYPE ( FILE ) \ \ MAXMBRS ( *NOMAX ) \ \ RCDLEN ( 92 ) \ \ TEXT ( ’ADDED BY PROCESS TEST1 \ \IN STEP2000’ ) \ \"\ DISP=RPL) PROCESS - - . TEST SNODE=OS400 SNODEID=(USER1.191) DSN=’TESTFILE’ DCB=(LRECL=80.RQACD.PASSWD1) ****************************************************************** * STEP 2000 WILL COPY VSAM TO SEQUENTIAL (VM TO OS400) ****************************************************************** STEP2000 COPY FROM (PNODE LINK=(QACD.125: Copying VSAM Files from VM to OS/400 This Process copies a VSAM file from a CONNECT:Direct for VM node to a sequential file on a CONNECT:Direct for OS/400 node.RR. The SYSOPTS parameter specifies that the data is to be copied to the CONNECT:Direct for OS/400 node as a member of a physical database file.192) DSN=SCQA1. CKPT=0K turns off the checkpointing feature.RQACD.4-58 CONNECT:Direct Process Guide Concepts and Examples Copying Between VM and OS/400 Nodes Example 4.124: Copying Files from VM to OS/400 This Process copies a sequential file from a CONNECT:Direct for VM node to an OS/400 node.

The contents of the SYSOPTS parameter specifies that the object being copied is to be transferred in save object format.RQACD. TEST3 PROCESS SNODE=OS400 SNODEID=(USER1.LRECL=528.PASSWD1) ******************************************************************** * VM TO OS400 COPY OF A FILE TO OS400 SPOOL (VM INITIATED) ******************************************************************** STEP5000 COPY FROM (PNODE LINK=(QACD.W. TEST2 SNODE=OS400 SNODEID=(USER1. FILE ’ SYSOPTS=\"\ \ TYPE ( OBJ ) \ \"\) TO (DSN=’IAOB001 REGRESS1’ LINK=(QACD.PASSWD1) ******************************************************************* * COPY PROCESS FROM OS400 TO VM (VM INITIATED) ****************************************************************** STEP4000 COPY FROM (SNODE DSN=’ TEST2 / SAVEFILE1 .BLKSIZE=5280.WQACD.192) DCB=(RECFM=FB.126: VM-Initiated Copy from OS/400 to VM This Process is initiated from the CONNECT:Direct for VM/ESA to copy a file from an OS/400 node to a VM node.Chapter 4 / COPY Statement Examples 4-59 Example 4.DSORG=PS) DISP=NEW PNODE) PROCESS - - Example 4.127: VM-Initiated Copy VM to OS/400 Spool This Process is initiated from the CONNECT:Direct for VM/ESA to copy a file from a VM node to a spooled output file on an OS/400 node.RR.191) DSN=’OS400 REP1’ DISP=SHR) TO (SNODE DSN=TEST DISP=RPL SYSOPTS=\"\ \ TYPE ( SPLF ) \ \ CTLCHAR ( *FCFC ) \ \ PRTQLTY( *NLQ ) \ \"\) - - .

195) DCB=(DSORG=VSAM.FB80S LINK=(VSAMDSK.DALLAS SNODEID=(USER1.NDOEY (DSN=MYNAME.VSAMTST.128: VM-Initiated Copy from OS/400 to VM Spool This Process is initiated from the CONNECT:Direct for VM/ESA to copy a physical database file member from a CONNECT:Direct for OS/400 node to a VM spool file.TESTFILE.4-60 CONNECT:Direct Process Guide Concepts and Examples Example 4. If the file exists.OS390.RPASWD. If the file does not exist.129: Copying a VM VSAM file to OS/390 This Process copies a VSAM Disk from a VM/ESA node to a sequential disk file on an OS/390 node.LRECL=80. CONNECT:Direct creates it as indicated by the DISP parameter.RECFM=FB..BLKSIZE=3120) DISP=RPL SNODE) - TO .RR. VSMtoOS390 PROCESS COPY FROM SNODE=CD.VESDS.LRECL=80) DISP=SHR PNODE) (DSN=HLQ. CONNECT:Direct replaces it. TEST3 SNODE=CD.FILE UNIT=SYSDA DCB=(DSORG=PS.BLKSIZE=80)) PNODE) PROCESS - - Copying a VM VSAM file to OS/390 Example 4.PASSWD1) ********************************************************************* * OS400 TO VM COPY OF A OS400 FILE TO VM SPOOL (VM INITIATED) ********************************************************************* STEP6000 COPY FROM (SNODE DSN=’ TEST / CD01 (VMTEST) ’ SYSOPTS=\"\ \ TYPE ( MBR ) \ \"\ DISP=SHR) TO (DSN=’!SPOOL VMTEST TESTFILE’ DCB=(DSORG=PS.RECFM=F.LRECL=80.

OS390.191) DISP=SHR PNODE) TO (DSN=HLQ.unix.Chapter 4 / COPY Statement Examples 4-61 Example 4.&USERPW.131: Copying a VM CMS Sequential File to UNIX This Process copies a VM CMS Sequential file to UNIX in binary format. PROC01 PROCESS &USER=MYUSR1 &COMPRESS=COMPRESS &EXT=PRIME=X’40’ &USERPW=ALL &SNODE=cd.passwdx) PNODEID=(myuser1.NODEX NOTIFY=USERID COPY FROM (DSN=’VMCMS FILE’ LINK=(USER1.FILE UNIT=SYSDA DISP=RPL SNODE) - Copying Between VM and UNIX Nodes Example 4.RR. VMTOOS390 STEP01 PROCESS SNODE=CD.RPASWWD.passwd) SNODE=&SNODE COPY FROM ( PNODE DSN=’TESTFILE STRESS01’ LINK=(&USER.BLANKS=NO:DATATYPE=BINARY:" ) - STEP1 .192) ) &COMPRESS &EXT TO ( SNODE DSN=’/tmp_mnt/home/fremont/mfinc1/hello’ DISP=(RPL) SYSOPTS=":STRIP.RR. CONNECT:Direct replaces it.VMTEST. CONNECT:Direct creates it as indicated by the DISP parameter. If the file does not exist.node SNODEID=(userx.130: Copying a CMS Disk File to an OS/390 Node This Process copies a CMS Disk file from a VM/ESA node to a disk on a CONNECT:Direct for OS/390 node. If the file exists.

ALL.PASSWD) STEP1 COPY FROM ( PNODE LINK=(MYUSR1.NT.132: Copying a CMS Sequential File from VM to Windows 95 This Process copies a CMS Sequential file from VM to Windows 95.&USERPW.133: Copying a VM CMS File to Windows NT This Process copies a VM CMS file to Windows NT. PROC01 PROCESS &CKPT=0K &COMPRESS=. &CUU1=0192 &USER=MYUSR1 &USERPW=ALL &SNODE=WIN95 SNODE=&SNODE SNODEID=(MYUSER) COPY FROM ( PNODE LINK=(&USER.192) DSN=’TESTFILE FB80S’ DISP=SHR ) TO (SNODE DSN=’C:\OUTPUT\MYDATA’ DISP=RPL) - .&CUU1) DSN=’TESTFILE STRESS04’ DISP=SHR ) CKPT=&CKPT &COMPRESS &EXT TO ( SNODE DSN=’C:\OUTPUT\VM\OUT04’ DISP=RPL ) - STEP1 Example 4.V1300 SNODEID=(USERID. &EXT=. PROC01 PROCESS SNODE=CD.RR.4-62 CONNECT:Direct Process Guide Concepts and Examples Copying VM and Windows 95/NT Nodes Example 4.RR.

NAME". SYMBOL1 STEP01 PROCESS SNODE=REMOTE_NODE COPY FROM (FILE=&FROM PNODE) TO (FILE=&TO DISP=&DISP) - The Process.TYPE". The example shows the qualifier added to the parameter. T1 STEP01 PROCESS SNODE=SC.DAT) - Example 4.134: Copying a File from Disk to Tape The following example copies an OpenVMS file from disk to tape.DAT SYSOPTS="MOUNT=’MUXX: TAPE /OVERRIDE=ID’ ") TO (FILE=DUXX:[DIRECTORY]TESTFILE.VMS. T2 STEP01 PROCESS SNODE=SC. "DISP=RPL") - Example 4. The /OVERRIDE qualifier can be added either to the MOUNT command or to the tape label parameter.135: Copying a File from Tape to Disk The following example copies an OpenVMS file from tape to disk.Chapter 4 / COPY Statement Examples 4-63 Copying Between OpenVMS Nodes Example 4.JOEUSER SNODEID=(JOEUSER.DAT) TO (FILE=MUXX:TESTFILE. Both the FROM and TO files. COPY01 DO_A PROCESS SNODE=CD.DATAMOVER COPY FROM (FILE=VMSFILE) TO (FILE=VMSLIBRARY.TLB(VMSFILE) SYSOPTS=“LIBRARY=‘TEXT’ REPLACE” DISP=RPL DCB=(DSORG=PO)) - . Specifying the /OVERRIDE qualifier causes the name of the tape volume to be ignored. can be submitted with the following command issued in DCL command format: $ NDMUI SUBMIT SYMBOL1 /SYMBOLICS=("FROM=VMS_FILENAME.PASSWORD) COPY FROM (FILE=DUXX:[DIRECTORY]TESTFILE. Specifying the /OVERRIDE qualifier causes the name of the tape volume to be ignored. "TO=OS390. as well as the file disposition.VMS.PASSWORD) COPY FROM (FILE=MUXX:TESTFILE.137: Copying a Sequential File to a Text Library This example shows the format for copying a sequential file to a text library.DATASET. are resolved at Process submission.VMS. SYMBOL1.JOEUSER SNODEID=(JOEUSER.136: Using Symbolics in a COPY Statement (CONNECT:Direct for OpenVMS) This example shows the basic use of symbolics in a Process.DAT SYSOPTS="MOUNT=’MUXX: TAPE /OVERRIDE=ID’ ") - Example 4.

LRECL=80.KEEP)) - .VMS.DSORG=PS.NODE1 SNODE=SC.RECFM=FB) UNIT=243 SPACE=(10530.TEST DCB=(BLKSIZE=24000.TEST.DSORG=PS.(45)) DISP=(NEW.TEST.VSE.RECFM=FB) UNIT=DISK VOL=SER=123456 SPACE=(10620.DATA DCB=(BLKSIZE=2400.VSE.RECFM=FB) UNIT=241 SPACE=(10620.PASSWD) COPY FROM (DSN=VSE.NODE2 PNODEID=(SUPERUSR.SUPERUSR) COPY FROM (DSN=VSE.DSORG=PS.4-64 CONNECT:Direct Process Guide Concepts and Examples Copying Between OpenVMS and VSE Nodes Example 4. PROC01 STEP01 PROCESS PNODE=SC.NODE1 SNODE=SC.LRECL=80.CKPT.(45)) DISP=SHR) CKPT=0K TO (DSN=’$SUP:<VMSUSR>DATA.(15)) DISP=SHR) CKPT=128K TO (DSN=VSE. with checkpointing at 128K intervals.DATA DCB=(BLKSIZE=2400.139: Copying a VSE Sequential File to Another VSE Sequential File This Process copies a sequential file from one VSE node to another VSE node.NODE2 SNODEID=(VMSUSR.138: Copying a VSE Sequential File to an OpenVMS Node This Process copies a VSE sequential file to an OpenVMS node.LRECL=80.VSE.TST’ SNODE) - Copying Between VSE Nodes Example 4. PROC01 STEP01 PROCESS PNODE=SC.

NODE1 SNODE=SC.SEQFILE UNIT=TAPE SPACE=(3645.TAPE DISP=NEW UNIT=TAPE DCB=(DSORG=PS.MSG DISP=SHR DCB=(DSORG=VSAM) PNODE) TO (DSN=ABC.NLTAPE UNIT=CART DCB=(DSORG=PS.VSE.RECFM=FB) LABEL=(2.RECFM=VB) LABEL=(1.NODE2 COPY FROM (DSN=ABC.VSE.RECFM=FB.LRECL=80.140: Copying a VSE Non-Labeled Tape to a VSE Sequential File This Process copies the second data set on a non-labeled tape from one VSE node to a sequential file on another VSE node.Chapter 4 / COPY Statement Examples 4-65 Example 4.(60)) DCB=(DSORG=PS.LRECL=80.VSE.SL) DISP=NEW SNODE) - .VSE.BLKSIZE=18000.NODE1 SNODE=SC.NL) VOL=SER=123456 PNODE) TO (DSN=VSE.LRECL=80.BLKSIZE=12000.BLKSIZE=14400) DISP=NEW SNODE) - Example 4.NODE2 COPY FROM (DSN=VSE.141: Copying the CONNECT:Direct Message File to SL Tape This Process copies the CONNECT:Direct for OS/390 VSAM message file to a standard label tape device on another VSE node. VSETAPE COPY01 PROCESS PNODE=SC. VSETAPE STEP01 PROCESS PNODE=SC.MSG.

TEST.LRECL=80.LRECL=80.RECFM=FB. DSK2DYD1 PROC PNODE=SC.ADDX DISP=(SHR) DCB=(DSORG=PS.RECFM=FB.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY.VSE.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY.LREC480.NODYNAM1 FROM ( PNODE DSN=LRR.LRECL=80.NODE &VSEDSN=USER01.BLKSIZE=480) VOL=SER=USER01 ) TO ( SNODE DSN=&VSEDSN DISP=(RPL) VOL=SER=USER02 SPACE=(6055.RECFM=FB.142: 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.143: Copying a Non-controlled 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.NODE SNODE=SC.BLKSIZE=800) ) TO ( SNODE DSN=&VSEDSN UNIT=DLBLONLY DCB=(DSORG=PS. PARM=(’FAIL’.BLKSIZE=13600) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.LRECL=80.NODE SNODE=SC. PARM=(’FAIL’. PARM=(’GOOD’.VSE.ADDX DISP=SHR VOL=SER=USER01 DCB=(DSORG=PS.RECFM=FB.4-66 CONNECT:Direct Process Guide Concepts and Examples Example 4.TEST. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing and uses symbolic values.VSE.GDGCOPY1 FROM ( PNODE DSN=LRR.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - .&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - Example 4.NODE &VSEDSN=GGREG1. DSK2DSK1 PROC PNODE=SC. PARM=(’GOOD’.(25)) DCB=(DSORG=PS. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing and uses symbolic values.BLKSIZE=27920) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.LREC480. The disk data set has already been defined to the appropriate system catalog.VSE.

144: Copying a Non-managed Disk File into a Start Track 1 FBA Non-controlled Data Set Use this Process to copy a Non-managed disk file into a DYNAM/D or EPIC start-track 1 FBA non-controlled data set.VSE.Chapter 4 / COPY Statement Examples 4-67 Example 4.RECFM=FB.145: Copying to Non-TMS Controlled Tapes This Process copies two non-TMS controlled tapes.USER01 &FCUU=CART &TCUU=TAPE FROM ( PNODE DSN=TEST.FILENAME FROM ( PNODE DSN=LRR.SL.DYNAM.BLKSIZE=27920) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY. This Process uses symbolic values.RECFM=FB.BLKSIZE=800) ) TO ( SNODE DSN=NON.LREC480.LRECL=80.FILE UNIT=&FCUU LABEL=(1.TAPE UNIT=&TCUU LABEL=(1.NODE &VSEDSN=USER01. PARM=(’GOOD’.BLKSIZE=16000) ) COMPRESS - STEP001 COPY . PARM=(’FAIL’.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - Example 4.BLKSIZE=800) ) TO ( SNODE DSN=&VSEDSN VOL=SERUSER04 UNIT=DNOASGN LABEL=(. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing and uses symbolic values.LRECL=80.ADDX DISP=SHR VOL=SER=USER01 DCB=(DSORG=PS.VSE.LRECL=80. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing.TAPE.TEST.EXPDT=99365) DCB=(DSORG=PS..VSE.SL) VOL=SER=(807012) DCB=(RECFM=FB..&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY.RECFM=FB.NODE SNODE=SC.USER01 SNODE=SC.VSE. TAP2TAP1 PROC PNODE=SC.EXPDT=99365) DCB=(DSORG=PS. 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. The input tape is 3480/3490 cartridge and the output tape is reel (3420).. DSK2DYD2 PROC PNODE=SC.LRECL=80..

TEST.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.&JBNUMB LST=( CC=M CLASS=Q COPIES=2 DISP=L) ) - STEP0001 COPY .VSE.&VSEDSN)) PNODE EIF - - - Example 4.NODE &JBNAME=GGGDYD00 &JBNUMB=0000 &VSEDSN=USER01.(5). The disk data set has already been defined to the appropriate system catalog. DYD2LST1 PROC SNODE=SC. PARM=(’FAIL’.147: Printing a Managed Disk Data Set Use this Process to print the contents of a CA-DYNAM/D or CA-EPIC managed disk data set.146: Copying a Non-managed Disk File to a CA-DYNAM/D or CA-EPIC Start Track 1 FBA Non-controlled Data Set Use this Process to copy a non-managed disk file into a DYNAM/D or EPIC start-track 1 FBA non-controlled data set..VSE.ADDX DISP=SHR VOL=SER=USER01 DCB=(DSORG=PS. PARM=(’GOOD’.TEST.LRECL=80. DSK2DYD3 PROC PNODE=SC. The output will become a LST queue member under the name of &JBNAME.RLSE) DCB=(DSORG=PS.LRECL=133. The data set is allocated as a start-track 1 data set with a VOL=SER it will not be a managed data set. This Process uses symbolic values.LREC480.4-68 CONNECT:Direct Process Guide Concepts and Examples Example 4.BLKSIZE=800) ) TO ( SNODE DSN=&VSEDSN UNIT=DNOASGN VOL=SER=&VOLSER SPACE=(1.NODE SNODE=SC.VSE.BLKSIZE=1330) ) TO ( SNODE DSN=&JBNAME.LRECL=80. CA-DYNAM/D or CA-EPIC will perform the disk allocation for CONNECT:Direct. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing.NODE &VSEDSN=USER01.RECFM=FB.RECFM=FB.NONDYD &VOLSER=FBA001 STEP0001 COPY FROM ( PNODE DSN=LRR.NODE PNODE=SC.BLKSIZE=27920) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.GDGPOWR1 FROM ( PNODE DSN=&VSEDSN DISP=SHR UNIT=DLBLONLY DCB=(RECFM=FBM.VSE.

The disk data set has already been defined to the appropriate system catalog (the default ESDS model).BLKSIZE=800) ) TO ( SNODE DSN=&VSEDSN DISP=RPL UNIT=DISK VOL=SER=USER06 SPACE=(80.LRECL=80.BLKSIZE=22500) ) TO ( SNODE DSN=USER01. TAP2DYD1 PROC STEP001 COPY PNODE=SC.RECFM=FB.LRECL=1500.BLKSIZE=22500) ) - .LRECL=1500.TEST.TAPE.VSE.NL) VOL=SER=(777777) DCB=(RECFM=FB. PARM=(’GOOD’. You must specify the input DCB parameter (RECFM. DSK2MSM1 PROC PNODE=SC. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing and uses symbolic values.123) DCB=(DSORG=MSAM.VSE.CATALOG.LRECL=80.NODE SNODE=SC.BLKSIZE=16000) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.COMMON.VSE.GDGCOPY1 UNIT=DLBLONLY LABEL=(EXPDT=99365) DCB=(RECFM=FB.FILE UNIT=5A0 LABEL=(1.300)) VSAMCAT=(VSE.NODE SNODE=SC.X. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing..(500.VSE.148: Copying a Non-controlled Sequential File to a MSAM File This Process copies a non-controlled BSAM (sequential) file into a MSAM (VSAM Managed SAM) file.MSAMFIL1 STEP0001 COPY FROM ( PNODE DSN=LRR. Example 4.LREC480.149: Copying a Non-controlled Tape Data Set to a Controlled Disk File This Process copies a non-CA-DYNAM/T or CA-EPIC controlled tape data set into a controlled disk file.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY. LRECL).NODE &VSEDSN=USER01.NODE FROM ( PNODE (DSN=TEST.ADDX DISP=SHR VOL=SER=USER01 DCB=(DSORG=PS.RECFM=FB.&VSEDSN)) PNODE EIF - - - Example 4. this information will be copied to the output data set.X.TEST. PARM=(’FAIL’.Chapter 4 / COPY Statement Examples 4-69 The previous Process runs on the same CONNECT:Direct node using PNODE=SNODE processing and uses symbolic values. The disk data set has already been defined to the appropriate system catalog.

GDGCOPY2 FROM ( PNODE DSN=USER01.KEEP) DCB=(DSORG=PS.SL) DISP=(NEW. DSK2TAP1 PROC PNODE=SC.BLKSIZE=16000) ) TO ( SNODE DSN=&VSEDSN UNIT=DLBLONLY DCB=(DSORG=PS.NODE SNODE=SC.TEST. PARM=(’GOOD’.BLKSIZE=27920) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.VSE.NODYNAM1 DISP=(SHR) UNIT=DISK VOL=SER=DOSRES DCB=(DSORG=PS.TEST.151: Copying a Managed 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 and reblock the output data set.NODE &VSEDSN=USER01. PARM=(’GOOD’.RECFM=FB.RECFM=FB. The disk data set has already been defined to the appropriate system catalog.TAPE.FILE FROM ( PNODE DSN=USER01.VSE.BLKSIZE=800) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.NODE &VSECUU=CART &VSEDSN=TEST.TEST.NODE SNODE=SC.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - .RECFM=FB. DYD2DYD1 PROC PNODE=SC.150: Copying Non-managed Disk Data Set to a Non-managed Tape Data Set This Process copies a non-managed disk data set into a non-managed tape data set and runs on the same CONNECT:Direct node using PNODE=SNODE processing.RECFM=FB. This Process uses symbolic values.LRECL=80.BLKSIZE=8000) ) TO ( SNODE DSN=&VSEDSN UNIT=&VSECUU LABEL=(1.VSE.4-70 CONNECT:Direct Process Guide Concepts and Examples Example 4.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY. PARM=(’FAIL’.LRECL=80.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - Example 4.LRECL=80.VSE.GDGCOPY1 DISP=(SHR) UNIT=DLBLONLY DCB=(DSORG=PS.LRECL=80. PARM=(’FAIL’.

BLKSIZE=27920) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.VSE.LRECL=80. The input data set is CKD and the output data set is FBA.LRECL=80.TEST.VSE.TAPE1 FROM ( PNODE DSN=USER01. DYD2DYD2 PROC PNODE=SC.COPYFILE UNIT=DLBLONLY DCB=(DSORG=PS. PARM=(’GOOD’.&FBADSN)) PNODE RUN TASK (PGM=DMNOTIFY.NODE SNODE=SC.TEST.LRECL=80.VSE.BLKSIZE=16000) ) TO ( SNODE DSN=&FBADSN UNIT=DLBLONLY DCB=(DSORG=PS. The disk data set has already been defined to the appropriate system catalog.153: Copying a Controlled Disk Data Set to a Controlled Tape Output File Use this Process to copy a CA-DYNAM/D or CA-EPIC controlled disk data set to a CA-DYNAM/T or CA-EPIC controlled tape output file on the same CONNECT:Direct node by using PNODE=SNODE.TEST. This Process uses symbolic values. PARM=(’FAIL’.NODE &CKDDSN=USER01.FBACOPY1 FROM ( PNODE DSN=&CKDDSN UNIT=DLBLONLY DCB=(DSORG=PS.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY.SL) DISP=(NEW. All of the disk and tape data set names have been predefined to the appropriate system catalog.Chapter 4 / COPY Statement Examples 4-71 Example 4.RECFM=FB. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing.CATLG) DCB=(DSORG=PS. PARM=(’GOOD’.RECFM=FB.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - .152: 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.BLKSIZE=16000) ) TO ( SNODE DSN=&VSEDSN UNIT=TNOASGN LABEL=(1. DYD2DYT1 PROC PNODE=SC.NODE &VSEDSN=USER01.RECFM=FB.RECFM=FB.BLKSIZE=32000) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.NODE SNODE=SC.LRECL=80.TEST.VSE.GDGCOPY2 &FBADSN=USER01. PARM=(’FAIL’.&FBADSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - Example 4.

RECFM=FB. ASSUMING ESDS.COMMON.VSE.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.BLKSIZE=16000) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY. The disk data set has already been defined to the appropriate system catalog (the default ESDS model). This Process uses symbolic values.300)) VSAMCAT=(VSE.RECFM=FB. PARM=(’FAIL’. Note: You can ignore the CONNECT:Direct information message: SVSG501I VSAM OPEN ERROR=’A0’. RETRYING OPEN.CATALOG.123) DCB=(DSORG=MSAM.TEST. DYD2MSM1 PROC PNODE=SC.GDGCOPY1 DISP=(SHR) UNIT=DLBLONLY DCB=(DSORG=PS.LRECL=80.4-72 CONNECT:Direct Process Guide Concepts and Examples Example 4.BLKSIZE=16000) ) TO ( SNODE DSN=&VSEDSN DISP=RPL UNIT=DISK VOL=SER=USER06 SPACE=(80.TEST. PARM=(’GOOD’.X.MSAMFIL1 STEP0001 COPY FROM ( PNODE DSN=USER01. .NODE &VSEDSN=USER01..NODE SNODE=SC.(500.X.LRECL=80.&VSEDSN)) PNODE EIF - - - This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing.154: Copying a Controlled BSAM Data Set to a MSAM Output Data Set This Process copies from a CA-DYNAM/D or CA-EPIC controlled BSAM data set into a MSAM (VSAM Managed SAM) output data set.VSE.

NODE &VSEDSN=USER01.FILE FROM ( PNODE DSN=USER01. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing and uses symbolic values.TAPE1 UNIT=TNOASGN DCB=(DSORG=PS.SL) DISP=(NEW.156: Copying a Controlled CKD Disk Data Set to a Non-controlled 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.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY.RECFM=FB. PARM=(’FAIL’.TAPE. PARM=(’FAIL’.155: 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.VSE. The disk data set has already been defined to the appropriate system catalog.RECFM=FB. DYD2TAP1 PROC PNODE=SC.VSE.NODE SNODE=SC.VSE.BLKSIZE=8000) ) TO ( SNODE DSN=&VSEDSN UNIT=&VSECUU LABEL=(1.TEST. The disk data set has already been defined to the appropriate system catalog. PARM=(’GOOD’.BLKSIZE=32000) ) TO ( SNODE DSN=&VSEDSN DISP=(SHR) UNIT=DLBLONLY ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.GDGCOPY1 UNIT=DLBLONLY DCB=(DSORG=PS.FBAFILE1 FROM ( PNODE DSN=USER01.NODE SNODE=SC. PARM=(’GOOD’. The output data set DCB attributes will be propagated from the input file attributes.LRECL=80.Chapter 4 / COPY Statement Examples 4-73 Example 4. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing and uses symbolic values.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY.TEST.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - Example 4.KEEP) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.LRECL=80.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - .VSE.NODE &VSECUU=CART &VSEDSN=TEST. DYT2DYD1 PROC PNODE=SC.TEST.

DIRECT. PARM=(’FAIL’.4-74 CONNECT:Direct Process Guide Concepts and Examples Example 4.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - . This Process was written with symbolic parameters to allow for a generic Process. All of the disk and tape data set names have been predefined to the appropriate system catalog. PARM=(’GOOD’.LIBRARIES &VSESUB=USER01 &VSETYP=N &VSEVOL=USER03 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. so you must modify to your standards.VSE. LIB2DYD1 PROC SNODE=SC.TEST.157: 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.BLKSIZE=27920) DISP=(NEW.NODE PNODE=SC.CATLG) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.VSE.LRECL=80.NODE &MEMBER=LIB2DYT1 &VSEDSN=USER01.LIBCOPY1 &VSELIB=CONN.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY.

TAPE1 &VSELIB=CONN.VSE. All of the disk and tape data set names have been predefined to the appropriate system catalog. LIB2DYT1 PROC SNODE=SC. these will be copied from the input library DCB parameters.CATLG) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.TEST.DIRECT.VSE.LIBRARIES &VSESUB=USER01 &VSETYP=JCL &VSEVOL=USER03 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.NODE &MEMBER=LIB2DYT1 &VSEDSN=USER01.&VSEDSN)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - . PARM=(’FAIL’. You do not have to specify output DCB parameters.SL) DISP=(NEW.Chapter 4 / COPY Statement Examples 4-75 Example 4.&VSEDSN)) PNODE RUN TASK (PGM=DMNOTIFY. Note: This Process was written with symbolic parameters to allow for a generic Process.NODE PNODE=SC. You must modify to your standards.158: 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. PARM=(’GOOD’.

VSE.BLKSIZE=137) ) STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY. .GDGPOWR1 STEP0001 COPY FROM ( PNODE DSN=&JBNAME LST=(CLASS=&JBCLASS DISP=&JBDISP) ) TO ( SNODE DSN=&VSEDSN UNIT=DLBLONLY * DCB=(DSORG=PS.NODE SNODE=SC. &JBDISP=D &JBCLASS=A &VSEDSN=USER01.4-76 CONNECT:Direct Process Guide Concepts and Examples Example 4.NODE CLASS=5 &JBNAME=. This information will be obtained from the LST queue entry.LRECL=133. LST2DYD1 PROC PNODE=SC. PARM=(’FAIL’.jobname) and places the data into a CA-DYNAM/D or CA-EPIC controlled disk data set. The Process runs on the same CONNECT:Direct node using PNODE=SNODE processing and uses symbolic values.TEST.159: Copying a VSE/POWER LST Queue Member to a Controlled Disk Data Set This Process extracts a VSE/POWER LST queue member (where: DSN=power. PARM=(’GOOD’.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.&VSEDSN)) PNODE EIF - - - You do not need to specify an output DCB parameter.VSE.RECFM=VM. The disk data set has already been defined to the appropriate system catalog.

This Process uses symbolic values.VSE.Chapter 4 / COPY Statement Examples 4-77 Example 4.TEST.RLSE) ) (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.160: Copying a BSAM VSE Sublibrary to a New VSE BSAM Library This Process sends an entire BSAM VSE sublibrary into a new VSE BSAM library to be allocated on the SNODE. PARM=(’GOOD’.&NEWLIB)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - .VSE.(4000). LIB2LIB1 PROC SNODE=SC. on the FROM side to Process BSAM libraries.&NEWLIB)) PNODE RUN TASK (PGM=DMNOTIFY.NODE PNODE=SC.NODE &NEWLIB=USER01.LIBRARIES &VSESUB=USER01 &VSETYP=* FROM ( PNODE DSN=&VSELIB DISP=SHR LIBR=(*) VOL=SER=USER03 DCB=(DSORG=PS) ) TO ( SNODE DSN=&NEWLIB UNIT=FBA DISP=NEW LIBR=(*) VOL=SER=FBA001 DCB=(DSORG=PS) SPACE=(100. You must specify all of the shown below. PARM=(’FAIL’.DIRECT.FBALIB01 &VSELIB=CONN.

LRECL=80.NODE PNODE=SC.DIRECT. LIB2OS3904 PROC SNODE=SC.OS390. This Process uses symbolic values. The Process runs on the PNODE (VSE) and sends the data to the SNODE (OS/390).1.RECFM=FB.VSE. PARM=(’GOOD’.BLKSIZE=27920) ) COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.161: Copying a BSAM VSE Sublibrary to a New OS/390 PDS This Process sends an entire BSAM VSE sublibrary into a new OS/390 partitioned data set.&OS390LIB)) PNODE EIF - - - . You must specify all of the parameters in this sample on the FROM side to Process BSAM libraries.4-78 CONNECT:Direct Process Guide Concepts and Examples Example 4.RLSE) DCB=(DSORG=PO. An example follows.(5.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.TEST.100).&OS390LIB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.NODE &OS390LIB=USER01.VSELIB &VSELIB=CONN. PARM=(’FAIL’.

TEST.162: Copying a MSAM Data Set to a Controlled BSAM Data Set Use this Process to copy a MSAM (VSAM Managed SAM) data set into a CA-DYNAM/D or CA-EPIC controlled BSAM data set.RECFM=FB. This Process uses symbolic values..MSAMFIL1 DISP=OLD UNIT=DISK VOL=SER=USER06 VSAMCAT=(VSE.CATALOG.X.BLKSIZE=16000) ) COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY. This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY. .Chapter 4 / COPY Statement Examples 4-79 Example 4.123) DCB=(DSORG=MSAM.&VSEDSN)) PNODE EIF - - - In the previous example. MSM2DYD1 PROC PNODE=SC.NODE SNODE=SC.GDGCOPY1 STEP0001 COPY FROM ( PNODE DSN=USER01.BLKSIZE=16000) ) TO ( SNODE DSN=&VSEDSN DISP=NEW UNIT=DLBLONLY DCB=(DSORG=PS.LRECL=80.COMMON.TEST.X.LRECL=80. the disk data set has already been defined to the appropriate system catalog.VSE. PARM=(’GOOD’. PARM=(’FAIL’.RECFM=FB.NODE &VSEDSN=USER01.VSE.

VSE.NODE SNODE=SC.4-80 CONNECT:Direct Process Guide Concepts and Examples Copying Between VSE and OS/2 Warp Nodes Example 4.163: Copying a Controlled File to an OS/2 HPFS File This Process copies a CA-DYNAM/D or CA-EPIC controlled file into an OS/2 HPFS file.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY. PARM=(’FAIL’. PARM=(’GOOD’. DCB information will be provided by the PNODE.OS2.&VSEDSN)) PNODE EIF - - - .TEST.BLKSIZE=800) UNIT=DLBLONLY ) TO ( SNODE DSN=’D:\PROCESS\USER01.NODE &VSEDSN=USER01.LRECL=80. The disk data set has already been defined to the appropriate system catalog.DEL’ DISP=RPL TYPE=TEXT ) COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY. DYD2OS21 PROCESS PNODE=SC. This Process uses symbolic values.LIBCOPY1 STEP0001 COPY FROM ( PNODE DSN=&VSEDSN DCB=(RECFM=FB.

OS2.&VSEMEM)) PNODE EIF - STEP0001 COPY STEP0002 IF - ELSE - The disk data set has already been defined to the appropriate system catalog.DEL’ DCB=(DSORG=PS.LIBRARIES &VSEMEM=.RECFM=FB.VSE. &VSESUB=USER01 &VSETYP=N &VSEVOL=USER03 FROM ( PNODE DSN=&VSELIB DISP=SHR UNIT=DISK DCB=(DSORG=PS) VOL=SER=&VSEVOL LIBR=(SELMEM=&VSEMEM SELSLIB=&VSESUB SELTYPE=&VSETYP) ) TO ( SNODE DSN=’D:\PROCESS\USER01. This file should have been loaded during your CONNECT:Direct for VSE/ESA installation. PARM=(’FAIL’.Chapter 4 / COPY Statement Examples 4-81 Example 4. LIB2OS21 PROC PNODE=SC.DIRECT.NODE &VSELIB=CONN.NODE SNODE=SC. PARM=(’GOOD’. This Process uses the typefile member of TEXT to establish certain Process defaults. When referencing BSAM libraries in a CONNECT:Direct Process you must specify the following parameters: v DSORG v DSN v UNIT v VOL=SER . This Process was written with symbolics for substitution.164: Copying from a Specific VSE Librarian Member to an OS/2 HPFS or FAT File This Process copies from a specific VSE/LIBR member into an OS/2 HPFS or FAT output file.LRECL=80) DISP=RPL TYPE=TEXT ) COMPRESS (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.&VSEMEM)) PNODE RUN TASK (PGM=DMNOTIFY.

166: Copying a VSE VSAM File to an OS/400 Spooled File This Process copies a VSAM file from a VSE node to an OS/400 spooled file. The VSAM file resides on a catalog other than IJSYSUC.VSE.NODE1 SNODE=OS400. Page size is optional and dependent on the printer device.NODE1 SNODE=OS400.1.NODE2 SNODEID=(OS400ND.USER. so a VSAMCAT parameter is coded.111) DISP=SHR) TO (DSN=’OS400X/PDSLIB(TSTDATA)’ SYSOPTS=\"TYPE(MBR)\ \RCDLEN(100)\ \FILETYPE(*DATA)"\ DISP=RPL SNODE) - Example 4. PROC01 STEP01 PROCESS PNODE=SC.VSAM DCB=(DSORG=VSAM) VSAMCAT=(VSESP.CATALOG. PROC01 STEP01 PROCESS PNODE=SC.PWD400) COPY FROM (DSN=VSE.VSAM DCB=(DSORG=VSAM) DISP=SHR) TO (DSN=’DATAFF’ SYSOPTS=\"TYPE(SPLF)\ \CTLCHAR(*NONE)\ \PAGESIZE(66 378)\ \SPOOL(*YES)"\ SNODE) - .4-82 CONNECT:Direct Process Guide Concepts and Examples Copying Between VSE and OS/400 Nodes Example 4..1.PWD400) COPY FROM (DSN=VSE.TEST.NODE2 SNODEID=(OS400ND.165: Copying a VSE VSAM to an OS/400 PDS Member This Process copies a VSAM file from a VSE node to an OS/400 PDS member.VSE.TEST.

TEST.NODE &OS390LIB=USER01.Chapter 4 / COPY Statement Examples 4-83 Copying Between VSE and OS/390 Nodes Example 4.&OS390LIB)) PNODE EIF - - - .2 or earlier your SYSOPTS statement must be contained on one line.DIRECT. otherwise the Process will not run. PARM=(’FAIL’.&OS390LIB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY. LIB2OS3901 PROC PNODE=SC.VSE.NODE SNODE=SC. The disk data set has already been defined to the appropriate system catalog. When referencing BSAM libraries in a CONNECT:Direct Process you must specify the following parameters: v DSORG v DSN v UNIT v VOL=SER Note: If you are connecting with CONNECT:Direct for MVS Version 2.LIBRARIES &VSEMEM=. PARM=(’GOOD’.VSEPROC &VSELIB=CONN.167: Copying a VSE Librarian BSAM Member to a Preallocated OS/390 PDS Member This Process copies a VSE Librarian BSAM member into a preallocated OS/390 partitioned data set (PDS) member. This Process was written with symbolics for substitution. &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.OS390.

otherwise the Process will not run.DIRECT.168: Copying a VSAM VSE Library Member to a Preallocated OS/390 PDS Member Use the Process to copy a VSAM VSE Library member into a preallocated OS/390 partitioned data set (PDS) member.LIB &VSELIB=CONN.2 or earlier your SYSOPTS statement must be contained on one line.&OS390LIB)) PNODE EIF - - - . The disk data set has already been defined to the appropriate system catalog. PARM=(’GOOD’.4-84 CONNECT:Direct Process Guide Concepts and Examples Example 4. PARM=(’FAIL’.OS390.PROCESS.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.VSE.NODE &MEMBER=DITTODVT &OS390LIB=USER01.NODE SNODE=SC. Note: If you are connecting with CONNECT:Direct for MVS Version 2. This Process was written with symbolics for substitution.&OS390LIB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY. When referencing VSAM libraries in a CONNECT:Direct Process you must specify the DSORG and DISP parameters. LIB2OS3902 PROC PNODE=SC.

OS390.DISP=&JBDISP) ) TO ( SNODE DSN=USER01.&PINUMB)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.Chapter 4 / COPY Statement Examples 4-85 Example 4.&PINUMB)) PNODE EIF - - - .NODE CLASS=8 &JBNAME=GGG3200 &JBNUMB=0000 &JBDISP=L &JBCLASS=Q &PINUMB= STEP0001 COPY FROM ( PNODE DSN=&JBNAME LST=(CLASS=&JBCLASS. PARM=(’FAIL’. LST2OS3901 PROC PNODE=SC. PARM=(’GOOD’. The member name is submitted when the Process is submitted by overriding the symbolic &PINUMB. The disk data set has already been defined to the appropriate system catalog.VSE.169: Copying a VSE/POWER LST Queue Member to a Preallocated OS/390 PDS Use this Process to copy a VSE/POWER LST queue member into a preallocated OS/390 partitioned data set (PDS). otherwise the Process will end and not copy the data set. This Process uses symbolic values.VSEDUMPS(&PINUMB) DISP=RPL ) COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.NODE SNODE=SC. Verify that your job class in the LST queue matches the Process job class (&JBCLASS).TEST.

UNIXFILE STEP0001 COPY TO ( PNODE DSN=&VSEDSN UNIT=DLBLONLY ) FROM ( SNODE DSN=’/home/fremont/ddunc1/750070/arx02.2 Use this Process to copy a file from UNIX HP into a CA-DYNAM/D or CA-EPIC controlled disk data set using the LU 6. PARM=(’GOOD’.VSE. The disk data set has already been defined to the appropriate system catalog. This Process uses symbolic values.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.TEST.blanks=no:" ) CKPT=1M COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY.2 protocol.dat’ SYSOPTS=":xlate=no:strip. PARM=(’FAIL’. DCB information will be provided by the SNODE.&VSEDSN)) PNODE EIF - - - .UNIX.170: Copying a File from UNIX HP to a Controlled Disk Data Set Using LU6.4-86 CONNECT:Direct Process Guide Concepts and Examples Copying Files Between VSE and UNIX Example 4. UNX2DYD1 PROCESS PNODE=SC.NODE &VSEDSN=USER01.USER01 SNODE=SC.

.DALLAS SNODE=CD. the Process is requeued. This Process was written with symbolics for substitution.Chapter 4 / COPY Statement Examples 4-87 Example 4. Corrective action can then be taken.TEST. UNX2DYD2 PROCESS PNODE=SC.dat’ SYSOPTS=":xlate=no:strip.. The SPACE information is also supplied.PSDATA DISP=(NEW.blanks=no:" ) CKPT=1M COMPRESS STEP0002 IF (STEP0001 EQ 0) THEN RUN TASK (PGM=DMNOTIFY. Both checkpointing and compression are requested. DCB information from the source data set is used.171: 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.&VSEDSN)) PNODE EIF - - - File Allocation (MSP to MSP) Example 4.CHICAGO REQUEUE=YES COPY FROM (PNODE DSN=$DAL. Verify that you have updated your network map with the SNODE TCP/IP address and port number.VSE.4. PARM=(’FAIL’.USER01 SNODE=199.&VSEDSN)) PNODE ELSE RUN TASK (PGM=DMNOTIFY.ROUND)) PROCESS - .87 &VSEDSN=USER01.40).172: Using Defaults to Allocate a File This Process designates that the destination file is placed on a specified unit and volume. PARM=(’GOOD’.PSDATA) CKPT=128K COMPRESS TO (SNODE DSN=$CHI. Because DCB information is not specified for the destination data set.UNIXFILE STEP0001 COPY TO ( PNODE DSN=&VSEDSN UNIT=DLBLONLY ) FROM ( SNODE DSN=’/home/fremont/ddunc1/750070/arx02.(200. DCB information will be provided by the SNODE. If the Process receives an X37-type abend. COPYSEQ STEP01 PNODE=CD. The disk data set has already been defined to the appropriate system catalog.1.CATLG) UNIT=3380 VOL=(SER=SYS009) SPACE=(4096. because REQUEUE=YES is specified on the PROCESS statement.

DALLAS to a new file located at another site. COPYSEQ STEP01 PNODE=CD.4-88 CONNECT:Direct Process Guide Concepts and Examples Example 4. Any parameters specified on the COPY statement then take precedence over those coded in the TYPE file.DALLAS SNODE=CD. Refer to the CONNECT:Direct user’s guide for the appropriate platform for details on setting up entries in the TYPE file..174: Copying a SAM File The following Process copies a SAM file from CD.ROUND) Note: You can also place the IOEXIT parameter in a TYPE entry. and SPACE parameters are not specified within the COPY statement. PSFILE.CHICAGO.CATLG) DCB=(BLKSIZE=3120.CHICAGO REQUEUE=YES COPY FROM (DSN=DAL. UNIT.LRECL=80. VOLUME.40). Example 4.PSDATA) PROCESS - . PSFILE. This TYPE record must be present at the destination node (SNODE). therefore. The destination data set is allocated using definitions specified in the TYPE record.DALLAS SNODE=CD.(200.173: Using a Type File to Allocate a File The following Process uses a TYPE file to allocate a data set.PSDATA) CKPT=128K COMPRESS TO (DSN=CHI.PSDATA TYPE=PSFILE) PROCESS - The following parameters make up the TYPE record.CHICAGO COPY FROM (DSN=DAL. COPYSEQ STEP01 PNODE=CD. Both checkpointing and compression are requested within the Process.DSORG=PS) UNIT=3380 VOL=(SER=SYS009) SPACE=(4096. CD.. DISP=(NEW. The receiving node allocates the file using the same file attributes as the source data set because no file information is supplied.PSDATA) CKPT=128K COMPRESS TO (DSN=CHI.

MEM1. v In STEP01. Both checkpointing and compression are requested within the Process. PDS.DEST DISP=OLD) - Example 4. it will not be replaced (NR).DEST DISP=OLD) */ - Example 4. PQR)) TO (DSN=PDS.(MEM2. PDS. MEM1 is renamed to ZMEM..DEST) Example 4. MEM2 is copied unless the destination data set. contains a member named MEM2.175: Copying an Entire PDS This COPY statement transmits a PDS to a new file located at another site. COPY FROM CKPT=128K COMPRESS TO (DSN=PDS.DEST.176: Copying an Entire PDS Using Rename and NOREPLACE Functions This COPY statement copies an entire PDS to the PDS.Chapter 4 / COPY Statement Examples 4-89 Copying PDS to PDS (MSP to MSP) Example 4.ZMEM).177: Specifying a Range and the NR Subparameter to Copy Selected PDS Members The following COPY statement shows how the NR (NOREPLACE) subparameter can be used when a range is specified.NR). the FROM and TO member names are specified in the data set names. . (FAA/GBB.SOURCE) - (DSN=PDS.NR)) TO (DSN=PDS. COPY FROM (DSN=PDS.DEST. with the output member name changed. Checkpointing only takes place at the member level when copying a PDS.SOURCE SELECT=(ABC.SOURCE SELECT=(*.DEST. Using the SELECT parameter. All members from FAA through GBB are copied if they do not already exist.178: Copying One Member of a PDS This example illustrates three ways to copy a single member of a PDS.. The member PQR is also copied. /* USE OF NR WHEN A RANGE IS SPECIFIED COPY FROM (DSN=PDS. the receiving node allocates the file using the same file attributes as the source data set. Because allocation data is not included in the Process. v In STEP02. All other members are copied unchanged. the FROM and TO member names are specified in the data set names. PDS. The member ABC is copied to the PDS.

is not valid. BBCA. In this example.SOURCE EXCLUDE=MEM3) TO (DSN=PDS. . except members with names beginning with ABC. PDS.SOURCE. ABC. XXX Members AAA.4-90 CONNECT:Direct Process Guide Concepts and Examples v STEP03 uses the SELECT parameter as part of the FROM clause of the COPY statement. all members are copied. COPY FROM (DSN=PDS. ABB. A generic range.SOURCE(OLDMEM)) TO (DSN=PDS.179: Copying a PDS and Excluding an Individual Member This COPY statement copies an entire PDS. There is no member BBC to exclude.DEST) - The source file. MEM3. ABC. STEP01 COPY FROM (DSN=PDS.180: Copying a PDS and Excluding Members Generically This COPY statement shows how to exclude members generically.DEST(NEWNAME) DISP=RPL) - STEP02 STEP03 Example 4. named in the EXCLUDE parameter.DEST) - Example 4. BBA. it is copied.SOURCE within the specified range. with a new member name specified on the data set name for the destination data set. contains the following members: AAA. Members AAB. COPY FROM (DSN=PDS. Note: All range entries must be specified as subparameters and enclosed in parentheses. Because BBCA is not part of the range to be excluded. BBA. BBB. BGG.SOURCE EXCLUDE=ABC*) TO (DSN=PDS. and XXX are copied. BBCA.181: Copying a PDS and Using a Range to Exclude PDS Members The following COPY statement copies an entire PDS but uses a range to exclude any members from AAB through BBC. BBB was the last member in PDS.SOURCE SELECT=OLDMEM) TO (DSN=PDS.DEST(NEWNAME) DISP=RPL) COPY FROM (DSN=PDS.SOURCE EXCLUDE=((AAB/BBC))) TO (DSN=PDS. BGG. AAB. ABB.DEST(MEMBER) DISP=RPL) COPY FROM (DSN=PDS. with the exception of the member.SOURCE(MEMBER)) TO (DSN=PDS. COPY FROM (DSN=PDS. and BBB are not copied because they are within the range of members excluded in AAB/BBC.DEST) - Example 4. like AAB*/BBC*.

CDF This COPY statement shows the use of the SELECT and EXCLUDE parameters: COPY FROM (DSN=PDS.SOURCE are not copied.184: 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.182: Copying a PDS and Generically Selecting Members This COPY statement shows how to select generically all member names starting with PAID (the first four characters of the data set names). Example 4. and ACD are not copied because they are excluded generically by AC*.Chapter 4 / COPY Statement Examples 4-91 Example 4. and ABB are copied because they are generically selected by A*. ACC. v CDE is not copied because it is not selected. ZZZ is the new name. v ACB. COPY FROM (DSN=PDS.SOURCE SELECT=(PAID*)) TO (DSN=PDS.BAA. ACB. BAA. BAB. ABA. v ABC is copied because a specific ABC selection overrides the EXCLUDE range (ABC/AZ). BAC. v ABD and ABE are not copied because they are excluded by the range ABC/AZ.183: Copying PDS Members Using the EXCLUDE and SELECT Parameters In this example.SOURCE.DEST) - Results from the COPY are as follows: v A. ABD.SOURCE ALIAS=Y EXCLUDE=C3 SELECT=(A.A*.DEST) - Example 4. contains the following members: A. AB. ABB. Refer to the CONNECT:Direct for MSP part of the CONNECT:Direct Process Guide for Mainframe Products volume for the override priority for the SELECT and EXCLUDE parameters.ZZZ). ABE. ABC. v CDF is copied because it is specifically selected by (CDF. AB.ZZZ)) EXCLUDE=(AC*.DEST) - .(ABC/AZ))) TO (DSN=PDS. ACD.ABC. v BAB and BAC are copied because they are selected by the range (BA/BBB). ABA. ACC. CDE.C1)) TO (DSN=PDS.SOURCE SELECT=((BA/BBB). the data set. v BAA is not copied because the specific BAA EXCLUDE overrides the SELECT range (BA/BBB).(CDF. PDS. The remaining members of PDS.

specifying the PDS member as part of the DSN. COPYSEQ STEP01 PNODE=CHICAGO SNODE=MINNEAPOLIS COPY FROM (DSN=MY. v B is not copied because it was not selected.4-92 CONNECT:Direct Process Guide Concepts and Examples In this example. Copying to Tape (MSP to MSP) Example 4. v C1 is copied because it was selected by member name. v A2 is copied because ALIAS=Y and A2 is an alias for member A. PDS. After the COPY operation.DEST contained no members and no aliases before the COPY operation. DSORG=PS must be coded on the TO clause of the CONNECT:Direct for MSP COPY statement. v C2 is copied because ALIAS=Y and C1 (another alias for member C) was selected by member name.185: Copying a PDS Member to Tape The following Process copies a PDS member to a tape device. the data set PDS.FILE DISP=(NEW.DEST contains the following members and aliases: Members A C Aliases A1 A2 C1 C2 The explanation follows: v A is copied because it was selected by member name. v A1 is copied because ALIAS=Y and A1 is an alias for member A. v C is copied because ALIAS=Y and C is the true member name for C1.FILE(MEMBER) DISP=SHR PNODE) TO (DSN=TAPE.PDS.SL) DCB=(DSORG=PS)) PROCESS - . Note: Because you can only copy a single PDS member to tape in one copy step.SOURCE has the following members and associated aliases: Members A B C C1 C2 C3 Aliases A1 A2 The data set PDS. v C3 is not copied because it was specifically excluded.CATLG) UNIT=TAPE LABEL=(.

INEXT01.FILE DISP=(MOD. CONNECT:Direct syntax requires using backslashes to continue the . COPYSEQ STEP01 PNODE=CHICAGO SNODE=MINNEAPOLIS COPY FROM (DSN=MY. You can specify a different user-written IOEXIT on each side as shown in the following example.FILE(MEMA) DISP=SHR PNODE) TO (DSN=TAPE.X’0E’)) TO SNODE IOEXIT=OUEXT03) - Copying Between MSP and OS/400 Nodes Example 4. The IOEXIT keyword is valid in either the FROM or TO clause of the COPY statement.CATLG) UNIT=TAPE DCB=(DSORG=PS)) COPY FROM (DSN=MY. The exit must. reside on the node where it is referenced.PDS.C’DB0A05’. It will pass records using CONNECT:Direct to OUEXT03. and the entire SYSOPTS string must be enclosed in double quotation marks.187: Copying a Sequential File from MSP to a Member of a Physical Data Base File This Process copies a sequential file from MSP to a member of a physical data base file on the OS/400 node. The RUN TASK then sends a message notifying an OS/400 user that the Process completed. an IOEXIT on the destination CONNECT:Direct node. MEMB is appended to TAPE.SL) DCB=(DSORG=PS)) PROCESS - STEP02 Copying Files Using Exits (MSP to MSP) Example 4.Chapter 4 / COPY Statement Examples 4-93 You can copy multiple PDS members by coding multiple COPY steps in a Process. In this example.PDS. All SYSOPTS keyword values must be enclosed in parentheses. however. COPY FROM (PNODE IOEXIT=(INEXT01.FILE DISP=(NEW. In the following example.186: Using the IOEXIT Parameter You can specify use of an I/O exit by the inclusion of the IOEXIT keyword on the COPY statement.FILE.CATLG) UNIT=TAPE LABEL=(.FILE(MEMB) DISP=SHR PNODE) TO (DSN=TAPE. an IOEXIT program on the source CONNECT:Direct node will be invoked and passed two parameters-a character string (‘DB0A05’) and a hexadecimal value (x‘05’). and either append the additional PDS members to the first file or create separate tape files for each member. The exit referenced in this COPY statement (OUEXT03) must reside in an authorized loadlib at the destination site.

BLKSIZE=23408) DISP=RPL) - STEP001 . PROC#01 PROCESS SNODE=OS400.CDI1 PNODE=SC.SEQFILE9 DCB=(RECFM=FB. and the SYSOPTS string is enclosed in double quotation marks. DCB information is specified for file allocation on MSP.188: Copying a Member of a Physical Data Base File from OS/400 to a Sequential File on MSP This Process copies a member of a physical data base file from the OS/400 node to a sequential file on MSP.OS400. Bracketing backslashes allow for continuation of quotation marks when they begin and end on different lines.CDI1 PNODE=SC.SEQFILE1 DISP=SHR COMPRESS TO (SNODE DSN=’ABC/OS400(TEST01)’ SYSOPTS=\"TYPE(MBR)\ \TEXT(’CREATED BY PROC#001’)\ \RCDLEN(133)"\ DISP=RPL) RUN TASK (PGM = OS400) SNODE SYSOPTS=\"\ \CMD(\ \SNDBRKMSG\ \MSG(’PROCESS PROC#01 HAS COMPLETED’)\ \TOMSGQ(DSP07)\ \ )\ \"\ - STEP001 STEP002 Example 4. Specifying COMPRESS without a subparameter indicates that blanks are compressed during transmission and converted back to the original string during decompression.MSP1.PSWRD) COPY FROM (PNODE DSN=ABC.MSP1.OS400. The SYSOPTS keyword value is enclosed in parentheses.ROGER) COPY FROM (SNODE DSN=’ABC/OS400(TEST01)’ SYSOPTS="TYPE(MBR)" DISP=SHR) COMPRESS EXT TO (PNODE DSN=ABC.CD5A PRTY=8 NOTIFY=%USER CLASS=4 HOLD=NO SNODEID=(RSMITH. The default for the COMPRESS parameter is PRIMEchar=X’40’. Specifying COMPRESS EXT indicates that repetitive strings in the data will be compressed and converted to the original string during decompression.4-94 CONNECT:Direct Process Guide Concepts and Examples SYSOPTS over multiple lines when the Process is submitted from an MSP node.CD5A PRTY=8 NOTIFY=%USER CLASS=4 SNODEID=(USERID.LRECL=133. PROC#001 PROCESS SNODE=OS400.

The SYSOPTS parameter PRTQLTY specifies near-letter-quality print.MSP1.REPORTS DISP=SHR) TO (SNODE DSN=REPORTS401 SYSOPTS=\"TYPE(SPLF)\ \DEV(*JOB)\ \DEVTYPE(*IPDS)\ \CTLCHAR(*FCFC)\ \SPOOL(*YES)\ \PRTQLTY(*NLQ)\ \PRTTXT(’*** END OF PAGE ***’)\ \JUSTIFY(100)\ \OUTQ(*JOB)\ \COPIES(2)\ \MAXRCDS(999)\ \FILESEP(2)\ \HOLD(*YES)\ \SAVE(*YES)\ \OUTPTY(*JOB)\ \USRDTA(RSMITH)"\ DISP=RPL) - STEP001 Example 4.Chapter 4 / COPY Statement Examples 4-95 Example 4. PROC#001 PROCESS SNODE=OS400.189: Copying a Data Set from MSP to a Spooled File on OS/400 This example copies a data set from MSP to a spooled file on an OS/400 node. TEST01A PROCESS SNODE=OS400.CDI1 PRTY=8 NOTIFY=RSMITH CLASS=4 SNODEID=(RSMITH.ROGER) COPY FROM (PNODE DSN=ABC.OS400. The parameter CTLCHAR (*FCFC) is always used when the source MSP file has a record format (RECFM) of xxA.CNTL(LRECL80) DISP=SHR) TO (SNODE DSN=REPORTS402 SYSOPTS=\"\ \TYPE(SPLF)\ \PRTQLTY(*NLQ)\ \"\) - STEP001 .CDI1 PNODE=SC. which indicates that it contains ANSI carriage control.CD5A PRTY=8 NOTIFY=%USER CLASS=4 HOLD=NO SNODEID=(RSMITH. The specified SYSOPTS parameters override the defaults defined for the print device at installation.ROGER) COPY FROM (PNODE DSN=ABC.190: Copying a Member of a PDS from MSP to a Spooled File on OS/400 This Process copies a member of a PDS from MSP to a spooled file on an OS/400 node.OS400.

RECFM=FB) DISP=SHR) TO (PNODE DSN=$B.EFILE. SYSOPTS subparameters are used to define the attributes of the new receiving file on the Tandem system. A message will be sent to the spooler ($S.CD.BILL.192: Copying to an Entry-Sequenced File (MSP to Tandem) In this multi-step Process. This parameter must be positioned in the Process wherever the Tandem file (DSN) is specified.SEQ. $B.A110257 PNODE DISP=NEW SYSOPTS=\"’SET TYPE E’ \’SET BLOCK 4096’ \’SET MAXEXTENTS 16’ \’SET XLATE ON’" PROCESS - STEP2 \|| \|| \|| \) . EBCDIC-to-ASCII translation is enabled with the SYSOPTS parameter SET XLATE ON. ’PURGE A110257 ’)) PNODE COPY FROM (DSN=DATA1.FILERESO. EFILE is an entry-sequenced file.SEQ. the SNODE.A110257.TANDEM SNODE=SC.#FUPTEST/’ ’VOLUME $B.4-96 CONNECT:Direct Process Guide Concepts and Examples Copying Between MSP and Tandem Nodes Example 4. EPROC STEP01 PROCESS SNODE=CD.EFILE DCB=(DSORG=E) SYSOPTS=\"’SET XLATE ON’" DISP=RPL) \ - Example 4. STEP2 will copy DATA1.A110257 SNODE DISP=SHR) TO (DSN=$B.EFILE from a CONNECT:Direct for MSP node.BILL.191: Submitting a Process from a CONNECT:Direct for Tandem Node that Copies a File from MSP to Tandem This Process is submitted from a CONNECT:Direct for Tandem node. STEP1 will execute FUP to purge $B.EFILE DCB=(DSORG=PS.A11025 on the PNODE.FILERESO’.FILERESO. A110257 STEP1 PNODE=CD.MSP1.A110257 from the MSP node (SNODE) to the entry-sequenced file.#FUPTEST) that indicates whether FUP executed successfully. the PNODE.JSMITH COPY FROM (SNODE DSN=JSMITH. at the PNODE. to $B.FILERESO. and copies the sequential file JSMITH.MSP1 RUN TASK (PGM=FUP PARM=(’/OUT $S.

reading in records of 100 bytes.2)’" \) - Example 4.TANDEM COPY FROM (DSN=DATA1.UNST1 DISP=(NEW) SYSOPTS=\"’SET TYPE U’ \|| \’SET CODE 101’ \|| \’SET BLOCK 2048’ \|| \’SET EXT (2.NODE SNODE=CD.VSAME001.VSAME001.TANDEM COPY FROM (DSN=DATA1.MSP1. CHECK1 STEP1 PROCESS PNODE=SC.MSP1.FILERESO.Chapter 4 / COPY Statement Examples 4-97 Example 4.2)’" \) - Example 4.UNST1).NODE COPY FROM (DSN=$B. "SET EXT (2.UNST1).193: Creating an Unstructured Code Type 101 File (MSP to Tandem) This Process is submitted at the MSP node and will copy a file from MSP and create a Tandem unstructured code type 101 file ($B.FILERESO.UNST1 DISP=(NEW) SYSOPTS=\"’SET TYPE U’ \|| "SET CODE 0’ \|| "SET BLOCK 4096’\||. CHECK1 STEP1 PROCESS PNODE=CD.DSORG=PS . from the Tandem node to the MSP node.FILERESO.VSAME001.DATA PNODE) TO (DSN=$B. include LRECL on the FROM clause of the COPY statement as instruction to the CONNECT:Direct for Tandem system on reading logical records.BLKSIZE=4000) DISP=NEW) - .MSP1.LRECL=100 .TANDEM SNODE=SC.FILERESO.UNST1 PNODE DCB=(LRECL=100) TO (DSN=DATA1.NODE SNODE=CD.FILERESO.195: Copying an Unstructured Code Type 0 File from Tandem to MSP This Process will copy a unstructured code type 0 file. Because the file is unstructured code type 0. . In this example. CHECK1 STEP1 PROCESS PNODE=SC.DATA PNODE) TO (DSN=$B.DATA SNODE DCB=(RECFM=FB.194: Creating an Unstructured Code Type 0 File (MSP to Tandem) This Process is submitted at the MSP node and will copy a file from MSP and create a Tandem unstructured code type 0 file ($B. file attributes are specified using the DCB parameter.

The CONNECT:Direct for Tandem data transformation facility (DTF) (or server) is on system \SYSTEM.200 to the Tandem. copies a data set from MSP to a remote node on a Tandem EXPAND network. It will create an unstructured code type 101 file. the Tandem file system allocates 50 pages (one page=2048 bytes) to the primary extent and 50 pages to all secondary extents. The Process is submitted on the MSP node.DALL SNODE=CD. TANDEM PROCESS PNODE=CD.TESTOUT’ DISP=NEW SYSOPTS=\"’SET TYPE E’" \|| \"’SET XLATE ON’" \) - Example 4.200.MONEY) COPY FROM (PNODE DSN=JSMITH.ROGER. the default.FDATA DISP=SHR) TO (DSN=’$C. or 1638400 bytes. single quotation marks must enclose the data set name.WILLIE) COPY FROM (PNODE DSN=SMITH.197: Copying a File Submitted from MSP to Tandem The following Process. Using the default for MAXEXTENTS results in a file with a capacity of 16 x 50 x 2048.ABC.SMITH SNODEID=(149.BILL SNODEID=(127.MSP1. Note: Because the source file includes the special backslash character.4-98 CONNECT:Direct Process Guide Concepts and Examples Example 4. GENSEND1 PROCESS STEP01 SNODE=ACCT.TESTDATA PNODE DISP=RPL) - Note: Because the Process was submitted from a CONNECT:Direct for MSP node. .JOHN. GENSEND2 PROCESS STEP01 SNODE=CD. Because the parameter SET EXT (50 50) is specified.198: Copying a File from Tandem on an EXPAND Network to MSP This Process is submitted on the MSP node to copy a file from a Tandem node on an EXPAND network to an MSP node. but the file is being copied to system \SYSEXT.JOHN volume on the \TSCIEXT system. along with the password MONEY.TESTOUT’ SNODE DISP=SHR) TO (DSN=JSMITH.DATAFILE DISP=SHR) TO (SNODE DSN=’\TSCIEXT.$A. submitted on a CONNECT:Direct for MSP node.$B.JOHN SNODEID=(147. The SNODEID field passes the userid 147.202.TESTSND’ SNODE SYSOPTS=\"’SET EXT(50 50)’" DISP=NEW) - STEP01 \ Example 4.196: Copying a Sequential File from an MSP Node to a Tandem Node The following Process transfers a sequential file from MSP to Tandem.DATA file into the TESTOUT file in the $B. single quotation marks must enclose the data set name.WILLIE) COPY FROM (DSN=’\SYSEXT.205. The userid and password are validated before the CONNECT:Direct for MSP system copies the JSMITH.

10)) DCB=(DSORG=PS.* !" ) SNODE - Example 4.FILETEST. STEP1 will invoke DMRTDYN to delete and unallocate DATA1.KSDSFILE DISP=(OLD.SEQ. The Process is submitted on MSP.$B.LRECL=1024.KSDSFILE at the SNODE.BLKSIZE=2048)) - STEP2 Example 4.201: Using CONNECT:Direct to Allocate a Partitioned File on a Single System (MSP to Tandem) In this Process.KSDSFILE PNODE DISP=SHR) TO (DSN=DATA1.200: Using FUP in a Process Submitted on MSP to Delete a File on Tandem In this Process. The Process is submitted on MSP.SEQ.DELETE)’ F’-1’ C"UNALLOC DSN=DATA1.NODE RUN TASK (PGM=DMRTDYN. All partitions reside on the same system. VSAMKS STEP1 PROCESS PNODE=CD.199: Copying a File from Tandem to MSP After Running DMRTDYN on MSP In this Process.TESTFILE.(2048.10.$C.FILE01.SEQ. SYSOPTS=(C’ALLOC DSN=DATA1.KSDSFILE will be copied from the Tandem node to DATA1.MSP1.TANDEM SNODE=CD.SEQ.FILETEST.CD STEP1 COPY FROM (PNODE DSN=DATA1.SEQ. Then $B.CD (PGM=FUP SYSOPTS="/OUT $S.VSAMKSDS DISP=NEW SPACE=(2048.FB80L ) TO (SNODE DSN=$A.VSAMKSDS at the Tandem node.PCODE0 DISP=NEW SYSOPTS=\"’SET CODE 0’ \ ’SET TYPE U’ \ ’SET PART (1. the CONNECT:Direct system is used to allocate a Tandem partitioned file. PART0003 PROCESS STEP1 RUN TASK SNODE=TANDEM.RECFM=FB. PART0001 PROCESS SNODE=TANDEM.Chapter 4 / COPY Statement Examples 4-99 Example 4.#SFUP01/PURGE $USER.5)’ \ ’SET MAXEXTENTS 16’ \ ’SET XLATE ON’" ) \|| \|| \|| \|| \|| \ - .TESTFILE.SEQ.5)’ \ ’SET PART (2.KSDSFILE") SNODE COPY FROM (DSN=$B.10. the FUP utility is used to delete a Tandem file.

SEQ.NODE1 SNODE=TSCI.EXTMSPF.NODE1 SNODE=TSCI.TANDEM SNODEID=(157.EXTMSPF.ACCTPROC.SEQ.DELETE)’ F’-1’ C"UNALLOC DSN=DATA1.EXTMSPF SNODE DISP=(NEW.MSP1.$S.SEQ.ACCTPROC.SMALLER UNIT=SYSDA) TO (DSN=$C.MSP1.TYPE E\ || \ .#EXTTANF PNODE DISP=SHR) TO (DSN=DATA1. STEP2 will copy a file from the Tandem spooler to DATA1.SEQ. BLKSIZE=13200) SPACE=(13200.4-100 CONNECT:Direct Process Guide Concepts and Examples Example 4. SYSOPTS PROCESS PNODE=SC.TANDEM SNODE=SC.REC 100’"\ DISP=RPL) - STEP01 Multiple SET commands can also be specified as follows: SYSOPTS PROCESS PNODE=SC.CD.TANDEM SNODEID=(157.214 ABLE1) COPY FROM (DSN=DATA1.10)\ || \ . DISP=(OLD.10)\ || \ SET XLATE ON\ || \ SET TYPE E\ || \ SET REC 100’"\ DISP=RPL) - STEP01 Example 4. In this example. PARM=(C’ALLOC DSN=DATA1. A record format of FBA is used to maintain ANSI control characters.TANDEM SYSOPTS=\"’SET EXT(10. bracketing backslashes are used to continue a string containing special characters across multiple lines.202: SYSOPTS Syntax Conventions (MSP to Tandem) This Process will copy a file from the MSP node to the Tandem node. syntax conventions must follow those established for MSP.XLATE ON\ || \ .CATLG) DCB=(DSORG=PS. the most recent job in the spooler for the job owner will be copied.214 ABLE1) COPY FROM (DSN=DATA1. EXTMSPF STEP1 PNODE=CD. STEP1 will execute a RUN TASK to invoke DMRTDYN at the SNODE to delete DATA1.2)) UNIT=SYSDA) PROCESS - STEP2 . Because a spooler job number was not specified.RECFM=FBA.(10.SMALLER UNIT=SYSDA) TO (DSN=$C.EXTMSPF")) SNODE COPY FROM (DSN=\TANEXT.LRECL=132.SEQ. Because the Process is submitted from the MSP node.MSP1 RUN TASK (PGM=DMRTDYN.203: Copying a File from a Tandem Spooler to an MSP Node In this multi-step Process.TANDEM SYSOPTS=\"’SET EXT(10.EXTMSPF at the SNODE.

2)) DISP=RPL) - . The Tandem file has a job number of 3722 and a location (name) of #SPLFILE.(10.Chapter 4 / COPY Statement Examples 4-101 Example 4. SPLPROC STEP01 PROCESS SNODE=CD.SMITH COPY FROM (DSN=JSMITH.LRECL=132.#SPL1’ PNODE DISP=RPL COPY FROM (FILE=’\SYSEXT.ABCACT SNODE DISP=SHR) TO (FILE=’\SYSEXT. STEP01 copies a file from a DSN on the MSP node to the Tandem spooler. A record format of FBA is used to maintain ANSI control characters.$S. the SYSOPTS SET XLATE subparameter does not have to be specified for translation. code 101) are translated automatically.#SPLFILE PNODE SYSOPTS=("SET SPOOLER=$SPLA" "SET SPOOLNUM=3722") DISP=SHR) TO (DSN=RJONES. BLKSIZE=13200) SPACE=(1320.(10.205: Copying Files Between the Tandem Spooler System and an MSP Node Using Job Number This Process transfers a file from the Tandem spooler $S to an MSP sequential file.LRECL=132.DSORG=PS. Because the Tandem files are spooler files.$S.JSMITH COPY FROM (DSN=\SYSEXT. The SPOOLER command is used to specify a supervisor other than the default of $SPLS. spooler files and edit files (unstructured. BLKSIZE=13200) SPACE=(13200. The Process is submitted from the Tandem node. A record format of FBA is used to maintain ANSI control characters.#SPL2’ PNODE DISP=SHR TO (DSN=RJONES. SPL STEP01 PROCESS SNODE=CD.MSP1.SPLFILE SNODE DCB=(RECFM=FBA. Note that \SYSEXT is an EXPAND node other than the one that the CONNECT:Direct for Tandem server resides on.2)) DISP=(RPL)) - STEP02 Example 4.$S.204: Copying Between an MSP Node and a Remote Tandem Spooler on an EXPAND Network This multi-step Process copies between an MSP node and a remote Tandem spooler on an EXPAND network.ACCT SNODE DCB=(RECFM=FBA. STEP02 copies a file from the Tandem spooler to an MSP node.DSORG=PS.

BILLPROC.ACCTTAPE DISP=RPL DCB=(DSORG=PS. The FASTLOAD option can be used to reduce disk I/O overhead.MSP1 COPY FROM (DSN=RJONES.4-102 CONNECT:Direct Process Guide Concepts and Examples Example 4.NL.LRECL=80. .BLKSIZE=4096) VOL=(.BLKSIZE=4096) DISP=(SHR)) TO (PNODE DSN=$C. This option (particularly useful for key-sequenced files) will bypass invocation of FASTSORT by FUP. DCB attributes must be specified to identify the file on the volume.MSP1 COPY FROM (DSN=MSP1. DCB attributes must be specified to identify the file on the volume.206: Copying a Disk File from Tandem to a Tape Device at MSP This Process is submitted on the Tandem node to copy a disk file on Tandem to a tape device at the MSP node..LOAD.208: Copying a File from MSP to Tandem Using the FASTLOAD Option This Process is submitted at the Tandem node to copy an entry-sequenced file from MSP to a key-sequenced file at the Tandem node. PROCESS1 PROCESS PNODE=CD.RECFM=FB.FILE DISP=(SHR) SNODE) TO (DSN=$C.ROGER) SNODE=CD. The XLATE subparameter is included in the Process to turn on the text conversion utility and translate from EBCDIC to ASCII. PROCESS1 PROCESS PNODE=CD. FASTLOAD PROCESS STEP01 PNODE=CD. SYSOPTS is used to specify file creation parameters specific to Tandem.EXPDT=91044) UNIT=REEL) - STEP01 Example 4.LRECL=80.1) LABEL=(.DATA. Because NL (no labels) is specified. Because NL (no labels) is specified.ACCTDATA DISP=RPL SYSOPTS=("SET TYPE U" "SET BLOCK 4096" "SET EXT (5.RECFM=FB.EXPDT=91044) DCB=(DSORG=PS.SORTED Y" "SET XLATE ON") PNODE) - In the previous example.MSP1 COPY FROM (DSN=$C.ACCTTAPE SNODE UNIT=REEL VOL=SER=010196 LABEL=(..NL.ACCTDATA DISP=SHR) TO (DSN=RJONES.5)")) - STEP01 Example 4..207: Copying a Tape File from MSP to a Disk File on Tandem This Process is submitted at the Tandem node to copy a tape file from the MSP node to a disk file on the Tandem node.KSDS DISP=RPL SYSOPTS=("SET FAST.BILLPROC.TANDEM SNODEID=(RJONES. the SYSOPTS subparameter SET FASTLOAD SORTED sets FASTLOAD and indicates to FUP that the data is sorted..TANDEM SNODEID=(RJONES.ROGER) SNODE=CD.TANDEM SNODE=CD.ESDS.

C" DATA -". C" RECORDSIZE(262 880) -".VSAM01.NODE COPY FROM (DSN="%mymodule#m1_d01>cds>cfg>mynode>data>myfile" SYSOPTS=":datatype=text:" SNODE) TO (DSN=MSP1. DMRTAMS (using IDCAMS commands specified in the Process) first deletes the old data set if it exists.DATA2) -". C" FREESPACE(0 0) -". C" NAME(RSMITH.JANUARY DISP=(NEW.OUTPUT. C" KEYS (8 6) -".LRECL=0. C" RECORDS(2500 100) -". C" (CONTROLINTERVALSIZE(4096) -".DSORG=PS) PNODE) - .MSP1.Chapter 4 / COPY Statement Examples 4-103 Example 4. C" (NAME(RSMITH.OUTPUT DISP=SHR SNODE) - STEP1 STEP2 Copying Between MSP and Stratus VOS Nodes Example 4.1)) DCB=(RECFM=U.BLKSIZE=23040. VSAM01 PROCESS SNODE=SC. PROC2 STEP01 PROCESS SNODE=VOS. C" (CONTROLINTERVALSIZE(512) -".RETURN=(DD) SYSOUT=X" C" DELETE (RSMITH. C" INDEXED -". copies a text file from Stratus VOS to MSP.CATLG) SPACE=(23040.INDEX2))")) SNODE COPY FROM (DSN=$B. The DSN and SYSOPTS strings for the Stratus VOS system must be in the proper case for Stratus VOS and enclosed in double quotation marks.VSAM01. It then defines and allocates it for use in the subsequent COPY statement.209: Allocating a VSAM Data Set and Copying a File from Tandem to MSP This Process invokes CONNECT:Direct DMRTAMS for VSAM file allocation.VSAM01.PAYROLL. C" NOIMBED -".MONTHLY.210: Copying a File from Stratus VOS to MSP This Process. C" NAME(RSMITH.RSMITH PNODE=CDCLX SNODEID=(RMITH.RSMITH) SACCT=’CHARGE TO ACCOUNTING’ RUN TASK (PGM=DMRTAMS. Note: The file transmitted is a Tandem key-sequenced file. C" INDEX -". C" DEFINE CLUSTER -".OUTPUT) CLUSTER ".VSAM01. C" VOLUMES(M80003) -".KDSDFIL DISP=SHR PNODE) TO (DSN=RSMITH.OUTPUT. C" SHAREOPTIONS(2)) -". C" NOREPLICATE -".(2.OUTPUT) -". PARM=(C"FREE=CLOSE.VSAM01.ABCFILES. submitted from the MSP node.

.W. The Process was initiated from the Stratus VOS node.)) snode disp=rpl ) pend Copying Between MSP and VM Nodes Example 4.NODE1 CLASS=10 COPY FROM (DSN=SMITH. MSPTOVM1 PROCESS STEP01 SNODE=CD. If the file does not exist. the CONNECT:Direct system creates it as indicated by the DISP=RPL parameter.191) DISP=(RPL)) - . The ckpt parameter is generally coded between the FROM and TO clauses of the COPY statement. recfm=FB. If the file exists.211: Copying Files Between Stratus VOS and MSP This Process copies a file from Stratus VOS to MSP.WIVVB. The ckpt parameter specifies that no checkpoints will be taken. the CONNECT:Direct system replaces it. lrecl=80.FDATA DISP=SHR UNIT=SYSDA) TO (DSN=’TEMP1 OUTPUT’ LINK=(IVVB.4-104 CONNECT:Direct Process Guide Concepts and Examples Example 4. mspxx step01 process snode=msp.212: Copying a File from MSP to VM This Process copies an MSP data set to a file on the 191 disk of VM user IVVB.(1. blksize=2400 ) space=(TRK.VM.node copy from ( file=%mymodule#m1_d01>cds>cfg>mynode>data>myfile pnode ) ckpt=no to ( file=file2 dcb=( dsorg=PS.

NODE1 NOTIFY=USERID COPY FROM (DSN=CHELSEN. the CONNECT:Direct system replaces it. excluding all members with names beginning with the characters DM.DATA DISP=OLD) TO (DSN=’!SPOOL VKK SALES DATA’) PROCESS - .SALES.WPEI.SL.NODE1 NOTIFY=USERID COPY FROM (DSN=RRT.DATA.ACCT DISP=SHR EXCLUDE=(DM*) UNIT=SYSDA) TO (DSN=’* ACCTDATA’ LINK=(PEI.214: Copying an MSP File to Tape on VM This Process copies a disk file from a CONNECT:Direct for MSP node to tape at the CONNECT:Direct for VM node.VM.EXPDT=92067) SNODE DISP=RPL) - Example 4. TAPE STEP01 PROCESS SNODE=CD.Chapter 4 / COPY Statement Examples 4-105 Example 4.W.215: Copying an MSP File to Spool on VM This Process copies a disk file from a CONNECT:Direct for MSP node to spool at a CONNECT:Direct for VM/ESA node.VM.300) DISP=(RPL)) - Example 4. the CONNECT:Direct system creates it as indicated by the DISP=RPL parameter.DATA. to files on VM with file names corresponding to the member names on MSP. If the file exists. READER STEP01 SNODE=CD.FILE DISP=SHR) TO (DSN=TAPE. STEP01 COPY FROM (DSN=$MSP1. If the file does not exist.PDS. The file type is ACCTDATA.FILE UNIT=TAPE LABEL=(1.213: Copying an MSP PDS to a Set of Files on VM The COPY statement in this example copies a PDS.

The /OVERRIDE qualifier can be added either to the MOUNT command or to the tape label parameter. Note that the string of SYSOPTS parameters is enclosed in double quotation marks.O:E.PASSWORD) COPY FROM (DSN=DUXX:<DIRECTORY>TESTFILE. All SYSOPTS keyword values must be enclosed in parentheses. bracketing backslashes (\) and the double bar (||) concatenation characters are required. CONNECT:Direct syntax requires using backslashes to continue the SYSOPTS over multiple lines when the Process is submitted from an MSP node.217: Using the SYSOPTS Parameter (MSP to OpenVMS) This Process shows how to specify the SYSOPTS parameter with the MOUNT and PROTECTION keywords. When one or more SYSOPTS parameters are specified and they continue across several lines.MSP1.W:E’ "\) - Example 4.MEMBERS SNODE) TO (DSN=DUA0:[RJONES.4-106 CONNECT:Direct Process Guide Concepts and Examples Copying Between MSP and OpenVMS Nodes Example 4. and the entire SYSOPTS string must be enclosed in double quotation marks.DAT’ DISP=RPL SNODE SYSOPTS=\"MOUNT=’MSA0:/NOLABEL’\ || \ NODISMOUNT\ || \ PROTECTION=’S:E.DAT SYSOPTS="MOUNT=’MUXX: TAPE /OVERRIDE=ID’ ") - . The example shows the qualifier added to the parameter. SYSOPTS3 PROCESS STEP01 SNODE=CD.INPUT83.NODE NOTIFY=CDA1 SNODEID=(RSMITH.VMS. Specifying the /OVERRIDE qualifier causes the name of the tape volume to be ignored.NODE COPY FROM (DSN=SMITH.218: Copying a File from Disk to Tape The following example copies an OpenVMS file from disk to tape.JOEUSER SNODEID=(JOEUSER.G:E.CDTEST]PDSTEST.TLB DISP=OLD DCB=(DSORG=PO) SYSOPTS="LIBRARY=’TEXT’ REPLACE" PNODE) - Example 4. T1 STEP01 PROCESS SNODE=SC.CNTL(IEBGENER) PNODE) TO (DSN=’MSA0:TAPE.216: Copying PDS Members from MSP to OpenVMS This Process copies a PDS and all of its members from MSP to a text library on the VAX.ROGER) HOLD=YES COPY FROM (DSN=SMITH.VMS. PDSCPY1 STEP01 PROCESS SNODE=CD.DAT) TO (DSN=MUXX:TESTFILE.

219: Copying a File from Tape to Disk The following example copies an OpenVMS file from tape to disk.TBL{JS.NODE STEP01 COPY FROM (DSN=DUA0:[SMITH.NODE COPY FROM (DSN=SMITH.DEF}’ PROTECTION=’S:RW.PASSWORD) COPY FROM (DSN=MUXX:TESTFILE.MSP1.MSP1. RECV_VB STEP01 PROCESS SNODE=CD.MEMBERS DISP=RPL SNODE) - . the CONNECT:Direct system will extract a module from the OpenVMS text library CD_1. Note the use of the asterisk (*) with the SELECT parameter. Using the XLATE keyword in a Process overrides the default translation table.221: Copying a Single Entry from the OpenVMS Text Library to an MSP Member This Process sends a single entry from an OpenVMS text library to a member of a PDS on MSP. It illustrates how a user can specify a user-defined translation table.TXT]CD_1.JOEUSER SNODEID=(JOEUSER.TLB PNODE SELECT=(BOOLEAN) SYSOPTS="LIBRARY=’TEXT’" DISP=OLD DCB=(DSORG=PO)) TO (DSN=SMITH. ALLENT1 STEP01 PROCESS SNODE=CD.NODE COPY FROM (DSN=DUA0:[JSMITH. T2 STEP01 PROCESS SNODE=SC.DAT SYSOPTS="MOUNT=’MUXX: TAPE /OVERRIDE=ID’ ") TO (DSN=DUXX:<DIRECTORY>TESTFILE.220: Copying from MSP to OpenVMS and Specifying a User-Defined Translation Table This Process. copies from a CONNECT:Direct for MSP node to a CONNECT:Direct for OpenVMS node.DATA]ACCT.Chapter 4 / COPY Statement Examples 4-107 Example 4.TBL.TLB PNODE SELECT=(*) SYSOPTS="LIBRARY=’TEXT’" DISP=OLD DCB=(DSORG=PO)) TO (DSN=JSMITH.TXT SYSOPTS="NOBINARY XLATE=’$DSK:[JS. SINGENT1 PROCESS SNODE=CD.222: Copying All Entries from an OpenVMS Text Library to MSP This Process copies all the modules of a text library to respective members of a PDS on MSP.CDTEST SNODE DISP=SHR TO (DSN=$DISK:[JONES.VMS.MEMBERS(DATA) DISP=RPL SNODE) - Example 4. Specifying the /OVERRIDE qualifier causes the name of the tape volume to be ignored.W:RWED’ LIBRARY=’TEXT’ STREAM" PNODE) - Example 4.CDTEST]PDSTEST.MSP1. submitted from the OpenVMS node.DAT) - Example 4.CDTEST]PDSTEST.

Also.ACCTJAN at the MSP node.ROGER) COPY FROM (DSN=DUC4:[ACCT.EXE’ SNODE SYSOPTS="BINARY") TO (DSN=RSMITH.EXE at the OpenVMS node. the following syntax changes must be made: v Enclose the OpenVMS file specification between single or double quotation marks to allow special characters to be passed to the OpenVMS node. PROCESS1 PROCESS STEP01 SNODE=CD. For the appropriate file attribute information. submitted from the OpenVMS node.EXE PNODE SYSOPTS="TYPE=’IMAGE’ BINARY" DISP=RPL) - Example 4.ACCTJAN) SNODE TO (DSN=DUC4:[ACCT.4-108 CONNECT:Direct Process Guide Concepts and Examples Example 4.COM]JAN.ACCTJAN to file specification DUC4:[ACCT. The modified Process is as follows: PROCESS1 PROCESS STEP01 SNODE=CD.ACCTJAN DISP=RPL PNODE) - .COM]JAN.ROGER) COPY FROM (DSN=RSMITH. the SYSOPTS parameter TYPE=IMAGE must be specified.COM>JAN.MSP1 SNODEID=(RSMITH. submitted from the OpenVMS node. v Change the brackets ([ ]) to less than and greater than signs (< >).MSP1 SNODEID=(RSMITH.EXE PNODE SYSOPTS="BINARY") TO (DSN=RSMITH. copies the MSP data set RSMITH.224: Copying an Executable File from an OpenVMS Node to an MSP Node This Process.223: Copying a Data Set from an MSP Node to an Executable File on an OpenVMS Node This Process.ACCTJAN DISP=RPL SNODE) - To submit this Process from the MSP node (the PNODE is an MSP node). BINARY must be specified as part of the SYSOPTS parameter so that ASCII to EBCDIC translation will not occur.VMS SNODEID=(RSMITH.ROGER) COPY FROM (DSN=’DUC4:<ACCT.COM] on device DUC4 to data set RSMITH. BINARY must be specified as part of the SYSOPTS parameter so that EBCDIC to ASCII translation will not occur.EXE in directory [ACCT.COM]JAN. copies the OpenVMS file JAN. PROCESS1 PROCESS STEP01 SNODE=CD.

The TYPE record must be in the TYPE file at the destination (VSE node). Note that a TYPE file record is specified in STEP03.VDATA DISP=SHR) TO (DSN=VDATA.STEP05 DCB=(DSORG=PS BLKSIZE=88 LRECL=84 RECFM=V) UNIT=TNOASGN LABEL=(RETPD=0007) DISP=RPL SNODE) - STEP02 STEP03 STEP04 STEP05 . This record contains the DCB and UNIT information for this file.DYMT.REPORT DISP=SHR) TO (DSN=REPORT. DYMTVSE STEP01 PROCESS SNODE=CD. Different record formats are specified in the steps.STEP01 DCB=(DSORG=PS BLKSIZE=80 LRECL=80 RECFM=FB) DISP=RPL LABEL=(RETPD=0007) UNIT=TNOASGN SNODE) COPY FROM (DSN=$ABC.STEP02 DCB=(DSORG=PS BLKSIZE=3120 LRECL=80 RECFM=FB) UNIT=TNOASGN LABEL=(RETPD=0007) DISP=RPL SNODE) COPY FROM (DSN=$ABC.STEP03 TYPE=MSPDYMT LABEL=(RETPD=0007) DISP=RPL SNODE) COPY FROM (DSN=$ABC.FDATA DISP=SHR) TO (DSN=FDATA.STEP04 DCB=(DSORG=PS BLKSIZE=80 LRECL=0 RECFM=U) UNIT=TNOASGN DISP=RPL LABEL=(RETPD=0007) SNODE) COPY FROM (DSN=$ABC.VSE.UDATA DISP=SHR) TO (DSN=UDATA.Chapter 4 / COPY Statement Examples 4-109 Copying Between MSP and VSE Nodes Example 4.DYMT.SOURCE DISP=SHR) TO (DSN=SOURCE.DALLAS NOTIFY=%USER COPY FROM (DSN=$ABC.225: Copying a File from MSP to VSE (DYNAM/T Tape Files) This multi-step Process copies various sequential files from an MSP node (the SNODE) to VSE DYNAM/T tape files at the PNODE.DYMT.DYMT.DYMT.

PDS.TEST01 DISP=(RPL)) SUBMIT FILE=SYS:\CDNW\PROCESS\NW2OS390.4-110 CONNECT:Direct Process Guide Concepts and Examples Example 4.DYNAM.(300)) PNODE) - Copying Between NetWare and OS/390 Nodes Example 4.227: Copying a File from NetWare to OS/390 This multi-step Process copies a text file from a CONNECT:Direct for NetWare node to an OS/390 node.CDP SUBNODE=PNODE HOLD=NO CLASS=1 PRTY=10 RETAIN=NO PNODEID=(USER02.NODE1 SNODE=SC.V10702 HOLD=NO CLASS=1 PRTY=10 RETAIN=NO SNODEID=(USER01.FILE DISP=NEW UNIT=DNOASGN VOL=SER=POOL01 SPACE=(1.NODE1 COPY FROM (DSN=MSP1.PSWD02) STEP01 STEP02 . PROC01 PROCESS SNODE=OS390.KEEP) SNODE) TO (DSN=VSE.VSE.MSP1. a NetWare Process named NW2OS390. After the copy step. VSEMSP STEP01 PROCESS PNODE=SC. The file on VSE will be dynamically allocated by DYNAM in a virtual disk pool defined to DYNAM as POOL01.DATASET(TESTDATA) DISP=(SHR.CDP is submitted.226: Copying an MSP PDS Member to a New VSE File in a DYNAM Pool This Process copies a PDS member on MSP to a DYNAM-controlled file on VSE.PSWD01) COPY FROM (FILE=DATA1:\INPUT\TEXT\IN01 PNODE /*$NETWARE$*/) TO (SNODE /*$OS390$*/ FILE=CSG1.

228: Copying a File from NetWare to UNIX This Process copies a text file from a CONNECT:Direct for NetWare node to a UNIX node.AIX.BLANKS(YES)") TO (SNODE /*$OS400$*/ FILE=NW11002/FILE(M1) SYSOPTS="FILETYPE(*SRC) RCDLEN(92) MAXMBRS(*NOMAX) SIZE(*NOMAX) TYPE(MBR)") COMPRESS EXTENDED STEP01 . The file is compressed during transfer.V1200 HOLD=NO CLASS=1 PRTY=10 RETAIN=NO SNODEID=(user01.PSWD) COPY FROM (FILE=DATA1:OUTPUT\BENCHM1 PNODE /*$NETWARE$*/ DISP=(SHR) SYSOPTS="DATATYPE(TEXT) STRIP. The text file from the NetWare node will be copied to a CONNECT:Direct for OS/400 node as a member of a physical database file.Chapter 4 / COPY Statement Examples 4-111 Copying Between NetWare and UNIX Nodes Example 4. PROC01 PROCESS SNODE=CD2200 HOLD=NO CLASS=1 PRTY=10 RETAIN=NO SNODEID=(USER01.dallas) COPY FROM (FILE=DATA1:\INPUT\TEXT\FILE1 PNODE /*$NETWARE$*/ DISP=(SHR)) TO (SNODE /*$UNIX$*/ FILE=/CSG/users/nw2u01 DISP=(RPL)) PEND PROCESS STEP01 Copying Between NetWare and OS/400 Nodes Example 4. The DISP=RPL parameter on the COPY TO step will replace the file on the CONNECT:Direct for UNIX node if it exists or create a new file if the file does not exist.229: Copying a File from NetWare to OS/400 This Process copies a text file from a CONNECT:Direct for NetWare node to an OS/400 node. PROC01 SNODE=CD.

4-112

CONNECT:Direct Process Guide Concepts and Examples

Example 4.230: Copying an OS/400 Text File to a NetWare Node
This Process copies a text file from a CONNECT:Direct for OS/400 node to a NetWare node. The text file is a member of a physical database on the OS/400 node and will be copied to a text file on the NetWare node. The STRIP.BLANKS(YES) specified in SYSOPTS allows trailing blank characters at the end of each record to be removed from a line of text before it is written to the NetWare text file.
PROC01 PROCESS SNODE=CD2200 HOLD=NO CLASS=1 PRTY=10 RETAIN=NO SNODEID=(USER01,PSWD) COPY FROM (FILE=NW11002/FILE(M1) SNODE /*$OS400$*/ DISP=(SHR,SHR,SHR) SYSOPTS="TYPE(MBR) FTYPE(TEXT)") TO (PNODE /*$NETWARE$*/ FILE=DATA1:USERS\USER01\OS400\M1 DISP=(RPL) SYSOPTS="DATATYPE(TEXT) STRIP.BLANKS(YES)")

STEP01

Copying Between Windows 95/NT and OS/390 Nodes
Example 4.231: Copying a File from Windows 95/NT to OS/390
This Process copies a text file from a remote Windows 95 system (where CONNECT:Direct is not installed) to an OS/390 partitioned data set (PDS). When copying a file to or from a remote computer such as Windows 95, Windows for Workgroups, or another Windows 95/NT system, you must use the Universal Naming Convention (UNC) method for specifying the file name. Do not use a drive letter. The UNC consists of two backslashes, the computer name, a single backslash, and the share name. In this example, the computer name is WIN95_SYS1 and the share name is ROOT_C.
NT2OS390 PROCESS REMOTE=SS.OS390/*$OS390$*/ HOLD=NO CLASS=1 PRTY=10 EXECPRTY=10 RETAIN=NO COPY FROM (FILE=\\WIN95_SYS1\ROOT_C\DATA\OUT\SALESJAN.DAT LOCAL/*$WINDOWS NT$*/ SYSOPTS="datatype(text)") TO (REMOTE/*$OS390$*/ FILE=SALES.DATA.JAN(MBR99) DISP=(RPL,CATLG)) PEND

STEP01

Chapter 4 / COPY Statement Examples

4-113

Copying Between Windows 95/NT and Tandem
Example 4.232: Copying a File from Windows 95/NT to Tandem
This Process copies a text file from a Windows 95/NT system to a Tandem node. Each system operation is enclosed in single quotation marks. Double quotation marks enclose the entire SYSOPTS statement.
NT2TAN REMOTE=SS.TAN/*$TANDEM$*/ HOLD=NO CLASS=1 PRTY=10 EXECPRTY=10 RETAIN=NO LOCALID=(USR1,PSWD1) REMOTEID=(SS.USER01,PSWD01) STEP01 COPY FROM (FILE=C:\OUTPUT\BINARY\SALES.JAN LOCAL/*$WINDOWS NT$*/ SYSOPTS="DATATYPE(BINARY)") TO (REMOTE/*$TANDEM$*/ FILE=$SALES.DATA.JAN) DISP=(RPL, ,DELETE) SYSOPTS="‘SET CODE O’ ‘SET TYPE U’ ‘SET EXT(700 300’ ’SETBLOCK 4096‘ ‘SETMAXEXTENTS600’") COMPRESS PRIMECHAR=X’20’ PEND PROCESS

4-114

CONNECT:Direct Process Guide Concepts and Examples

you can be signed on to CDA and submit the following RUN JOB Process from CDA. Example 5. the Process. In both cases. if you specify SNODE. In this case.STREAM. the job is submitted to the secondary node. CDB.LIB(JOB123) PNODE) Note: The JCL must exist on the node where you want it to execute. the job contained in JOB. to execute the job titled JOB123 in the library JOB. In this example. .STREAM. Note: The data set specified in the RUN JOB statement must exist on CDB. PROC1 STEP01 PROCESS RUN JOB SNODE=CDB (DSN=JOB.LIB. PROC1 STEP01 PROCESS RUN JOB SNODE=CDB (DSN=JOB. CDA. the job is submitted to the primary node. the other node involved in the Process is the SNODE. Note: All examples for OS/390 are also valid for MVS except where specified.LIB(JOB123) SNODE) Alternatively. PROC1. In the following example.Chapter 5 RUN JOB Statement Examples This chapter contains examples of CONNECT:Direct RUN JOB statements for various CONNECT:Direct platforms. the job is submitted to the internal reader if both nodes are running CONNECT:Direct for OS/390. PROC1 then instructs the SNODE. is submitted from the PNODE. The job is submitted to the OS/390 internal reader on CDB.LIB(JOB123) is submitted to the OS/390 internal reader on the PNODE system. The node that you submit the Process to is the PNODE or Process control node by definition.STREAM. If you specify PNODE on the RUN JOB. the data set specified in the RUN JOB must exist on CDA (PNODE).1: Submitting a Job to the OS/390 Internal Reader You can submit a RUN JOB Process from either the SNODE or the PNODE.STREAM.

5-2

CONNECT:Direct Process Guide Concepts and Examples

Example 5.2:

Submitting a Process with a RUN JOB on OpenVMS

The following example shows a Process that submits the command procedure TEST_RJOB.COM from the directory JSMITH.TEST on disk DUC4 on the SNODE (OpenVMS). The SYSOPTS, or system-specific parameters, consist of four parameters, each enclosed in single quotes. P1, P2, and P3 are parameters passed to the TEST_RJOB.COM command procedure. LOG displays the TEST_RJOB.COM commands as they execute to view for error and completion messages. The entire SYSOPTS is enclosed in double quotation marks.
RUNJOBT STEP01 PROCESS RUN JOB SNODE=CD.VMS.SMITH (DSN=’DUC4:[JSMITH.TEST]TEST_RJOB.COM’ PNODE SYSOPTS="P1=’DEF’ P2=’123’ P3=’BR549’ NOPRINT LOG=’DUC4:[JSMITH.TEST]TEST.LOG’"

-

Example 5.3:

Printing and Deleting the Log File (CONNECT:Direct for OpenVMS)

In this example, a command procedure is submitted to the SNODE for execution in the batch queue. No parameters are specified. The log file is printed and deleted because the default parameters of PRINT and NOKEEP are assumed. Note that the command procedure NOTIFY.COM is executed from the default login directory of the submitter.
RUNJ1 PROCESS RUN JOB SNODE=CD.VAX (FILE=‘NOTIFY.COM’

SNODE)

Example 5.4:

Keeping the Log File (CONNECT:Direct for OpenVMS)

In this example, a command procedure executes on the VAX in the batch queue. Only the NOPRINT subparameter is specified, resulting in the log file being kept and named after the first (or only) file in the job.
RUNJ2 PROCESS RUN JOB SNODE=CD.VAX (FILE=‘NOTIFY.COM’ SNODE) SYSOPTS="NOPRINT"

-

Example 5.5:

Printing and Keeping the Log File (CONNECT:Direct for OpenVMS)

In this example, NOTIFY.COM executes on the SNODE. During Process execution, the parameter (P1) is passed to the command procedure. The log file is printed and kept. LOG is not specified because KEEP ensures that the output is saved.
RUNJ3 PROCESS RUN JOB SNODE=CD.OS390 (FILE=‘NOTIFY.COM’ SNODE) SYSOPTS="P1=‘SUCCESS’ PRINT

KEEP"

Example 5.6:

RUN JOB Facility (VM to VM)

This Process sends the file named SIGNON CDOP in PUN format to the reader for CDA5A. This Process can be used to transmit jobs to be processed by VMBATCH.
RUNJOB2 STEP01 PROCESS RUN JOB SNODE=CD.VM.NODE NOTIFY=CDA8 (SNODE DSN=’SIGNON CDOP’ LINK=(CDA6,RCDA6,RR,191) BATCHID=CDA5A)

-

Chapter 5 / RUN JOB Statement Examples

5-3

Example 5.7:

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 for Tandem system cannot execute the RUN JOB statement; however, the CONNECT:Direct for 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 PROCESS 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 -

STEP2

STEP3

STEP4

Example 5.8:

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)\ \)\ \"\ -

Example 5.9:

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

5-4

CONNECT:Direct Process Guide Concepts and Examples

Example 5.10:

Executing Commands on UNIX from a Process Submitted from OS/390

This Process shows how to initiate a Process from OS/390 that executes commands at a UNIX node. The SYSOPTS string must be in the proper case for UNIX and enclosed in double quotation marks.
PROC2 STEP01 PROCESS RUN JOB SNODE=UNIX.NODE (DSN=UNIX) SNODE SYSOPTS="/company/payroll/monthly/jan.exe"

-

Example 5.11:

Running a Job on OS/390 from a Process Submitted on UNIX

This Process shows how to initiate a Process from UNIX to run a job at an OS/390 node. The DSN string must be in uppercase characters to satisfy OS/390 syntax requirements.
proc2 step01 process run job pend snode=OS390.node snodeid=(user01,pswd01) (dsn=SRCDATA.SET(TEST)) snode

Example 5.12:

Executing Commands on UNIX from a Process Submitted from Tandem

This Process shows how to initiate a Process from Tandem that executes commands at a UNIX node. The SYSOPTS string must be in the proper case for UNIX and enclosed in double quotation marks.
RUNJOB1 UNIXJOB PROCESS RUN JOB SNODE=CD.v1200 snodeid=(user,pswd) SYSOPTS="ls -l > outjob.tan" SNODE -

Example 5.13:

Running a Job on Stratus VOS from a Process Submitted from Another Stratus VOS node

This Process shows how to initiate a Process that executes commands at another Stratus VOS node. The sysopts string must be enclosed in double quotation marks.
proc2 step01 process run job snode=VOS.node snode sysopts="start_logging %mymodule#m1_d01>mydata>list.out; list %mymodule#m1_d01>cds>cfg>mynode>data>*; stop_logging"

pend

PSWD01) PNODE (DSN=CSG.17: Running a Job on OS/390 from a Process Submitted on NetWare This Process initiates a Process from NetWare to run a job at an OS/390 node. RJ PROCESS SNODE=CD.14: Executing Commands on Stratus VOS from a Process Submitted from OS/390 This Process shows how to initiate a Process from OS/390 that executes commands at a Stratus VOS node.16: Running a Job on OS/390 from a Process Submitted on OpenVME This Process shows how to initiate a Process from OpenVME to run a job at an OS/390 node.OS390. The SYSOPTS string must be in the proper case for Stratus VOS and enclosed in double quotation marks.OS390.node snode (dsn=SRCDATA. proc2 step01 process run job pend snode=OS390.OS390. PROC2 STEP01 PROCESS RUN JOB SNODE=VOS.node snodeid=(usera.pswda) (dsn=NEWDATA.V10702 HOLD=NO CLASS=1 PRTY=10 RETAIN=NO SNODEID=(USER01.pm" - Example 5.NODE SNODE (DSN=VOS) SYSOPTS="%mymodule#m1_d01>company>payroll> monthly>jan. The RUN JOB statement named Step1 executes job TEST in data set CSG.SET(TEST)) snode Example 5.NW. proc2 step01 process run job pend snode=OS390.Chapter 5 / RUN JOB Statement Examples 5-5 Example 5.NW(TEST)) STEP1 RUN JOB . The DSN string must be in uppercase characters to satisfy OS/390 syntax requirements.SET(TEST)) Example 5.15: Running a Job on OS/390 from a Process Submitted on Stratus VOS This Process shows how to initiate a Process from Stratus VOS to run a job at an OS/390 node. The DSN string must be in uppercase characters to satisfy OS/390 syntax requirements.

EXE and the /K option.out. such as del.5-6 CONNECT:Direct Process Guide Concepts and Examples Example 5. When issuing a console command.18: Running a Job on Windows 95/NT from a Process Submitted on UNIX This Process shows how to initiate a Process from UNIX that executes commands at a Windows 95/NT node.EXE) ARGS(/K C:\CDOS2\BIN\CDMSG. specify the command in the sysopts parameter exactly the way it is issued at the console prompt directly on the 95/NT system.* >>d:\users\jdoe1\list. using CMD.19: Submitting a RUN JOB on OS/2 Warp The following Process issues the CONNECT:Direct for OS/2 Warp cdmsg command to run on the PNODE. the command dir is issued on the 95/NT node with the output redirected to a file called list.nt retain=yes prty=yes runj01 run job snode sysopts="cmd(dir d:\users\jdoe1\*.NODE CLASS=1 RUN JOB (DSN=PCOS2) SYSOPTS="CMD(C:\OS2\CMD. process Use the previous example as a Windows 95 example by using a Windows 95 node for the snode parameter.CFG OCMM023I) TYPE(WINDOW) ATTR(MAXIMIZED)" PNODE . Example 5. RJOS2 step1 PROCESS SNODE=OS2. In this example. ntsub1 snode=cd. dir.EXE -f C:\CDOS2\CFG\MSGFILE. Using /C instead of /K destroys the command shell after the process has completed. The command shell is not destroyed. creates a command shell and executes the process. or move.out)" pend. This method.

1: RUN TASK Examples for CA-7 (OS/390 to OS/390) The following is an example of a RUN TASK statement that interfaces with the CA-7 scheduling package.PARM=(CLxx"D=&UCC7DSN")) SNODE EIF PROCESS - HF201 HF202 - .NODEB &DSN1=Z123456.TARGET.TARGET COPY FROM (DSN=&DSN1 DISP=SHR) TO (DSN=&DSN2 DISP=(RPL. replace xx with the length of the entire PARM including the d=. regardless of completing the request. Note: All OS/390 examples are also valid for MVS except where specified. Inc.SRC &DSN2=Z456789. the job scheduling system by Computer Associates International. Example 6. Note: For Processes with RUN TASK statements running U7SVC programs. CONNECT:Direct for OS/390 must not be running under CA-7 control. the symbolic variable. STEP01 RUN TASK (PGM=U7SVC. &UCC7DSN. is resolved to Z456789. The U7SVC program is supplied by CA-7. The U7SVC program may return a code of 0. PARM=(CLxx"d=&dsn") ) SNODE - In the following example.Chapter 6 RUN TASK Statement Examples This chapter contains examples of CONNECT:Direct RUN TASK statements for various platforms. Note: To properly execute with CA-7. which is the proper format for the U7SVC program. PROC02 SNODE=CD.CATLG)) SYMBOL &UCC7DSN=&DSN2 IF (HF201=0) THEN RUN TASK (PGM=U7SVC.

JOB=\ || &POSTJOB || \.OUT DISP=(OLD. C’DATREC=&&JCLL=JOBP.) SAMPLE1 PNODE=&PNODE SNODE=&SNODE HOLD=NO RUN TASK (PGM=DMRTDYN.SAMPLE..2: RUN TASK Using Control-M The following RUN TASK statement shows an example of a Control-M interface: RUN_TASK PROCESS SNODE=CCC.3: RUN TASK Using DMRTDYN This Process..SKEL’.SAMP. the LOCATE step receives a return code of 0.FT1A..OUT DISP=RPL) PROCESS - LOCATE DELETE - STEP01 - The command used to submit SAMPLE1 is as follows: SUBMIT PROC=SAMPLE1 &PNODE=CD.SAMP.CI1A. C’DATREC=&&GROUP=CONNECT-DIRECT’. Through the RUN TASK statement.SAMP. (STEP01 copies from the PNODE to the SNODE. DELETE. If this data set exits.DELETE)" F’-1’ C"UNALLOC DSN=&HLQ2.. C’DATREC=SKELNAME:CDSKEL’. is submitted from a CONNECT:Direct for OS/390 node. PARM=(C"ALLOC DSN=&HLQ2.OUT")) SNODE IF (LOCATE = 0) THEN RUN TASK (PGM=DMRTDYN.JCLL’.REMOTE &HLQ1=$LOCAL &HLQ2=$REMOTE - . C’DATREC=&&DSN=’. PARM=(C"LOCATE DSN=&HLQ2.RZ1 STEP01 RUN TASK (PGM=CTM@IF10 PARM=( C’FUNC=LOADNSKE’.6-2 CONNECT:Direct Process Guide Concepts and Examples The following RUN TASK statement shows another way to interface with CA-7: STEP01 RUN TASK PGM=U7SVC. and the next step. C’UNIQID=SKA#Y4OTH4T’.OUT")) EIF COPY FROM (DSN=&HLQ1. C’DATREC=&&DESC=CSLUX_TESTAUSLOESUNG’)) SNODE - Example 6. PARM=(\’DEMAND. DMRTDYN determines if the data set exists at the SNODE. C’DATREC=SKELLIB :JOBP. regardless of the return code received from the LOCATE step. SAMPLE1. deletes the data set.SAMP.LOCAL &SNODE=CD. STEP01 executes. C’DATREC=&&JOBNAME=Y4OTH4T’.IN) TO (DSN=&HLQ2.SCHID=001’\)) SNODE - Example 6..

Bracketing backslashes allow for continuation of quotation marks when they begin and end on different lines. The RUN TASK then deletes the library (with all its objects) from the OS/400 node.CNTL(LRECL80) DISP=SHR ) RUN TASK (PGM=AS400) SNODE SYSOPTS=\"\ \ CMD( \ \ DLTLIB \ \ LIB(LIBRY) \ \ ) \ \"\ - STEP001 STEP002 .OS390.CDA PRTY=8 NOTIFY=%USER CLASS=4 HOLD=NO SNODEID=(RSMITH. CONNECT:Direct syntax requires using backslashes to continue the SYSOPTS over multiple lines. A copy of the library is saved to SAVEFILE1 in the library TESTDT1. and the entire SYSOPTS string must be enclosed in double quotation marks.Chapter 6 / RUN TASK Statement Examples 6-3 Example 6.CD1 PNODE=SC. All SYSOPTS keyword values must be enclosed in parentheses. STEP003 RUN TASK (PGM=AS400) SNODE SYSOPTS=\"\ \CMD( \ \CRTSAVF \ \ FILE(TESTSV1/SAVEFILE1) \ \ TEXT(’CREATED BY PROCESS CDTEST’) \ \ ) \ \CMD( \ \SAVLIB \ \ LIB(TESTDT1) \ \ DEV(*SAVF) \ \ SAVF(TESTSV1/SAVEFILE1) \ \ ) \ \"\ - Example 6.OS400.4: Creating and Saving an Online Save File Through CONNECT:Direct for OS/400 This RUN TASK statement creates the online save file named SAVEFILE1 in the library TESTSV1 on the OS/400.RSMITH) COPY FROM ( SNODE DSN=’LIBRY/RSMITH(LRECL80)’ SYSOPTS="TYPE(MBR)" DISP=SHR ) COMPRESS TO ( PNODE DSN=RSMITH.5: 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. PROC#001 PROCESS SNODE=OS400.

NODE (PGM=VMS) SNODE SYSOPTS=\"CMD=’SUBM/LOG=CDL:CD/USER=USR/PARA (\ || &FILENM || \)CDC:RCV_CD’"\ - .6-4 CONNECT:Direct Process Guide Concepts and Examples Example 6. STEP012 RUN TASK (PGM=AS400) SNODE SYSOPTS=\"\ \CMD( \ \ SNDBRKMSG \ \ MSG(’PROCESS NEWACT HAS COMPLETED’)\ \ TOMSGQ(DSP07) \ \ ) \ \"\ - Example 6.7: Restoring Libraries Through CONNECT:Direct for OS/400 This Process restores to the OS/400 system the library named TESTDT1 in the save file named SAVEFILE2 in library TESTSV1.6: Notifying the OS/400 User of Successful Process Completion This RUN TASK statement sends the message PROCESS NEWACT HAS COMPLETED to the message queue of workstation DSP07. STEP008B RUN TASK (PGM=AS400) SNODE SYSOPTS=\"\ \CMD( \ \ RSTLIB \ \ SAVLIB(TESTDT1) \ \ DEV(*SAVF) \ \ SAVF(TESTSV1/SAVEFILE2) \ \ RSTLIB(TESTRL1) \ \ ) \ \"\ - Example 6.8: Submitting a Process with a RUN TASK on OpenVMS from an OS/390 Node The following example shows a Process with a RUN TASK statement submitted from OS/390 to execute on an OpenVMS node: RUNTASK STEP01 PROCESS RUN TASK SNODE=CD. This library is restored to a library named TESTRL1.

Chapter 6 / RUN TASK Statement Examples

6-5

Example 6.9:

Initiating a RUN TASK Statement at the Tandem Node (OS/390 to Tandem)

Using conditional logic, this Process executes a program based on the completion code of STEP01. The PGM statement limits the user to eight characters. Concatenation characters are required within the RUN TASK statement because the parameters being passed to FUP are on multiple lines. TERM is coded on the RUN TASK statement so CONNECT:Direct Processes can continue uninterrupted in the event the program being executed abends. The Process is submitted on OS/390.
PROC1 STEP01 STEP02 SNODE=CD.TAN SNODEID=(117.202,PSWRD) COPY FROM (PNODE DSN=JSMITH.GENPROC.LIB(COPY) DISP=SHR) TO (SNODE DSN=$B.ROGER.ACCTJAN DISP=RPL) IF (STEP01 GT 0) THEN EXIT EIF RUN TASK (PGM=FUP SYSOPTS="(/IN $USER.BGK.T1, TERM $ZTNP1.#PTH001H/)" SNODE PROCESS -

STEP03

-

Example 6.10:

Using Symbolics with a RUN TASK Statement (OS/390 to Tandem)

This Process is submitted from the OS/390 node to run a program at the Tandem node. The Process is structured so that the program name (PGM) and associated run-options for the Tandem RUN command are symbolics. (Symbolics allow you to predefine a Process that can be used for multiple applications.) The symbolics will be resolved when the Process is submitted. Because the NAME parameter is followed by a space, Tandem will assign a name to the Tandem process.
PROCESS1 PROCESS STEP01 RUN TASK PNODE=CD.OS390 SNODE=CD.TANDEM (PGM = &PGM PARM=(\ "/IN \ ,OUT \ ,PRI \ ,CPU \ ,NAME \ /")\) SNODE -

\ \ \ \ \

|| || || ||

&INFILE &OUTFILE &PRI &CPU

|| || || ||

The following CONNECT:Direct syntax rules apply to this Process: v The string of Tandem RUN command options must be enclosed in forward slashes (/). This is a Tandem syntax requirement. v 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. v 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

6-6

CONNECT:Direct Process Guide Concepts and Examples

Example 6.11:

Using Bracketing Backslashes and Quotation Marks (OS/390 to Tandem)

PROCESS1 is coded to be submitted from the OS/390 node to run a program at the Tandem node. The RUN TASK statement executes FUP to copy ACCTJAN with shared access to the spooler, $S.#SPL1, at the Tandem node. Any Tandem process-related error messages are directed to $TERM1. CONNECT:Direct-related messages are directed to $S.#SPL1. 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: v 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. v The string of Tandem RUN command options must be enclosed in forward slashes (/). This is a Tandem syntax requirement. v 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.

Example 6.12:

Using Concatenation Characters (OS/390 to Tandem)

PROC1, PROC2, and PROC3 demonstrate the use of concatenation characters within a CONNECT:Direct for Tandem RUN TASK statement.
PROC1 STEP01 PROCESS RUN TASK SNODE=SYSCLX (PGM=FUP PARM=("/OUT $S.#TEST,TERM $S.#TMP/", "COPY $A.SMITH.TACLCSTM,,SHARE")) SNODE

-

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

\)

-

Chapter 6 / RUN TASK Statement Examples

6-7

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 for 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.
PROC3 STEP01 PROCESS RUN TASK SNODE=SYSCLX (PGM=FUP PARM=(\"/OUT $S.#TEST,PRI 150 \,TERM $S.#TMP,NAME $FUP/ \ COPY $A.SMITH.TACLCSTM,, \ SHARE") \) SNODE

\|| \|| \||

-

Example 6.13:

Running FUP (CONNECT:Direct for Tandem)

This Process starts FUP and copies a disk file to the spooler location $S.#SPL2. Output from the FUP command (success/failure) is sent to $S.#SPL1.
PROC1 STEP1 PROCESSSNODE=SYSCLX RUN TASK (PGM=FUP PARM=(’/NAME $FP,OUT $S.#SPL1/’ ,’COPY $A.PROCVOL.ACCT,$S.#SPL2’) PNODE

-

Example 6.14:

Running RESTORE (CONNECT:Direct for Tandem)

This Process starts RESTORE from a CONNECT:Direct Process. Output from the RESTORE command (success/failure) is sent to $S.#SPL1. An IN file can be used as well. If an abend occurs, any abend message will be sent to the device (in this case, $TAN.#T5) specified by the TERM command.
PROC1 STEP1 PROCESS RUN TASK SNODE=SYSCLX (PGM=RESTORE PARM=(’/OUT $S.#SPL1,NAME $REST,TERM $TAN.#T5/’ ,’$REEL,,LISTALL,NOUNLOAD’) ) PNODE

-

RECFM=FBA.CATLG) SPACE=(TRK.DAT’ CMD = ’REPLY/USER=USER1/BELL SUCCESS’" - .COMDOC DISP=(NEW.#JOECOM/’.TANDEM SNODE=CD.DATA]*.15: Selecting Statistics for the Current Day (CONNECT:Direct for Tandem) This Process performs a RUN TASK to select statistics for the current day.CD (PGM=NDMCOM PARM=(’/OUT $S.FILETEST.RLSE) DCB=(DSORG=PS. BLKSIZE=3990 UNIT=SYSDA VOL=SER=M80006) ) - STEP2 Example 6.6-8 CONNECT:Direct Process Guide Concepts and Examples Example 6.(2. RUNT0005 PROCESS STEP1 RUN TASK SNODE=TANDEM. ’ SEL STAT STARTT=(TODAY. Output will be directed to the terminal. Upon successful execution of the command procedure. The resulting spooler file is then sent to a disk file on OS/390. LRECL=133. the terminal of the specified user will beep.16: Submitting a Process with a CONNECT:Direct for OpenVMS RUN TASK from a Tandem Node This Process.VMS (PGM=VMS) SNODE SYSOPTS="OUTPUT = ’_NDC31’ CMD = ’DIR DUC4:[USER1. ’ EXIT ’ ) ) SNODE COPY FROM (SNODE DSN=$S. VAXRUN STEP1 PROCESS RUN TASK PNODE=CD.)’. will issue a command to invoke a DCL command procedure. where it can be printed or viewed.#JOECOM DISP=OLD) TO (PNODE DSN=JOE.1). submitted from the CONNECT:Direct for Tandem node.

performs a RUN TASK on the CONNECT:Direct for OS/390 node. -". -". -".VSAM0016) C" CLUSTER C" DEFINE CLUSTER ( C" NAME(CSDQA1. * STEP2 COPY FROM ( PNODE DSN=’\cycr. -". TANCPY STEP1 PROCESS RUN TASK SNODE=CD. PARM=(C"FREE=CLOSE.FILETEST. -". -".17: Submitting a Process with a CONNECT:Direct for OS/390 RUN TASK from a Tandem Node This Process.IDX) C" CONTROLINTERVALSIZE(4096) C" SHAREOPTIONS(3) C" ) C" DATA ( C" NAME(CSDQA1.FILETEST.FILETEST.FILETEST.VSAM0001’ DCB=(LRECL=80) SYSOPTS="SET XLATE ON" ) TO ( SNODE DSN=CSDQA1.USR. -". -".FILETEST.VSAM0016. -". -". -". -". -". then copies from Tandem to OS/390.FILETEST. submitted from the CONNECT:Direct for Tandem node. -".FILETEST. -". -".SYSOUT=X C" DELETE (CSDQA1. -". -". ".VSAM0016. -".qafiles. -".PASWRD) ( PGM=DMRTAMS.TANDEM SNODEID=(GRP. -".$user.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.VSAM0016 DISP=OLD ) - .VSAM0016.Chapter 6 / RUN TASK Statement Examples 6-9 Example 6.RETURN=(DD).DATA) C" CONTROLINTERVALSIZE(4096) C" ) C" INDEX ( C" NAME(CSDQA1.VSAM0016.IDX) C" CONTROLINTERVALSIZE(4096) C" ) ) ) SNODE - -". -".DATA) C" CONTROLINTERVALSIZE(4096) C" ) C" INDEX ( C" NAME(CSDQA1. -". -". -".

191)’.DETAIL’)) SNODE - Example 6. DMRTDYN LOCATE1 PROCESSSNODE=SC. submitted from the CONNECT:Direct for OpenVMS node. C’ DISP=(SHR) LINK=(IVVB.191)’.VM.*. the user receives a nonzero return code.18: Submitting a Process with a CONNECT:Direct for Tandem RUN TASK from a OpenVMS Node This Process.VMS SNODE=CD. C’ DISP=(NEW) LINK=(IVVB.RR.WIVVB.\ C’ DISP=(SHR) LINK=(IVVB. TANRUN STEP1 PROCESS RUN TASK PNODE=CD. TESTSYM LOCATE1 PROCESS SYMBOL RUN TASK SNODE=SC.PASWRD) (PGM=FUP PARM=(’/OUT $S. If it does not exist.20: Resolving Symbolics Within DMRTDYN in a RUN TASK Environment (VM) This example illustrates the structure of a CONNECT:Direct Process that passes a parameter with single quotation marks in a DMRTDYN environment.USR. C’ DD=F1’)) PNODE IF(LOCATE1 NE 0) THEN RUN TASK (PGM=DMRTDYN PARM=(C’ALLOC’. C’ DSN=’’PROFILE EXEC’’’.USER1 &XXX=XXX &VMFILE=\’MTT\ &XXX \ FILETYPE’\ (PGM=DMRTDYN PARM=(C’ALLOC ’. C’ DD=F1’)) PNODE EIF RUN TASK (PGM=DMRTDYN PARM=(C’UNALLOC ’ C’ DD=F1’)) PNODE - LOCATE2 - LOCATE3 - Example 6.19: Executing DMRTDYN in a RUN TASK Environment (VM) This Process calls DMRTDYN to determine if a file exists.TESTF. C’ DD=F1’)) PNODE (PGM=DMRTDYN PARM=(C’UNALLOC ’ C’ DD=F1’)) PNODE - LOCATE3 RUN TASK . and a call is made to allocate the file. Backslashes allow the resolution of the symbolic that must be entered between single quotation marks.WIVVB.191)’.TANDEM SNODEID=(GRP. C’ DSN=’ \&VMFILE\ \’’.RR.6-10 CONNECT:Direct Process Guide Concepts and Examples Example 6. will invoke FUP at the CONNECT:Direct for Tandem node and write detailed information about the files in the subvolume to the spooler.#FUPOUT/’ ’INFO $DATA.RR.VM.WIVVB. C’ DSN=’’PROFILE EXEC’’’.USER1 RUN TASK (PGM=DMRTDYN PARM=(C’ALLOC’.

TEST]RTLOG.NODE1 (PGM=VMS) PNODE SYSOPTS="OUTPUT=’DUC4:[JSMITH.OS400 ********************************************************************* * RUN TASK INITIATED FROM VM TO RUN ON OS400 ********************************************************************* STEP3000 RUN TASK (PGM=AS400) SNODE SYSOPTS=\"\ \CMD( \ \ DLTLIB \ \ LIB(TEST1) \ \ ) \ \"\ - Example 6.LIS’ CMD=’SET DEFAULT DUC4:[JSMITH.22: Submitting a Process with a RUN TASK on OpenVMS from an OpenVMS Node The following example shows a Process submitted from OpenVMS and executed on OpenVMS.TEST]’ CMD=’DIR’ CMD=’SHOW TIME’") - .VMS.21: Submitting a Process with a RUN TASK on OS/400 from a VM Node This example is initiated on a CONNECT:Direct for VM/ESA node to execute a RUN TASK on CONNECT:Direct for OS/400. RTVM PROCESS SNODE=CD. The RUN TASK statement is coded with DCL commands that execute synchronously. The SYSOPTS parameter specifies the OS/400 CL command DLTLIB.Chapter 6 / RUN TASK Statement Examples 6-11 Example 6. RTVMS STEP01 PROCESS RUN TASK SNODE=CD.

VSEVSAM STEP1 PROCESS RUN TASK PNODE=SC. C" KEYS(8 6) .NODE1 (PGM=DMRTAMS.*) DESKTOP (YES)’\ . PROC2 STEP01 PROCESS RUN TASK SNODE=UNIX.".VSE. C" DEFINE CLUSTER .6-12 CONNECT:Direct Process Guide Concepts and Examples Example 6.ppswd01) (PGM="NT") SNODE SYSOPTS=\’CMD(D:\\CDCLNT\\PROGPACK. C" DATA( . STEP1 runs the DMRTAMS utility to delete and then define a target VSAM cluster on a CONNECT:Direct for VSE/ESA node.OS390.SYS011 DD=123 DISP=SHR". The desktop parameter is set to YES to allow the program to interact with the desktop.".".DATA) . C" INDEXED . The sysopts string is enclosed in backlashes. STEP2 runs the DMRTDYN utility to unallocate the SYSOUT output data set generated by STEP1. C" REUSE .SEQ. The following example applies to Windows NT: PROC2 STEP01 PROCESS RUN TASK SNODE=NT.EXE D:\\CDCLNT\\PROGRAM.VSAM.NODE1 SNODE=SC.VSAM.".23: Defining a VSE VSAM File and Copying a Sequential File from OS/390 This multistep Process.24: Submitting a Process from OS/390 to Execute UNIX Commands This Process initiates a Process from OS/390 that executes commands on UNIX.".TEST) .". C" NAME(VSE.VSAM.DATASET DISP=(SHR.".NODE SNODE (PGM=UNIX) SYSOPTS="ls -lax > lsout. C" SHR(2)) . C" INDEX( .NODE SNODEID=(puser01. C" SPANNED .".TEST. initiated from an OS/390 node.PAC\\ D:\\CDCLNT\\*. C" CISZ(4096)) .".".VSAM. The SYSOPTS string must be in the proper case for UNIX and enclosed in double quotation marks. STEP3 copies a sequential file from an OS/390 node to a VSE node.KEEP) PNODE) TO (DSN=VSE.".TEST. PARM=(C" MSG=YES DSN=SYSOUT.ncr" Example 6. C" RECORDS(25000 5000) .SYS011 DD=123’)) SNODE COPY FROM (DSN=OS390.VSAM.".25: Submitting a Process from OS/390 to Execute Windows 95/NT Programs This Process initiates a Process from OS/390 that runs a program on Windows 95/NT. consists of RUN TASK statements and a COPY statement.".".". C" CISZ(512)) " )) RUN TASK (PGM=DMRTDYN PARM=(C’UNALLOC DSN=SYSOUT.TEST CLUSTER ". C" NOREPLICATE . C" VOLUMES(VSAM01) .INDEX) .". C" DELETE VSE.TEST DISP=NEW DCB=(DSORG=VSAM) SNODE) - STEP2 STEP3 Example 6. C" RECORDSIZE(262 880) . C" NAME(VSE. C" (NAME(VSE.

BASE. Since no user input is required for the delete command. The sysopts string must be enclosed in double quotation marks. To delete the file. proc1 snode=CD. proc2 step01 process run task pend snode=OS390. proc2 step01 process run task pend snode=unix.passwrd) run task (pgm=AS400) snode sysopts="CMD(DLTLIB LIB(URGRSSDT1)) CMD(DLTLIB LIB(URGRSS))" pend. ls -lax > lsout.P1’. . If the copy is successful.node snode sysopts = "ls. process Example 6. the keyword cmd is specified in the sysopts followed by the del command. a run task statement is performed on the 95/NT node (snode) that will delete the source (from) file on the 95/NT node.node snode (pgm=DMNOTIFY) sysopts="CL44’DATA.29: Submitting a Process from UNIX to Run a Program on Windows 95/NT This Process copies a binary file from an 95/NT node to a UNIX node.dat" &file2="/data/in/reprts01.28: Submitting a Process from UNIX to Run a Program on OS/400 This Process initiates a Process from a UNIX node that executes commands on an OS/400 node to delete two libraries.26: Submitting a Process from UNIX to Run a Program on OS/390 This example shows a Process initiating from UNIX that runs a program on OS/390.F’0010’. process copy1 run1 In the previous example. rather than coding the specific file names in the process.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.Chapter 6 / RUN TASK Statement Examples 6-13 Example 6.ncr" Example 6. To use this illustration as Windows 95 example. The sysopts string must be enclosed in double quotation marks. symbolic variables are used in both the copy and run task statements.27: 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. XL8’FFA8’" Example 6. The sysopts string must be in uppercase characters to satisfy OS/390 syntax requirements. the desktop parameter is set to NO and no console window is created on the 95/NT desktop.NT &file1="d:\data\out\reprts01. you must specify the snode as a Windows 95 snode. proc1 step02 snode=as400 snodeid=(userid.

F’0010’.NODE SNODE (PGM=VOS) SYSOPTS="%mymodule#m1_d01>company>payroll> monthly>jan.pm" Example 6.node snode (pgm=DMNOTIFY) sysopts="CL44’DATA. The sysopts string must be enclosed in double quotation marks. list %mymodule#m1_d01>cd1>cfg>mynode>data>#.6-14 CONNECT:Direct Process Guide Concepts and Examples Example 6. stop_logging" pend Example 6. proc2 step01 process run task pend snode=OS390.BASE. The sysopts string must be enclosed in double quotation marks.P1’. The sysopts string must be enclosed in double quotation marks.node snode sysopts="start_logging %mymodule#m1_d01>mydata>list.33: 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.node snode sysopts = "ls.30: Submitting a Process from OS/390 to Execute Stratus VOS Commands This Process initiates a Process from OS/390 that executes commands on Stratus VOS. ls -lax > lsout. proc2 step01 process run task pend snode=vme.ncr" . The SYSOPTS string must be in the proper case for Stratus VOS and enclosed in double quotation marks.out.32: Submitting a Process with a Run Task on Stratus VOS from Another Stratus VOS Node This Process initiates a Process from a Stratus VOS node that executes commands at another Stratus VOS node. XL8’FFA8’" Example 6.31: Submitting a Process from Stratus VOS to Run a Program on OS/390 This Process initiates a Process from Stratus VOS that runs a program on OS/390. proc2 step01 process run task snode=VOS. PROC2 STEP01 PROCESS RUN TASK SNODE=VOS. The sysopts string must be in uppercase characters to satisfy OS/390 syntax requirements.

FIL)" SNODE . a run task statement is performed on the 95/NT node (snode) that deletes the source (from) file on the 95/NT node. To use this illustration as a Windows 95 example.dat")desktop(no)" eif pend. the desktop parameter is set to NO and no console window is created on the 95/NT desktop. the keyword cmd is specified in the sysopts followed by the del command. run1 Example 6. then terminates the child process.PSWD01) SNODE (PGM=AS400) SYSOPTS="CMD(SNDBRKMSG MSG(’NETWARE PROCESS HAS STARTED!’) TOMSGQ(WSUSER01))" PEND Example 6.dat" pnode) if (copy1 eq 0) then run task snode sysopts="cmd(del "d:\data\out\monthend.EXE because the child process needs to be terminated for Run Task to execute properly.EXE and the /C option. If the copy is successful.node CLASS=1 RUN TASK (PGM=PCOS2) SYSOPTS="CMD(C:\OS2\CMD. This example illustrates a Process from OpenVME to run a program on Windows NT. executes the command. RTOS2 step1 PROCESS SNODE=os2.35: Notifying the OS/400 User of the Start of a Process This Process performs a RUN TASK that sends the message NETWARE PROCESS HAS STARTED to the message queue of workstation WSUSER01.CMD OS2USER C:\MESSAGE.EXE) ARGS(/C C:\CDOS2\BIN\NOTIFY.Chapter 6 / RUN TASK Statement Examples 6-15 Example 6. This method.dat" sysopts="datatype(binary)" snode) to (file="/data/in/monthend. Do not use the /K option for CMD. proc1 copy1 process snode=CD. using CMD.NT copy from (file="d:\data\out\monthend. Since no user input is required for the delete command.36: Submitting a RUN TASK on OS/2 Warp The following Process issues the CONNECT:Direct for OS/2 Warp cdmsg command to run on the PNODE. PROC01 STEP1 PROCESS RUN TASK SNODE=CD2200 SNODEID=(USER01. you must specify the snode as Windows 95.34: Submitting a Process from OpenVME to Run a Program on Windows 95/NT This Process copies a binary file from an 95/NT node to an OpenVME node. To delete the file. creates a child process.

DISP=SHR’ C’NTDISP &NTDISP’” PEND . 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.PASSWORD) RTASK01 RUN TASK SNODE (PGM=DMRTSUB) SYSOPTS=”C’DSN=JSMITH. DMRTASK PROCESS &NTDISP=”RPL” SNODE=CSD.37: 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 for OS/390 node. Note: Refer to the CONNECT:Direct for OS/390 User’s Guide for more information on DMRTSUB.6-16 CONNECT:Direct Process Guide Concepts and Examples Example 6.LEVEL1 /*$MVS$*/ HOLD=NO CLASS=1 PRTY=10 EXECPRTY=10 RETAIN=NO SNODEID=(USERID.PROCESS(SAMPLE).MVS.

Values for symbolics to be resolved on the SNODE are contained within the Process.DALLAS and contains one step which copies the file received from CD. PROCESS1 performs the following functions: v STEP01 copies the source file from CD. two Processes need to be defined.1: Using SUBMIT with Symbolic Substitution (OS/390 to OS/390) In the following examples. Note: All OS/390 examples are also valid for MVS except where specified.LA and forwards it to CD.Chapter 7 SUBMIT Statement Examples This chapter contains examples of CONNECT:Direct SUBMIT statements. The user submits a Process and does not pass symbolics to the Process.NEWYORK.LA. SUB PROC = PROCESS1 . The operator at CD. using CD. a source file at the CD. PROCESS1 is submitted from CD.NEWYORK node. Symbolics for PROCESS2 are supplied from values coded in PROCESS1. To do this.DALLAS. PROCESS2 executes at CD.LA to CD.DALLAS as a store-and-forward node.LA issues the following CONNECT:Direct command to initiate the file transfer. The examples include SUBMIT statements for cross platform Processes. Example 7. v STEP02 within the same Process submits PROCESS2.LA node is to be copied to the CD. The Process on the PNODE passes symbolics to a Process submitted on the SNODE.

as the submitting node for PROCESS2.NEW.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.2: Using SUBMIT with the DSN Parameter (OS/390 to OS/390) In this example.LIB(PROCESS2) PRTY=&PRTY SUBNODE=SNODE &DSN=&DSN2 - STEP01 STEP02 .DALLAS node because the SUBNODE parameter designates the SNODE. symbolics for PROCESS2 are supplied by the operator submitting PROCESS1.7-2 CONNECT:Direct Process Guide Concepts and Examples PROCESS1 executes: PROCESS1 PROCESS PNODE=CD.TEXT &DSN2=USER1. which executes on the CD.DALLAS.LIB(PROCESS2) PRTY=&PRTY SUBNODE=SNODE &DSN=&DSN2 - STEP01 STEP02 PROCESS1 submits PROCESS2: PROCESS2 PROCESS STEP01 PNODE=CD.CATLG) SNODE) SUBMIT DSN=USER1.TEXT1 in CD. Then it submits PROCESS2.TEXT at CD.TEXT at CD.NEWYORK.DATA &DSN2=A345.PROCESS.PROCESS.DALLAS SNODE=CD.DATA PROCESS1 executes: PROCESS1 PROCESS PNODE=CD.TEXT in LA to a file called USER1.DALLAS.LA issues the following CONNECT:Direct command to initiate the file transfer: SUB PROC=PROCESS1 &DSN1=A345.NEWYORK COPY FROM (DSN=&DSN PNODE) TO (DSN=USER1.LA SNODE=CD.NEW.NEW.NEW.TEXT1 DISP=SHR) - v PROCESS1 copies the file USER1.NEW. The operator at CD. Example 7.DALLAS &DSN1=USER1.NEW. or CD. The default DSN symbolic name for the PNODE is taken from the previous PROCESS1. v PROCESS2 copies the file ABC.DALLAS to file ABC.LA SNODE=CD.TEXT &PRTY=14 NOTIFY=USER1 COPY FROM (DSN=&DSN1 DISP=SHR PNODE) TO (DSN=&DSN2 DISP=(NEW.

and then it submits PROCESS2.NT node by setting the subnode parameter to SNODE.NEW.NEW.4: Submitting a Windows 95/NT Process from a UNIX Node This Process copies a binary file from an 95/NT node to a UNIX node. which executes on the CD. remote PROCESS SNODE=CD. you must specify a valid Windows 95 SNODE.LA to a file called A345.OS390.3: Submitting an OS/390 Process from a NetWare Node From a NetWare node.cfg" copy from (file=&file1 sysopts="datatype(binary)" snode) to (file=&file2 pnode) if (copy1 eq 0) then submit file="d:\testdat\nt2nwcp.DATA1 at CD.NEWYORK COPY FROM (DSN=&DSN PNODE) TO (DSN=A345.Chapter 7 / SUBMIT Statement Examples 7-3 PROCESS1 submits PROCESS2: PROCESS2 PROCESS STEP01 PNODE=CD.V10702 HOLD=NO CLASS=1 PRTY=10 RETAIN=NO SNODEID=(USER01. To use this illustration as a Windows 95 example. v PROCESS2 copies the file A345. STEP1 submits a Process called TOFROM that resides on a CONNECT:Direct for OS/ 390 node.PSWD02) STEP1 SUBMIT Example 7. If the copy is successful.DALLAS node.cdp" subnode=snode eif pend.PSWD01) FILE=CSG.NT &file1="d:\testdat\frunix. process copy1 subpr1 The previous example illustrates a submitting a Windows NT Process from a UNIX node.DATA at the CD. proc1 snode=CD.DATA at the CD.DATA at CD.cfg" &file2="/tdat/frnt.DALLAS SNODE=CD.NEW. . a submit of another process is performed on the CD.DATA1 DISP=SHR) - v PROCESS1 copies the file A345. Example 7.DALLAS to the file A345.NW(TOFROM) SUBNODE=SNODE HOLD=NO CLASS=1 PRTY=10 RETAIN=NO PNODEID=(USER02.NEWYORK.OS390.NEW.DALLAS node.

#FUP/’.NODE (PGM=FUP SYSOPTS=(’/OUT $S. on December 14.FILEA.DATA1.OS390.node file=copy.FILERESO’.8: Using submit with the hold Parameter (Stratus VOS to Stratus VOS) This Process shows how to submit another CONNECT:Direct Process.m. The Process will be held in the Timer queue until it is automatically released at 11:30 p.node file=copy.TANDEM SNODE=CD. named copy. named copy.7-4 CONNECT:Direct Process Guide Concepts and Examples Example 7.6: Using submit with the hold Parameter (UNIX to UNIX) This Process shows how to submit another CONNECT:Direct Process.cd subnode=snode hold=yes pend Example 7.FILEB SUBNODE=PNODE FILE=$B. submit1 step01 process submit pend snode=unix. which resides on the snode. The Process will be held in the Hold queue until it is explicitly released by a change process command.7: Using submit with the startt Parameter (UNIX to UNIX) This Process shows how to submit another CONNECT:Direct Process.cd. named copy. STEP1 will execute FUP to purge $B.cd startt=(12/14/1999.5: Using SUBMIT at the CONNECT:Direct for Tandem Node In this Process.cd subnode=snode hold=yes pend . 1999. ’PURGE FILEA ! ’)) FILE=$B.FILEC SUBNODE=PNODE - STEP2 STEP3 SUBMIT SUBMIT Example 7.FILERESO. which resides on the pnode. submit1 step01 process submit snode=unix. which resides on the snode. submit1 step01 process submit snode=VOS. ’VOLUME $B. SUBMIT STEP1 PROCESS RUN TASK PNODE=CD.cd. The Process will be held in the Hold queue until it is explicitly released by a change process command.cd.node file=copy. STEP2 and STEP3 will submit CONNECT:Direct Processes at the Tandem node (PNODE).DATA1.23:30) Example 7.

cdp SUBNODE=PNODE PEND . 1999.cd.cdp on the PNODE.m.Chapter 7 / SUBMIT Statement Examples 7-5 Example 7.9: Using submit with the startt Parameter (Stratus VOS to Stratus VOS) This Process shows how to submit another CONNECT:Direct Process.NODE CLASS=1 STEP1 SUBMIT FILE=C:\valid\connect\direct\proc1. named copy. on December 14. submit1 step01 process submit pend snode=VOS.10: Using SUBMIT at the CONNECT:Direct for OS/2 Warp Node The following Process submits the Process contained in the file proc1. which resides on the pnode.node file=copy. The Process will be held in the Timer queue until it is automatically released at 11:30 p. SBOS2 PROCESS SNODE=OS2.cd startt=(12/14/1999.23:30) Example 7.

7-6 CONNECT:Direct Process Guide Concepts and Examples .

F5 . As specified by the REQUEUE parameter in the PROCESS statement. In addition. SYMPROC SNODE=&SNODE NOTIFY=%USER CLASS=T REQUEUE=YES PRTY=2 STARTT=(MO. issue the following Submit Process command: SUB PROC SYMPROC &HLQ=JSMIT &D1=FILEA &D2=FILEB &SNODE=CD.SAB. as specified by the RETAIN and STARTT parameters. the SNODE is a symbolic that also must be resolved when the Process is submitted. These SYMBOL statements must be resolved when submitting the Process.m. the Process is requeued in the event of an x37-type error. Note: All OS/390 examples are also valid for MVS except where specified.Chapter 8 SYMBOL Statement Examples This chapter contains examples of CONNECT:Direct SYMBOL and symbolic statements for various CONNECT:Direct platforms. Note: Two vertical bars preceded and followed by blanks ( || ) are used to indicate concatenation.08:30:00AM) RETAIN=YES SYMBOL &DSN1=&HLQ || \. Bracketing backslashes ensure that special characters within the string are maintained.\ || &D2 COPY FROM (DSN=&DSN1) TO (DSN=&DSN2 DISP=RPL) PROCESS - STEP01 - To submit the Process on a CONNECT:Direct for OS/390 node. Example 8.1: 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. The Process is then retained in the queue and rerun every Monday at 8:30 a.\ || &D1 SYMBOL &DSN2=&HLQ || \.

OS390.MSGCLASS=X.2: Using Symbolics Within DMRTSUB to Substitute a Windows 95/NT Pathname into OS/390 JCL This example illustrates the structure of a CONNECT:Direct Process that passes a Windows 95/NT DSN into DMRTSUB.CD211. // MSGLEVEL=(1.1). The use of symbolic substitution accommodates the backslashes present in the Windows pathname.DISP=SHR".’USER 1’.NOTIFY=USER1 //* //ALLOC EXEC PGM=IEFBR14 //* NTDS=&NTDS //* TST1=&TST1 .REGION=4096K.“TST1 &TST1" ) ) SNODE PROCESS - STEP1 The following JCL is present in member SUB1BR14 of data set USER1.USER1 &TST1=’\C:\\TEST\\DATA.8-2 CONNECT:Direct Process Guide Concepts and Examples Example 8.OS390. SUB1 SNODE=SC.PROCESS(SUB1BR14). This Process runs on the same CONNECT:Direct node using PNODE=SNODE processing.USER1 PNODE=SC. “NTDS &CASEPARM”.CLASS=C.TXT\’ &CASEPARM=CASE7 RUN TASK ( PGM=DMRTSUB PARM=(DSN=USER1. //USERC1N JOB (11111).PROCESS for the above example.CD211.

v STEP02 copies a member of a physical data base file on the CONNECT:Direct for OS/400 node to a sequential file on OS/390.(15.TEST.ROUND) DISP=&DISP02) PROCESS - STEP01 - STEP02 Note: Two vertical bars preceded and followed by blanks ( || ) are used to indicate concatenation. . SYMBOL statements are used for input/output data sets.NY1 PRTY=8 NOTIFY=RSMITH CLASS=4 &PROD=PROD &TEST=TEST SNODEID=(RSMITH.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.CONTIG. Bracketing backslashes ensure that special characters within the string are maintained.DAILY\ SYMBOL &DSN1O=’TESTLIB/BUDGET’ SYMBOL &DSN2I=’PRODLIB/BUDGET’ SYMBOL &DSN2O=\BUDGET.RLSE. The output data set on the CONNECT:Direct for OS/400 node is TESTLIB/BUDGET. v STEP01 copies a sequential file from OS/390 to a member of a physical data base file on the CONNECT:Direct for OS/400 node.3: Using SYMBOL Statements for Input and Output Data Sets (OS/390 and OS/400) In this Process.PROD.\ || &PROD || \. The OS/390 input file is BUDGET.ROGER) SYMBOL &DSN1I=\BUDGET.1).DAILY. The input data set from the CONNECT:Direct for OS/400 node is PRODLIB/ BUDGET. The OS/390 output file is BUDGET.\ || &TEST || \.RECFM=FB.BLKSIZE=23440) SPACE=(CYL.LRECL=080. PROC#01 SNODE=AS400.Chapter 8 / SYMBOL Statement Examples 8-3 Example 8.DAILY. The following describes the steps in the Process. SYMBOL statements have also been defined for DISP fields.

the Process. PROCVAR SNODE=&SNODE &JCLLIB=USER01.8-4 CONNECT:Direct Process Guide Concepts and Examples Example 8. SYMBOL &BLANKS=&STRIP SYMBOL &PERMISS=&TOPERMIS SYMBOL &SYSOPTS=\"\||:permiss=|| &PERMISS || :strip.4: Using Symbolics in a COPY statement (OS/390 to UNIX) In the following example. COPY FROM (DSN=&FROMDSN DISP=&FROMDISP ) TO (DSN="&TODSN" DISP=(&TODISP) SYSOPTS=":permiss=\ &TOPERMIS :strip.DALLAS. you must use the SYMBOL statement to identify the variables. PROCVAR SNODE=&SNODE &JCLLIB=USER01.CNTL &FROMDISP=SHR &TODISP=RPL &TOPERMISS=770 &STRIP=NO &COMPRESS=. The Process will not work if the variables are stated as shown. is copying a file from OS/390 to UNIX. To substitute two or more variables in the SYSOPTS statement.blanks= || &BLANKS||\:\||\" COPY FROM (DSN=&FROMDSN DISP=&FROMDISP ) TO (DSN="&TODSN" DISP=(&TODISP SYSOPTS=&SYSOPTS ) &COMPRESS PROCESS - - STEP01 .CNTL &FROMDISP=SHR &TODISP=RPL &TOPERMISS=770 &STRIP=NO &COMPRESS=. PROCVAR.blanks= &STRIP:" ) &COMPRESS PROCESS 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.DALLAS. Two variables are stated in the SYSOPTS parameter.

pswd) symbol &file1=\clx.FROMUNIX. ’VOLUME $B.TANDEM SNODE=CD.$qa1.Chapter 8 / SYMBOL Statement Examples 8-5 Example 8. Both the FROM and TO DSNs are resolved at Process submission. SYMBOLS PNODE=CD.6: Using Symbolics in a COPY Statement (Tandem to UNIX) This example shows the basic use of symbolics in a CONNECT:Direct Process submitted from the Tandem node.v1200 snodeid=(user.ksds0007 symbol &file2=’tdata/ksdstxt’ symbol &file3=$user.NODE &DSN1=DATA1.FILXYZ &DSN2=$B.ksdstxt COPY FROM (DSN=&file1 PNODE SYSOPTS=(’SET XLATE OFF’) DISP=SHR) TO (dsn=&file2 SNODE DISP=RPL) COPY FROM (DSN=&file2 SNODE DISP=SHR) TO (DSN= &file3 DISP=RPL SYSOPTS=("set type K" "set code 0" "set rec 100" "set keylen 10" "set keyoff 0" "set block 4096") PNODE) PROCESS - STEP01 - STEP02 . SYSOPTS specifies how the Tandem file will be created. ’PURGE SYMBTEST ’)) COPY FROM (DSN=&DSN1 DISP=SHR SNODE) TO (DSN=&DSN2 DISP=NEW PNODE) PROCESS - STEP1 STEP2 The Process.FILERESO’.FILERESO.#SYMBOL/’. STEP02 will COPY FROM the UNIX node TO another Tandem node.5: Using Symbolics in a COPY Statement (CONNECT:Direct for Tandem) This example shows the basic use of symbolics in a CONNECT:Direct Process submitted from the Tandem node. SYMBOLS. STEP01 will COPY FROM a Tandem node TO a UNIX node.filetest. Both the FROM and TO DSNs are resolved at Process submission.OS390.SYMBTEST RUN TASK (PGM=FUP PARM=(’/OUT $S. TOFROMK snode=cd. can be submitted with the following example command: SUBMIT FILE SYMBOLS Example 8.

VMS &P1=.8-6 CONNECT:Direct Process Guide Concepts and Examples Example 8. SYMBOL3 STEP01 PROCESS SYMBOL RUN JOB SNODE=CD. can be submitted with the following example command issued in DCL command format: $NDMUI SUBMIT SYMBOL3 /SYMBOLICS=("P1=‘PARM1’") . &SO="P1=&P1" (DSN=TEST. SYMBOL3.COM PNODE) SYSOPTS=&SO - The Process.7: Passing Parameters to a DCL Command Procedure from a RUN JOB Statement (CONNECT:Direct for 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.

PROC1 STEP01 SNODE=XYZNODE SNODEID=(JSMITH.DAT DISP=RPL) IF (STEP01 = 0) THEN COPY FROM (DSN=U1:[RJONES.RECFM=V) DISP=RPL) ELSE RUN TASK (PGM=VMS) PNODE SYSOPTS=" CMD = ’REPLY/USER=RJONES COPY_UNSUCCESSFUL’" EIF PROCESS - STEP02 STEP03 - STEP04 - . Example 9.Chapter 9 Conditional Statements Examples This chapter contains examples of conditional statements within Processes. An example of conditional logic statements in a cross platform Process is included.DAT) TO (DSN=JSMITH. STEP03 copies a file from OpenVMS to OS/390.DATA_FILES]TEXT.YES SNODE DCB=(DSORG=PS.JERRY) COPY FROM (DSN=JSMITH. Note: All OS/390 examples are also valid for MVS except where specified.1: Using Conditional Statements This Process uses conditional logic to check the completion code of STEP01. STEP04 initiates the RUN TASK statement to notify the OpenVMS user that the copy was unsuccessful.CDTEST]RUSS. If the completion code is greater than 0. If the completion code is equal to 0.DATA SNODE) TO (DSN=U1:[RJONES.

2: Using Conditional Logic (OS/390 to VSE) The following Process issues a VSE/Power command based on the return code of the previous COPY step.9-2 CONNECT:Direct Process Guide Concepts and Examples Example 9. This Process is designed to be submitted from the OS/390 node.OS390. TESTVSE STEP01 SNODE=CD.CNTL. GSVSE02 is released.JCL(XXXX) DISP=RPL LIBR=(SUBLIB=JCL.VSE.GSVSE01’)) SNODE EXIT ELSE RUN TASK (PGM=DMRTPOWR PARM=(F’5’ F’3’ (’R RDR.NODE PNODE=CD. the VSE/Power command releases GSVSE01.GSVSE02’)) SNODE EXIT EIF PROCESS - - - .CNTL.NODE COPY FROM (DSN=JSMITH. If the transfer fails.TYPE=JCL) DCD=(DSORG=VSAM) IF (STEP01 NE 0) THEN RUN TASK (PGM=DMRTPOWR PARM=(F’5’ F’3’ (’R RDR. If the transfer is successful.JCL(VSAMDEL) DISP=SHR UNIT=SYSDA) CKPT=0K TO (DSN=JSMITH.

PSWD) COPY FROM ( SNODE DSN=’OS400/FILE001’ SYSOPTS="TYPE(MBR)" DISP=SHR ) TO ( PNODE DSN=OS390. If STEP01 receives a completion code greater than 0.3: Using Conditional Logic (CONNECT:Direct for OS/400 to CONNECT:Direct for OS/390) This Process copies a file from an CONNECT:Direct for OS/400 node to OS/390.SANFRAN.FILE002 DCB=(DSORG=PS. COPY02 SNODE=CD. STEP03 will execute and send a message to terminal DSP03 indicating the file transfer was successful. If STEP01 receives a completion code of 0.Chapter 9 / Conditional Statements Examples 9-3 Example 9. STEP02 checks the completion code from STEP01 and executes STEP04 if the completion code is greater than 0.RECFM=FB) DISP=RPL ) IF (STEP01 > 0) THEN GOTO STEP04 ELSE RUN TASK (PGM=OS400) SNODE SYSOPTS=\"\ \CMD(\ \SNDBRKMSG\ \MSG(’FILE TRANSFER SUCCESSFUL’)\ \TOMSGQ(DSP03)\ \)\ \"\ EIF EXIT RUN TASK (PGM=OS400) SNODE SYSOPTS=\"\ \CMD(\ \SNDBRKMSG\ \MSG(’FILE TRANSFER FAILED!! ’)\ \TOMSGQ(DSP03)\ \)\ \"\ PROCESS - STEP01 STEP02 STEP03 - STEP04 - . STEP04 will execute and send a message to terminal DSP03 indicating the file transfer failed.BLKSIZE=6160.LRECL=080.AS400 PRTY=8 NOTIFY=USERID CLASS=4 SNODEID=(USERID.

FILEB will be copied from the OS/390 node to $B.FILERESO. ’PURGE FILE3! ’.FILERESO.FILERESO. then DATA1.FILEC SNODE) TO (DSN=$B.FILE3 at the Tandem node.#FUPTEST/’. then STEP04 will execute.FILE4 at the Tandem node.FILEC from the OS/390 node to $B.FILERESO on the PNODE. If the completion code of STEP03 is greater than 4.#FUPTEST) that indicates whether FUP executed successfully. If the completion code is greater than 4.FILE2 DISP=NEW PNODE) EIF COPY FROM (DSN=DATA.FILERESO.FILE1 DISP=NEW PNODE) IF (STEP02 GT 4) THEN GOTO STEP04 ELSE COPY FROM (DSN=DATA1.FILE3 DISP=NEW PNODE) IF (STEP03 GT 8) THEN EXIT EIF IF (STEP03 LT 4) THEN COPY FROM (DSN=DATA1.TANDEM SNODE=CD. ’PURGE FILE4! ’)) COPY FROM (DSN=DATA1.FILERESO.FILED will be copied from the OS/390 node to $B. DATA1.FILE4 DISP=NEW PNODE) EIF PROCESS - STEP02 STEP03 - STEP04 - - . FILE2.FILERESO’. ’VOLUME $B.FILERESO. and FILE4 from $B.9-4 CONNECT:Direct Process Guide Concepts and Examples Example 9. STEP04 will then execute and copy DATA1.4: Using Conditional Logic Where the PNODE is a CONNECT:Direct for Tandem Node In this multi-step Process. then no further processing will occur. A message will be sent to the spooler ($S. COND1 STEP01 PNODE=CD.FILEA from the OS/390 node (SNODE) to $B.FILERESO. ’PURGE FILE2! ’.NODE RUN TASK (PGM=FUP PARM=(’/OUT $S. FILE3.OS390. STEP02 will copy DATA1. STEP01 will execute FUP to purge files FILE1. ’PURGE FILE1! ’.FILEB SNODE) TO (DSN=$B.FILE1 at the PNODE.FILERESO. The file will default to the same type of file being copied. Conditional logic in STEP03 is then used to check the completion code of STEP02.FILEA DISP=SHR SNODE) TO (DSN=$B.FILED SNODE) TO (DSN=$B. If the completion code is greater than 8. If the completion code from STEP02 is 4 or less.FILE2 at the Tandem node.

1-2 statement structure 2-1 summary of CONNECT:Direct Process submission 1-2 use of statements 1-1 continuation marks 2-2 COPY statement examples 4-1 general description 1-1 examples conditional statements 9-1 COPY statement 4-1 PROCESS statement 3-1 RUN JOB statement 5-1 RUN TASK statement 6-1 SUBMIT statement 7-1 SYMBOL statement 8-1 F format. lack of Process examples xvi CONNECT:Direct Processes construction of 1-2 description 1-1.Index A asterisks 2-3 D double quotation marks 2-6 B backslashes 2-5 bold letters xvii bracketing 2-5 bracketing backslashes 2-5 brackets xvii EBCDIC Hex value slash / 2-2 vertical bar | 2-2 E C commas 2-2 comments 2-3 DMBATCH 2-3 concatenation 2-4. 1-2 I italic letters xvii K keyword parameters 2-1 . description 2-1 H horizontal ellipsis xvii how to use the CONNECT:Direct Process Guide 1-2 write a CONNECT:Direct Process 1-1. 2-5 conditional statements examples 9-1 general description 1-2 CONNECT:Direct for OS/400.

SYSOPTS variable substitution. PROCESS statement 1-2 RUN TASK statement examples 6-1 general description 1-1 N notational conventions bold letters xvii brackets xvii horizontal ellipsis xvii italic letters xvii lowercase letters xvi miscellaneous xvii underlined letters xvii uppercase and lowercase letters xvi uppercase letters xvi vertical bars xvii vertical ellipsis xvii special characters 2-2 statement identifier 2-1 statement structure 2-1 S single quotation marks 2-6 slash. 2-2 SYSOPTS parameter CONNECT:Direct for OS/390.Index-2 CONNECT:Direct Process Guide Concepts and Examples L labels 2-1 lowercase letters xvi R RUN JOB statement examples 5-1 general description 1-1 M maximum storage area. example 8-4 examples 8-1 general description 1-2 symbolic substitution 2-7 syntax asterisks 2-3 CONNECT:Direct for OS/400 2-3 commas 2-2 comments 2-3 DMBATCH 2-3 description 2-1. variable substitution. EBCDIC Hex value 2-2 SUBMIT statement examples 7-1 general description 1-2 subparameters 2-2 summary of CONNECT:Direct Process submission 1-2 O organization of the documentation set xv P parameters description 2-1 keyword 2-1 positional 2-2 parentheses 2-3 PEND statement 1-2 positional parameters 2-2 PROCESS statement examples 3-1 general description 1-1 maximum storage area allowed 1-2 Process structure 2-1 SYMBOL statement CONNECT:Direct for OS/390. multiple 8-4 T Q termination 2-7 queues and CONNECT:Direct Processes 1-3 quotation marks 2-6 underlined letter xvii U uppercase and lowercase letters xvi . example 8-4 variable substitution.

Index-3 uppercase letters xvi use of the CONNECT:Direct Process Guide 1-2 V vertical bars xvii EBCDIC Hex value 2-2 vertical ellipsis xvii .

Index-4 CONNECT:Direct Process Guide Concepts and Examples .

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.