On Z/OS and OS/390 UNIX

Total Page:16

File Type:pdf, Size:1020Kb

On Z/OS and OS/390 UNIX 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 . ..
Recommended publications
  • RICOH Web Enablement Solutions Suite
    RICOH Web Enablement Solutions Suite Transform print centric data streams into web-optimized, user-friendly content. Let customers take their information to go. For as long as businesses have existed, there has been important information for them to Benefits communicate to their customers. • Transforms documents for optimal In today’s information-rich age, the need for businesses to web use while maintaining fidelity. accurately, quickly communicate has never been greater. In today’s on-the-go, cost and environment conscious world, • Empowers on-the-go users to paper documents – which are often looked at just once and then access crucial information where, filed or thrown away – can seem inconvenient and antiquated. when and how they need it. • Puts help desk and customers on The RICOH Web Enablement Solutions Suite, which is the same page (literally) by helping comprised of a set of complementary products, helps to to ensure both parties see the transform print-centric data streams into web-ready same document in the exact same documents with utmost fidelity. way, aiding troubleshooting. Products Include: • RICOH Line2PDF Plus • RICOH PS2PDF and RICOH PCL2PD • RICOH AFP Merge • RICOH AFP Visual Environment • RICOH AFP2PDF Plus • RICOH TIFF2PDF Plus 2 To better understand how this is accomplished, take a closer look at the component solutions. RICOH Line2PDF Plus RICOH AFP2PDF Plus Line data documents can be extremely simplistic. Paper documents still have their advantages. They However, when it comes to customer communications, can easily be handed off. They can be marked up you often want to show a little more visual acumen, without any special expertise.
    [Show full text]
  • Linux on the Road
    Linux on the Road Linux with Laptops, Notebooks, PDAs, Mobile Phones and Other Portable Devices Werner Heuser <wehe[AT]tuxmobil.org> Linux Mobile Edition Edition Version 3.22 TuxMobil Berlin Copyright © 2000-2011 Werner Heuser 2011-12-12 Revision History Revision 3.22 2011-12-12 Revised by: wh The address of the opensuse-mobile mailing list has been added, a section power management for graphics cards has been added, a short description of Intel's LinuxPowerTop project has been added, all references to Suspend2 have been changed to TuxOnIce, links to OpenSync and Funambol syncronization packages have been added, some notes about SSDs have been added, many URLs have been checked and some minor improvements have been made. Revision 3.21 2005-11-14 Revised by: wh Some more typos have been fixed. Revision 3.20 2005-11-14 Revised by: wh Some typos have been fixed. Revision 3.19 2005-11-14 Revised by: wh A link to keytouch has been added, minor changes have been made. Revision 3.18 2005-10-10 Revised by: wh Some URLs have been updated, spelling has been corrected, minor changes have been made. Revision 3.17.1 2005-09-28 Revised by: sh A technical and a language review have been performed by Sebastian Henschel. Numerous bugs have been fixed and many URLs have been updated. Revision 3.17 2005-08-28 Revised by: wh Some more tools added to external monitor/projector section, link to Zaurus Development with Damn Small Linux added to cross-compile section, some additions about acoustic management for hard disks added, references to X.org added to X11 sections, link to laptop-mode-tools added, some URLs updated, spelling cleaned, minor changes.
    [Show full text]
  • Cygwin User's Guide
    Cygwin User’s Guide Cygwin User’s Guide ii Copyright © Cygwin authors Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this per- mission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. Cygwin User’s Guide iii Contents 1 Cygwin Overview 1 1.1 What is it? . .1 1.2 Quick Start Guide for those more experienced with Windows . .1 1.3 Quick Start Guide for those more experienced with UNIX . .1 1.4 Are the Cygwin tools free software? . .2 1.5 A brief history of the Cygwin project . .2 1.6 Highlights of Cygwin Functionality . .3 1.6.1 Introduction . .3 1.6.2 Permissions and Security . .3 1.6.3 File Access . .3 1.6.4 Text Mode vs. Binary Mode . .4 1.6.5 ANSI C Library . .4 1.6.6 Process Creation . .5 1.6.6.1 Problems with process creation . .5 1.6.7 Signals . .6 1.6.8 Sockets . .6 1.6.9 Select . .7 1.7 What’s new and what changed in Cygwin . .7 1.7.1 What’s new and what changed in 3.2 .
    [Show full text]
  • Fira Code: Monospaced Font with Programming Ligatures
    Personal Open source Business Explore Pricing Blog Support This repository Sign in Sign up tonsky / FiraCode Watch 282 Star 9,014 Fork 255 Code Issues 74 Pull requests 1 Projects 0 Wiki Pulse Graphs Monospaced font with programming ligatures 145 commits 1 branch 15 releases 32 contributors OFL-1.1 master New pull request Find file Clone or download lf- committed with tonsky Add mintty to the ligatures-unsupported list (#284) Latest commit d7dbc2d 16 days ago distr Version 1.203 (added `__`, closes #120) a month ago showcases Version 1.203 (added `__`, closes #120) a month ago .gitignore - Removed `!!!` `???` `;;;` `&&&` `|||` `=~` (closes #167) `~~~` `%%%` 3 months ago FiraCode.glyphs Version 1.203 (added `__`, closes #120) a month ago LICENSE version 0.6 a year ago README.md Add mintty to the ligatures-unsupported list (#284) 16 days ago gen_calt.clj Removed `/**` `**/` and disabled ligatures for `/*/` `*/*` sequences … 2 months ago release.sh removed Retina weight from webfonts 3 months ago README.md Fira Code: monospaced font with programming ligatures Problem Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like -> , <= or := are single logical tokens, even if they take two or three characters on the screen. Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet. Solution Download v1.203 · How to install · News & updates Fira Code is an extension of the Fira Mono font containing a set of ligatures for common programming multi-character combinations.
    [Show full text]
  • Introducing Z/Os Unix System Services
    Contact Us [email protected] HOME > COURSE CATALOG > IBM > IBM Z/OS > INTRODUCING Z/OS UNIX SYSTEM SERVICES Introducing z/OS UNIX System Services DURATION 20 Hours RATING COURSE OP05GFR AVAILABLE FORMATS Classroom Training, Online Training BADGES & CERTIFICATIONS LearnQuest IBM z/OS UNIX System Services Foundations Course Description Overview This course describes how open standards are implemented in a z/OS system by z/OS UNIX. UNIX System Services are introduced, and the role of z/OS as a server in the open systems environment is discussed. This is an introductory level course. It provides an overview of z/OS UNIX System Services (usually abbreviated to z/OS UNIX) as seen by the user. Details of installation and implementation for system programmers are not covered in this course. Objectives 9/26/2021 1 of 3 10:29:38 AM Discuss the role of z/OS in an open systems environment Identify the basic terms used in z/OS UNIX Define the components of z/OS UNIX Explain major functions provided in z/OS UNIX Discuss opportunities for applications in a z/OS UNIX environment Identify z/OS base elements and optional features that make up z/OS UNIX Use the two interactive interfaces available to access the services Audience This intermediate course is for all computer professionals who will use z/OS UNIX. Prerequisites You should have a basic knowledge of z/OS equivalent to the course An Introduction to the z/OS Environment (ES05G). Topics Day 1 Welcome and introduction Unit 1. z/OS UNIX overview Unit 2. Introduction to z/OS UNIX Unit 3.
    [Show full text]
  • Unix System Software
    Unix system software Unix is a family of multitasking, multiuser computer operating systems that derive from the . modifiable source code for all of these components, in addition to the kernel of an operating system, Unix was a self-contained software n in​: ​C​ and ​assembly language. This sets Unix apart from proprietary operating systems like Microsoft Windows. system Solaris 10 integrates the most popular open source software and. UNIX is a multitasking operating system developed at Bell Labs in the early s. It was designed to be a small, flexible system used by programmers. APIs are changing more than just software architectures. From planning through. Today, without UNIX systems, the Internet would come to a screeching halt. Their new organization was called the Open Software Foundation (OSF). By operating system, we mean the suite of programs which make the computer UNIX systems also have a graphical user interface (GUI) similar to Microsoft. Unix also was developed as a self-contained software system, comprising the operating system, development environment, utilities. An operating system is the program that controls all the other parts of a computer system, both the hardware and the software. It allocates the computer's. Unix. In , Kenneth Thompson, Dennis Ritchie, and others at AT&T Bell Labs began developing a small operating system on a little-used PDP By the most simple definition, UNIX is a computer operating system - the base software that controls a computer system and its peripherals. The Difference Between UNIX and LINUX Operating Systems With Examples You may have Unix is a proprietary software operating system.
    [Show full text]
  • CLI Introduction
    2021/07/26 13:46 (UTC) 1/3 CLI Introduction Por traducir - Victor CLI Introduction A command line interface (CLI) is a way of interacting with an operating system or programs using text commands. As opposed to graphical user interfaces (GUI), CLI, due to its nature, is heavily keyboard oriented. Despite a steeper learning curve, this way of interaction has a wide range of benefits and is therefore preferred by many users. Since most Slackware configuration and administration is performed using the command line interface, it is highly recommended to understand and feel comfortable using them. An additional advantage is that 99% of the commands are universal for most Linux distributions. Things you learn here will most probably be applicable elsewhere. CLI is Good - Do Not Fear It The following are some of the advantages to using CLI: 1. CLI commands are more precise and powerful than GUI interaction. 2. GUI tools are often just frontends for command line tools. This brings another layer of complexity and is more difficult to troubleshoot. 3. Most commands are distro agnostic: they work on other Linux systems as well. 4. CLI commands are building blocks that can be glued together to create complex commands or custom scripts that are tailored to your needs. 5. CLI commands can be used to automate repetitive tasks 6. CLI commands do not change often. 7. Commands make a universal language that is easy to communicate and follow by other internet users. 8. CLI scripts can include comments that can act as notes and internal documentation explaining the functionality and simplifying future modifications.
    [Show full text]
  • Cygwin User's Guide
    Cygwin User’s Guide i Cygwin User’s Guide Cygwin User’s Guide ii Copyright © 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc. Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this per- mission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. Cygwin User’s Guide iii Contents 1 Cygwin Overview 1 1.1 What is it? . .1 1.2 Quick Start Guide for those more experienced with Windows . .1 1.3 Quick Start Guide for those more experienced with UNIX . .1 1.4 Are the Cygwin tools free software? . .2 1.5 A brief history of the Cygwin project . .2 1.6 Highlights of Cygwin Functionality . .3 1.6.1 Introduction . .3 1.6.2 Permissions and Security . .3 1.6.3 File Access . .3 1.6.4 Text Mode vs. Binary Mode . .4 1.6.5 ANSI C Library . .5 1.6.6 Process Creation . .5 1.6.6.1 Problems with process creation . .5 1.6.7 Signals . .6 1.6.8 Sockets . .6 1.6.9 Select .
    [Show full text]
  • UNIX System Services Z/OS Version 1 Release 7 Implementation
    Front cover UNIX System Services z/OS Version 1 Release 7 Implementation z/OS UNIX overview z/OS UNIX setup z/OS UNIX usage Paul Rogers Theodore Antoff Patrick Bruinsma Paul-Robert Hering Lutz Kühner Neil O’Connor Lívio Sousa ibm.com/redbooks International Technical Support Organization UNIX System Services z/OS Version 1 Release 7 Implementation March 2006 SG24-7035-01 Note: Before using this information and the product it supports, read the information in “Notices” on page xiii. Second Edition (March 2006) This edition applies to Version 1 Release 7 of z/OS (5637-A01), and Version 1, Release 7 of z/OS.e (5655-G52), and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2003, 2006. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . xiii Trademarks . xiv Preface . .xv The team that wrote this redbook. .xv Become a published author . xvi Comments welcome. xvii Chapter 1. UNIX overview. 1 1.1 UNIX fundamentals . 2 1.1.1 UNIX objectives . 2 1.1.2 What people like about UNIX . 2 1.1.3 What people don’t like about UNIX . 3 1.1.4 UNIX operating system . 3 1.1.5 UNIX file system . 4 1.1.6 Parameter files . 6 1.1.7 Daemons. 6 1.1.8 Accessing UNIX . 6 1.1.9 UNIX standards. 7 1.1.10 MVS and UNIX functional comparison . 8 1.2 z/OS UNIX System Services fundamentals .
    [Show full text]
  • MTS on Wikipedia Snapshot Taken 9 January 2011
    MTS on Wikipedia Snapshot taken 9 January 2011 PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Sun, 09 Jan 2011 13:08:01 UTC Contents Articles Michigan Terminal System 1 MTS system architecture 17 IBM System/360 Model 67 40 MAD programming language 46 UBC PLUS 55 Micro DBMS 57 Bruce Arden 58 Bernard Galler 59 TSS/360 60 References Article Sources and Contributors 64 Image Sources, Licenses and Contributors 65 Article Licenses License 66 Michigan Terminal System 1 Michigan Terminal System The MTS welcome screen as seen through a 3270 terminal emulator. Company / developer University of Michigan and 7 other universities in the U.S., Canada, and the UK Programmed in various languages, mostly 360/370 Assembler Working state Historic Initial release 1967 Latest stable release 6.0 / 1988 (final) Available language(s) English Available programming Assembler, FORTRAN, PL/I, PLUS, ALGOL W, Pascal, C, LISP, SNOBOL4, COBOL, PL360, languages(s) MAD/I, GOM (Good Old Mad), APL, and many more Supported platforms IBM S/360-67, IBM S/370 and successors History of IBM mainframe operating systems On early mainframe computers: • GM OS & GM-NAA I/O 1955 • BESYS 1957 • UMES 1958 • SOS 1959 • IBSYS 1960 • CTSS 1961 On S/360 and successors: • BOS/360 1965 • TOS/360 1965 • TSS/360 1967 • MTS 1967 • ORVYL 1967 • MUSIC 1972 • MUSIC/SP 1985 • DOS/360 and successors 1966 • DOS/VS 1972 • DOS/VSE 1980s • VSE/SP late 1980s • VSE/ESA 1991 • z/VSE 2005 Michigan Terminal System 2 • OS/360 and successors
    [Show full text]
  • Xterm Control Sequences
    Xterm Control Sequences EdwardMoy University of California, Berkeley Revised by Stephen Gildea XConsortium (1994) Thomas Dickey XFree86 Project (1996-2003) Definitions c The literal character c. C Asingle (required) character. Ps Asingle (usually optional) numeric parameter,composed of one of more digits. Pm Amultiple numeric parameter composed of anynumber of single numeric parameters, separated by ;char- acter(s). Individual values for the parameters are listed with Ps . Pt Atextparameter composed of printable characters. C1 (8-Bit) Control Characters The xterm program recognizes both 8-bit and 7-bit control characters. It generates 7-bit controls (by default) or 8-bit if S8C1T is enabled. The following pairs of 7-bit and 8-bit control characters are equivalent: ESC D Index(IND is 0x84) ESC E Next Line ( NEL is 0x85) ESC H TabSet ( HTS is 0x88) ESC M Reverse Index( RI is 0x8d) ESC N Single Shift Select of G2 Character Set ( SS2 is 0x8e): affects next character only ESC O Single Shift Select of G3 Character Set ( SS3 is 0x8f): affects next character only ESC P Device Control String ( DCS is 0x90) ESC V Start of Guarded Area ( SPA is 0x96) Xterm Control Sequences C1 (8-Bit) Control Characters ESC W End of Guarded Area ( EPA is 0x97) ESC X Start of String ( SOS is 0x98) ESC Z Return Terminal ID (DECID is 0x9a). Obsolete form of CSI c(DA). ESC [ Control Sequence Introducer ( CSI is 0x9b) ESC \ String Terminator ( ST is 0x9c) ESC ] Operating System Command ( OSC is 0x9d) ESC ^ Privacy Message ( PM is 0x9e) ESC _ Application Program Command ( APC is 0x9f) These control characters are used in the vtXXX emulation.
    [Show full text]
  • Polishing the Terminal Window with Bashish COLORCOLOR MYMY SHELLSHELL
    LINUXUSER Bashish Polishing the terminal window with Bashish COLORCOLOR MYMY SHELLSHELL Bashish adds a dash of style to the command line. BY FRANK WIEDUWILT Orchidpoet, Fotolia Orchidpoet, f you are a regular command line To install a functional version of Bash- You can now launch a new shell by user, you may appreciate the spartan ish, you will need a recent version of the entering the exec bash command. The Iappearance of the terminal window. Bourne Again Shell (Bash), version 2.04 new shell will reflect the default Bashish But for occasional shell users, or readers or newer. You’ll also need a recent ver- settings, which call for a light blue font who would prefer a more playful ap- sion of your terminal program. on a black background. To remove Bash- proach, Bashish [1] opens a treasure We were unable to use Bashish with ish, just launch the program with the trove of options. Bashish gives your ter- the Rxvt version included with Mandriva --uninstall flag. minal window a colorful ASCII graphic 2006. The terminal program crashed background. with most of the themes we tried. In Shell Colors Bashish lets you liven up the appear- contrast, the version of Bashish provided Bashish groups shell enhancements in ance of terminal programs such as with Ubuntu 6.06 worked without any what are called themes. A theme in- Gnome Terminal, Xterm, Rxvt, Rxvt trouble, as did the Rxvt version with cludes the data for the background Unicode, Aterm, Mlterm, and the Linux Suse 10.1. After we switched to the Rx- graphic and the prompt.
    [Show full text]