On Z/OS and OS/390 UNIX
Total Page:16
File Type:pdf, Size:1020Kb
C/C++ Applications on z/OS and OS/390 UNIX Port UNIX C/C++ applications to z/OS Write portable C/C++ applications Real-world port described Michael MacIsaac Ralph Best Johan Koppernaes Ka Yin Lam Raymond Mak Daniel Prevost George Reid ibm.com/redbooks International Technical Support Organization C/C++ Applications on z/OS and OS/390 UNIX December 2001 SG24-5992-01 Take Note! Before using this information and the product it supports, be sure to read the general information in “Special notices” on page 205. Second Edition (December 2001) This edition applies to version 1, release 2 of z/OS and earlier releases of OS/390, program number 5647-A01. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. HYJ Mail Station P099 2455 South Road Poughkeepsie, NY 12601-5400 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright International Business Machines Corporation 2000, 2001. All rights reserved. Note to U.S Government Users - Documentation related to restricted rights - Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Contents . iii Preface . ix The team that wrote this redbook. ix Special notice. .x IBM trademarks . xi Comments welcome. xi Summary of changes. xiii December 2001, Second Edition . xiii Chapter 1. z/OS and OS/390 tools . 1 1.1 User access under z/OS . 2 1.1.1 JCL and batch. 2 1.1.2 JOB statement . 2 1.1.3 EXEC statement . 2 1.1.4 DD statement . 2 1.1.5 TSO/E . 3 1.1.6 ISPF/PDF . 3 1.1.7 SDSF . 5 1.2 z/OS system services . 6 1.2.1 WLM . 6 1.2.2 SMF . 10 1.2.3 RMF . 10 1.2.4 SMS . 15 Chapter 2. UNIX and C/C++ basics in z/OS. 19 2.1 The shell, ISHELL and OMVS interfaces . 20 2.1.1 Accessing z/OS UNIX shells. 20 2.1.2 Accessing the tcsh shell . 24 2.1.3 Accessing an alternate shell . 25 2.1.4 The ISHELL . 25 2.2 UNIX standards. 27 2.3 An overview of compile and bind operations. 28 2.3.1 The c89 utility . 28 2.3.2 JCL procedures for compile and bind . 30 2.4 Invoking an executable . 31 2.4.1 Execution from a shell. 32 2.4.2 Execution from TSO . 32 2.4.3 Execution via batch. 33 2.5 CICS . 33 2.6 DB2 . 34 2.6.1 Background on a precompile operation . 34 2.6.2 DB2 precompile example . 36 2.6.3 Other DB2 considerations. 37 2.7 IMS . 37 Chapter 3. z/OS UNIX development tools . 39 3.1 Archiving, compression and text translation . 40 © Copyright IBM Corp. 2001 iii 3.1.1 Archive formats . 40 3.1.2 Compression formats . 40 3.1.3 Text translation . 40 3.1.4 Archive, compression and text translation commands . 41 3.2 Compilers and associated tools . 42 3.2.1 z/OS C/C++ compiler . 42 3.2.2 SAS/C and C++ Cross-Platform Compiler . 42 3.2.3 GNU’s gcc and g++. 42 3.2.4 Lex and yacc. 43 3.2.5 Flex and bison. 43 3.3 Editors . 43 3.3.1 UNIX editors - vi, ed . 43 3.3.2 The MVS ISPF editor . 43 3.3.3 GNU’s Emacs . 44 3.3.4 Nedit . 44 3.4 Make tools. 44 3.4.1 z/OS make . 45 3.4.2 GNU make . 45 3.4.3 Makedepend . ..