User's Guide and Reference

Total Page:16

File Type:pdf, Size:1020Kb

User's Guide and Reference IBM Compiler and Library for REXX on IBM Z Version 1 Release 4 User’s Guide and Reference IBM SH19-8160-06 Note Before using this information and the product it supports, be sure to read the general information under Appendix G, “Notices,” on page 267. Seventh Edition, August 2013 This edition applies to version 1 release 4 of IBM Compiler for REXX on IBM Z (product number 5695-013) and the IBM Library for REXX on IBM Z (product number 5695-014), and to all subsequent releases and modifications until otherwise indicated in new editions. This edition replaces SH19-8160-04. © Copyright International Business Machines Corporation 1991, 2013. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About This Book..................................................................................................xix How to Read the Syntax Notation............................................................................................................. xix How This Book Is Organized..................................................................................................................... xix How to Send Your Comments.................................................................................................................... xx What's New in Release 4..................................................................................... xxi IBM Compiler for REXX on IBM Z..............................................................................................................xxi IBM Library for REXX on IBM Z................................................................................................................ xxii Part 1. Programming Reference Information...........................................................1 Chapter 1. Overview.....................................................................................................................................3 Background information about compilers............................................................................................. 3 The Level of REXX Supported by the Compiler......................................................................................3 Using the Compiler in Program Development........................................................................................3 Background information about error checking................................................................................ 4 Forms and Uses of Output......................................................................................................................4 Porting and Running Compiled REXX Programs.................................................................................... 5 Calling and Linking REXX Programs....................................................................................................... 5 Running above 16 Megabytes in Virtual Storage...................................................................................6 SAA Compliance..................................................................................................................................... 6 Choosing the National Language............................................................................................................6 Alternate Library Overview.....................................................................................................................6 Stream I/O for TSO/E REXX Function Package......................................................................................7 Alias Definitions and Member Names under z/OS.................................................................................7 Chapter 2. Invoking the Compiler................................................................................................................9 Invoking the Compiler under z/OS.........................................................................................................9 Invoking the Compiler with the REXXC (FANC) EXEC...................................................................... 9 Invoking the Compiler with ISPF Panels........................................................................................11 Invoking the Compiler with JCL Statements..................................................................................12 Invoking the Compiler with Cataloged Procedures....................................................................... 13 Invoking the Compiler with the 'REXXCOMP' Command...............................................................13 Standard Data Sets Provided for the Compiler.............................................................................. 13 Invoking the Compiler under z/VM...................................................................................................... 14 Invoking the Compiler with REXXD................................................................................................ 14 Invoking the Compiler with the REXXC EXEC................................................................................ 16 Batch Jobs.......................................................................................................................................17 Chapter 3. Compiler Options and Control Directives................................................................................19 Compiler Options..................................................................................................................................19 ALTERNATE..................................................................................................................................... 19 BASE................................................................................................................................................19 CEXEC..............................................................................................................................................20 COMPILE......................................................................................................................................... 21 CONDENSE......................................................................................................................................21 DDNAMES........................................................................................................................................22 DLINK.............................................................................................................................................. 23 DUMP...............................................................................................................................................24 FLAG................................................................................................................................................ 25 FORMAT...........................................................................................................................................25 iii IEXEC...............................................................................................................................................26 LIBLEVEL.........................................................................................................................................27 LINECOUNT.....................................................................................................................................28 MARGINS........................................................................................................................................ 29 OBJECT........................................................................................................................................... 29 OLDDATE......................................................................................................................................... 31 OPTIMIZE........................................................................................................................................32 PRINT.............................................................................................................................................. 32 SAA..................................................................................................................................................33 SLINE...............................................................................................................................................33 SOURCE...........................................................................................................................................33 TERMINAL.......................................................................................................................................34 TESTHALT........................................................................................................................................34 TRACE..............................................................................................................................................35 XREF................................................................................................................................................ 35 Control Directives.................................................................................................................................36 %COPYRIGHT................................................................................................................................
Recommended publications
  • Process and Memory Management Commands
    Process and Memory Management Commands This chapter describes the Cisco IOS XR software commands used to manage processes and memory. For more information about using the process and memory management commands to perform troubleshooting tasks, see Cisco ASR 9000 Series Aggregation Services Router Getting Started Guide. • clear context, on page 2 • dumpcore, on page 3 • exception coresize, on page 6 • exception filepath, on page 8 • exception pakmem, on page 12 • exception sparse, on page 14 • exception sprsize, on page 16 • follow, on page 18 • monitor threads, on page 25 • process, on page 29 • process core, on page 32 • process mandatory, on page 34 • show context, on page 36 • show dll, on page 39 • show exception, on page 42 • show memory, on page 44 • show memory compare, on page 47 • show memory heap, on page 50 • show processes, on page 54 Process and Memory Management Commands 1 Process and Memory Management Commands clear context clear context To clear core dump context information, use the clear context command in the appropriate mode. clear context location {node-id | all} Syntax Description location{node-id | all} (Optional) Clears core dump context information for a specified node. The node-id argument is expressed in the rack/slot/module notation. Use the all keyword to indicate all nodes. Command Default No default behavior or values Command Modes Administration EXEC EXEC mode Command History Release Modification Release 3.7.2 This command was introduced. Release 3.9.0 No modification. Usage Guidelines To use this command, you must be in a user group associated with a task group that includes appropriate task IDs.
    [Show full text]
  • Chapter 1 Introduction to Computers, Programs, and Java
    Chapter 1 Introduction to Computers, Programs, and Java 1.1 Introduction • The central theme of this book is to learn how to solve problems by writing a program . • This book teaches you how to create programs by using the Java programming languages . • Java is the Internet program language • Why Java? The answer is that Java enables user to deploy applications on the Internet for servers , desktop computers , and small hand-held devices . 1.2 What is a Computer? • A computer is an electronic device that stores and processes data. • A computer includes both hardware and software. o Hardware is the physical aspect of the computer that can be seen. o Software is the invisible instructions that control the hardware and make it work. • Computer programming consists of writing instructions for computers to perform. • A computer consists of the following hardware components o CPU (Central Processing Unit) o Memory (Main memory) o Storage Devices (hard disk, floppy disk, CDs) o Input/Output devices (monitor, printer, keyboard, mouse) o Communication devices (Modem, NIC (Network Interface Card)). Bus Storage Communication Input Output Memory CPU Devices Devices Devices Devices e.g., Disk, CD, e.g., Modem, e.g., Keyboard, e.g., Monitor, and Tape and NIC Mouse Printer FIGURE 1.1 A computer consists of a CPU, memory, Hard disk, floppy disk, monitor, printer, and communication devices. CMPS161 Class Notes (Chap 01) Page 1 / 15 Kuo-pao Yang 1.2.1 Central Processing Unit (CPU) • The central processing unit (CPU) is the brain of a computer. • It retrieves instructions from memory and executes them.
    [Show full text]
  • Process Management
    Princeton University Computer Science 217: Introduction to Programming Systems Process Management 1 Goals of this Lecture Help you learn about: • Creating new processes • Waiting for processes to terminate • Executing new programs • Shell structure Why? • Creating new processes and executing new programs are fundamental tasks of many utilities and end-user applications • Assignment 7… 2 System-Level Functions As noted in the Exceptions and Processes lecture… Linux system-level functions for process management Function Description exit() Terminate the process fork() Create a child process wait() Wait for child process termination execvp() Execute a program in current process getpid() Return the process id of the current process 3 Agenda Creating new processes Waiting for processes to terminate Executing new programs Shell structure 4 Why Create New Processes? Why create a new process? • Scenario 1: Program wants to run an additional instance of itself • E.g., web server receives request; creates additional instance of itself to handle the request; original instance continues listening for requests • Scenario 2: Program wants to run a different program • E.g., shell receives a command; creates an additional instance of itself; additional instance overwrites itself with requested program to handle command; original instance continues listening for commands How to create a new process? • A “parent” process forks a “child” process • (Optionally) child process overwrites itself with a new program, after performing appropriate setup 5 fork System-Level
    [Show full text]
  • Cognitive Programming Language (CPL) Programmer's Guide
    Cognitive Programming Language (CPL) Programmer's Guide 105-008-02 Revision C2 – 3/17/2006 *105-008-02* Copyright © 2006, Cognitive. Cognitive™, Cxi™, and Ci™ are trademarks of Cognitive. Microsoft® and Windows™ are trademarks of Microsoft Corporation. Other product and corporate names used in this document may be trademarks or registered trademarks of other companies, and are used only for explanation and to their owner’s benefit, without intent to infringe. All information in this document is subject to change without notice, and does not represent a commitment on the part of Cognitive. No part of this document may be reproduced for any reason or in any form, including electronic storage and retrieval, without the express permission of Cognitive. All program listings in this document are copyrighted and are the property of Cognitive and are provided without warranty. To contact Cognitive: Cognitive Solutions, Inc. 4403 Table Mountain Drive Suite A Golden, CO 80403 E-Mail: [email protected] Telephone: +1.800.525.2785 Fax: +1.303.273.1414 Table of Contents Introduction.............................................................................................. 1 Label Format Organization .................................................................. 2 Command Syntax................................................................................ 2 Important Programming Rules............................................................. 3 Related Publications...........................................................................
    [Show full text]
  • A Compiler for a Simple Language. V0.16
    Project step 1 – a compiler for a simple language. v0.16 Change log: v0.16, changes from 0.15 Make all push types in compiler actions explicit. Simplified and better documentation of call and callr instruction compiler actions. Let the print statement print characters and numbers. Added a printv statement to print variables. Changed compiler actions for retr to push a variable value, not a literal value. Changes are shown in orange. v0.15, changes from 0.14 Change compiler actions for ret, retr, jmp. Change the description and compiler actions for poke. Change the description for swp. Change the compiler actions for call and callr. Changes shown in green. v0.14, changes from 0.13 Add peek, poke and swp instructions. Change popm compiler actions. Change callr compiler actions. Other small changes to wording. Changes are shown in blue. v0.13, changes from 0.12 Add a count field to subr, call and callr to simplify code generation. Changes are shown in red. v0.12 Changes from 0.11. Added a callr statement that takes a return type. Fix the generated code for this and for call to allow arguments to be pushed by the call. Add a retr that returns a value and update the reg. v0.11: changes from 0.10. Put typing into push operators. Put opcodes for compare operators. fix actions for call. Make declarations reserve a stack location. Remove redundant store instruction (popv does the same thing.) v0.10: changes from 0.0. Comparison operators (cmpe, cmplt, cmpgt) added. jump conditional (jmpc) added. bytecode values added.
    [Show full text]
  • Programming Basics - FORTRAN 77
    CWCS Workshop May 2005 Programming Basics - FORTRAN 77 http://www.physics.nau.edu/~bowman/PHY520/F77tutor/tutorial_77.html Program Organization A FORTRAN program is just a sequence of lines of plain text. This is called the source code. The text has to follow certain rules (syntax) to be a valid FORTRAN program. We start by looking at a simple example: program circle real r, area, pi c This program reads a real number r and prints c the area of a circle with radius r. write (*,*) 'Give radius r:' read (*,*) r pi = atan(1.0e0)*4.0e0 area = pi*r*r write (*,*) 'Area = ', area end A FORTRAN program generally consists of a main program and possibly several subprograms (i.e., functions or subroutines). The structure of a main program is: program name declarations statements end Note: Words that are in italics should not be taken as literal text, but rather as a description of what belongs in their place. FORTRAN is not case-sensitive, so "X" and "x" are the same variable. Blank spaces are ignored in Fortran 77. If you remove all blanks in a Fortran 77 program, the program is still acceptable to a compiler but almost unreadable to humans. Column position rules Fortran 77 is not a free-format language, but has a very strict set of rules for how the source code should be formatted. The most important rules are the column position rules: Col. 1: Blank, or a "c" or "*" for comments Col. 1-5: Blank or statement label Col. 6: Blank or a "+" for continuation of previous line Col.
    [Show full text]
  • How to Write a File Copy Program in Standard C? #Include <Stdio.H>
    Files How to write a file copy program in standard C? #include <stdio.h> FILE *fopen(const char *path, const char *mode); size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); int fclose(FILE *fp); We can also use character-based functions such as: #include <stdio.h> int fgetc(FILE *stream); int fputc(int c, FILE *stream); With either approach, we can write a C program that will work on any operating system as it is in standard C. What is the difference between the two approaches? /* lab/stdc-mycp.c */ /* appropriate header files */ #define BUF_SIZE 65536 int main(int argc, char *argv[]) { FILE *src, *dst; size_t in, out; char buf[BUF_SIZE]; int bufsize; if (argc != 4) { fprintf(stderr, "Usage: %s <buffer size> <src> <dest>\n", argv[0]); exit(1); } bufsize = atoi(argv[1]); if (bufsize > BUF_SIZE) { fprintf(stderr,"Error: %s: max. buffer size is %d\n",argv[0], BUF_SIZE); exit(1); } src = fopen(argv[2], "r"); if (NULL == src) exit(2); dst = fopen(argv[3], "w"); if (dst < 0) exit(3); while (1) { in = fread(buf, 1, bufsize, src); if (0 == in) break; out = fwrite(buf, 1, in, dst); if (0 == out) break; } fclose(src); fclose(dst); exit(0); } POSIX/Unix File Interface The system call interface for files in POSIX systems like Linux and MacOSX. A file is a named, ordered stream of bytes. I open(..) Open a file for reading or writing. Also allows a file to be locked providing exclusive access. I close(..) I read(..) The read operation is normally blocking.
    [Show full text]
  • Language Translators
    Student Notes Theory LANGUAGE TRANSLATORS A. HIGH AND LOW LEVEL LANGUAGES Programming languages Low – Level Languages High-Level Languages Example: Assembly Language Example: Pascal, Basic, Java Characteristics of LOW Level Languages: They are machine oriented : an assembly language program written for one machine will not work on any other type of machine unless they happen to use the same processor chip. Each assembly language statement generally translates into one machine code instruction, therefore the program becomes long and time-consuming to create. Example: 10100101 01110001 LDA &71 01101001 00000001 ADD #&01 10000101 01110001 STA &71 Characteristics of HIGH Level Languages: They are not machine oriented: in theory they are portable , meaning that a program written for one machine will run on any other machine for which the appropriate compiler or interpreter is available. They are problem oriented: most high level languages have structures and facilities appropriate to a particular use or type of problem. For example, FORTRAN was developed for use in solving mathematical problems. Some languages, such as PASCAL were developed as general-purpose languages. Statements in high-level languages usually resemble English sentences or mathematical expressions and these languages tend to be easier to learn and understand than assembly language. Each statement in a high level language will be translated into several machine code instructions. Example: number:= number + 1; 10100101 01110001 01101001 00000001 10000101 01110001 B. GENERATIONS OF PROGRAMMING LANGUAGES 4th generation 4GLs 3rd generation High Level Languages 2nd generation Low-level Languages 1st generation Machine Code Page 1 of 5 K Aquilina Student Notes Theory 1. MACHINE LANGUAGE – 1ST GENERATION In the early days of computer programming all programs had to be written in machine code.
    [Show full text]
  • Fortran 90 Programmer's Reference
    Fortran 90 Programmer’s Reference First Edition Product Number: B3909DB Fortran 90 Compiler for HP-UX Document Number: B3908-90002 October 1998 Edition: First Document Number: B3908-90002 Remarks: Released October 1998. Initial release. Notice Copyright Hewlett-Packard Company 1998. All Rights Reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except as allowed under the copyright laws. The information contained in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance or use of this material. Contents Preface . xix New in HP Fortran 90 V2.0. .xx Scope. xxi Notational conventions . xxii Command syntax . xxiii Associated documents . xxiv 1 Introduction to HP Fortran 90 . 1 HP Fortran 90 features . .2 Source format . .2 Data types . .2 Pointers . .3 Arrays . .3 Control constructs . .3 Operators . .4 Procedures. .4 Modules . .5 I/O features . .5 Intrinsics . .6 2 Language elements . 7 Character set . .8 Lexical tokens . .9 Names. .9 Program structure . .10 Statement labels . .10 Statements . .11 Source format of program file . .13 Free source form . .13 Source lines . .14 Statement labels . .14 Spaces . .14 Comments . .15 Statement continuation . .15 Fixed source form . .16 Spaces . .16 Source lines . .16 Table of Contents i INCLUDE line . 19 3 Data types and data objects . 21 Intrinsic data types . 22 Type declaration for intrinsic types .
    [Show full text]
  • Control Flow Graphs • Can Be Done at High Level Or Low Level – E.G., Constant Folding
    Optimizations • Code transformations to improve program – Mainly: improve execution time – Also: reduce program size Control Flow Graphs • Can be done at high level or low level – E.g., constant folding • Optimizations must be safe – Execution of transformed code must yield same results as the original code for all possible executions 1 2 Optimization Safety Optimization Safety • Safety of code transformations usually requires certain • Safety of code transformations usually requires certain information that may not be explicit in the code information which may not explicit in the code • Example: dead code elimination • Example: dead code elimination (1) x = y + 1; (1) x = y + 1; (2) y = 2 * z; (2) y = 2 * z; (3) x=y+z;x = y + z; (3) x=y+z;x = y + z; (4) z = 1; (4) z = 1; (5) z = x; (5) z = x; • What statements are dead and can be removed? • Need to know whether values assigned to x at (1) is never used later (i.e., x is dead at statement (1)) – Obvious for this simple example (with no control flow) – Not obvious for complex flow of control 3 4 1 Dead Variable Example Dead Variable Example • Add control flow to example: • Add control flow to example: x = y + 1; x = y + 1; y = 2 * z; y = 2 * z; if (d) x = y+z; if (d) x = y+z; z = 1; z = 1; z = x; z = x; • Statement x = y+1 is not dead code! • Is ‘x = y+1’ dead code? Is ‘z = 1’ dead code? •On some executions, value is used later 5 6 Dead Variable Example Dead Variable Example • Add more control flow: • Add more control flow: while (c) { while (c) { x = y + 1; x = y + 1; y = 2 * z; y = 2
    [Show full text]
  • Operating System Lab Manual
    OPERATING SYSTEM LAB MANUAL BASICS OF UNIX COMMANDS Ex.No:1.a INTRODUCTION TO UNIX AIM: To study about the basics of UNIX UNIX: It is a multi-user operating system. Developed at AT & T Bell Industries, USA in 1969. Ken Thomson along with Dennis Ritchie developed it from MULTICS (Multiplexed Information and Computing Service) OS. By1980, UNIX had been completely rewritten using C langua ge. LINUX: It is similar to UNIX, which is created by Linus Torualds. All UNIX commands works in Linux. Linux is a open source software. The main feature of Linux is coexisting with other OS such as windows and UNIX. STRUCTURE OF A LINUXSYSTEM: It consists of three parts. a)UNIX kernel b) Shells c) Tools and Applications UNIX KERNEL: Kernel is the core of the UNIX OS. It controls all tasks, schedule all Processes and carries out all the functions of OS. Decides when one programs tops and another starts. SHELL: Shell is the command interpreter in the UNIX OS. It accepts command from the user and analyses and interprets them 1 | P a g e BASICS OF UNIX COMMANDS Ex.No:1.b BASIC UNIX COMMANDS AIM: To study of Basic UNIX Commands and various UNIX editors such as vi, ed, ex and EMACS. CONTENT: Note: Syn->Syntax a) date –used to check the date and time Syn:$date Format Purpose Example Result +%m To display only month $date+%m 06 +%h To display month name $date+%h June +%d To display day of month $date+%d O1 +%y To display last two digits of years $date+%y 09 +%H To display hours $date+%H 10 +%M To display minutes $date+%M 45 +%S To display seconds $date+%S 55 b) cal –used to display the calendar Syn:$cal 2 2009 c)echo –used to print the message on the screen.
    [Show full text]
  • Complete Code Generation from UML State Machine
    Complete Code Generation from UML State Machine Van Cam Pham, Ansgar Radermacher, Sebastien´ Gerard´ and Shuai Li CEA, LIST, Laboratory of Model Driven Engineering for Embedded Systems, P.C. 174, Gif-sur-Yvette, 91191, France Keywords: UML State Machine, Code Generation, Semantics-conformance, Efficiency, Events, C++. Abstract: An event-driven architecture is a useful way to design and implement complex systems. The UML State Machine and its visualizations are a powerful means to the modeling of the logical behavior of such an archi- tecture. In Model Driven Engineering, executable code can be automatically generated from state machines. However, existing generation approaches and tools from UML State Machines are still limited to simple cases, especially when considering concurrency and pseudo states such as history, junction, and event types. This paper provides a pattern and tool for complete and efficient code generation approach from UML State Ma- chine. It extends IF-ELSE-SWITCH constructions of programming languages with concurrency support. The code generated with our approach has been executed with a set of state-machine examples that are part of a test-suite described in the recent OMG standard Precise Semantics Of State Machine. The traced execution results comply with the standard and are a good hint that the execution is semantically correct. The generated code is also efficient: it supports multi-thread-based concurrency, and the (static and dynamic) efficiency of generated code is improved compared to considered approaches. 1 INTRODUCTION Completeness: Existing tools and approaches mainly focus on the sequential aspect while the concurrency The UML State Machine (USM) (Specification and of state machines is limitedly supported.
    [Show full text]