How To Run A Test File Extension On A Rexx 4.1.1 (Unix) 4.2.1 On A Microsoft Linux 4.3.2 (Amd64) (Orchestra) (For Windows) (



Similar documents
Implementing Rexx Handlers in NetRexx/Java/Rexx

The 2014 Edition of BSF4ooRexx (for Windows, Linux, MacOSX)

New Features in BSF4ooRexx (Camouflaging Java as oorexx)

D-Bus Language Bindings for oorexx

An Introduction to Procedural and Object-oriented Programming (Object Rexx) 8 "Automating Windows and Windows Applications"

An Introduction to Procedural and Object-oriented Programming (Object Rexx) 3 "Automating Windows and Windows Applications"

dbusoorexx Bringing the Power of D-Bus to Your Fingertips

Overview of Web Services API

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM

Restraining Execution Environments

Creating a Simple, Multithreaded Chat System with Java

1 Posix API vs Windows API

CS506 Web Design and Development Solved Online Quiz No. 01

Getting Started with the Internet Communications Engine

Building Applications Using Micro Focus COBOL

To Java SE 8, and Beyond (Plan B)

CSC230 Getting Starting in C. Tyler Bletsch

13 File Output and Input

COSC 6397 Big Data Analytics. Distributed File Systems (II) Edgar Gabriel Spring HDFS Basics

SQLITE C/C++ TUTORIAL

Konzepte objektorientierter Programmierung

Introduction to Object-Oriented Programming

Capabilities of a Java Test Execution Framework by Erick Griffin

Channel Access Client Programming. Andrew Johnson Computer Scientist, AES-SSG

ADOBE AIR. Working with Data in AIR. David Tucker

Crash Course in Java

Networks and Services

Hacking (and securing) JBoss AS

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Using the Remote Access Library

Setting Up the Site Licenses

Lecture 5: Java Fundamentals III

Libmonitor: A Tool for First-Party Monitoring

Creating a Java application using Perfect Developer and the Java Develo...

FLEXNET LICENSING END USER GUIDE. Version 10.8

bbc Developing Service Providers Adobe Flash Media Rights Management Server November 2008 Version 1.5

An Introduction to Procedural and Object-oriented Programming (Object Rexx) 1 "Automating Windows and Windows Applications"

32-Bit Workload Automation 5 for Windows on 64-Bit Windows Systems

Working With Derby. Version 10.2 Derby Document build: December 11, 2006, 7:06:09 AM (PST)

Development Techniques for Native/Hybrid Tizen Apps. Presented by Kirill Kruchinkin

Java Interview Questions and Answers

End Users Guide VERSION 9.2 JULY 2003

CS5233 Components Models and Engineering

FLEXNET LICENSING END USER GUIDE. Version 10.8

Onset Computer Corporation

Using the VMRC Plug-In: Startup, Invoking Methods, and Shutdown on page 4

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

02 B The Java Virtual Machine

Install Java Development Kit (JDK) 1.8

AUTOMATING OPENOFFICE.ORG WITH OOREXX: OOREXX NUTSHELL EXAMPLES FOR WRITE AND CALC

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

PostgreSQL Functions By Example

Appendix A Using the Java Compiler

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Chulalongkorn University International School of Engineering Department of Computer Engineering Computer Programming Lab.

Understanding the WebLogic Scripting Tool c (12.1.3)

TIBCO Hawk SNMP Adapter Installation

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

3.5. cmsg Developer s Guide. Data Acquisition Group JEFFERSON LAB. Version

How to create/avoid memory leak in Java and.net? Venkat Subramaniam

Continuous Integration Part 2

A Native Client for the Hadoop Distributed Filesystem by Colin P. McCabe

Contents. Introduction. Chapter 1 Some Hot Tips to Get You Started. Chapter 2 Tips on Working with Strings and Arrays..

ECE 122. Engineering Problem Solving with Java

Documentum Developer Program

COSC 6397 Big Data Analytics. Mahout and 3 rd homework assignment. Edgar Gabriel Spring Mahout

AP Computer Science Java Subset

1) Which of the following is a constant, according to Java naming conventions? a. PI b. Test c. x d. radius

CSCI E 98: Managed Environments for the Execution of Programs

MatrixSSL Developer s Guide

Java Web Services SDK

A Comparative Study on Vega-HTTP & Popular Open-source Web-servers

CSE 308. Coding Conventions. Reference

Virtuozzo Virtualization SDK

Computer Systems II. Unix system calls. fork( ) wait( ) exit( ) How To Create New Processes? Creating and Executing Processes

Demo: Controlling.NET Windows Forms from a Java Application. Version 7.3

Web Integrated Solutions

Connecting to WebSphere ESB and WebSphere Process Server

Tutorial: Getting Started

Scanner. It takes input and splits it into a sequence of tokens. A token is a group of characters which form some unit.

JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers

sqlite driver manual

Chapter 5. Recursion. Data Structures and Algorithms in Java

mod_tcl TCL inside the Apache web server

RIOT-Lab. How to use RIOT in the IoT-Lab. Oliver "Oleg" Hahm. November 7, 2014 INRIA. O. Hahm (INRIA) RIOT-Lab November 7, / 29

The Java Logging API and Lumberjack

An Incomplete C++ Primer. University of Wyoming MA 5310

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

oorexx Documentation 4.2.0

CISC 181 Project 3 Designing Classes for Bank Accounts

Division of Informatics, University of Edinburgh

Media Upload and Sharing Website using HBASE

ProfBuilder: A Package for Rapidly Building Java Execution Profilers Brian F. Cooper, Han B. Lee, and Benjamin G. Zorn

Practice Fusion API Client Installation Guide for Windows

Web Development in Java

Implementing a Web Service Client using Java

Object-Oriented Programming in Java

Transcription:

Institut für Betriebswirtschaftslehre und Wirtschaftsinformatik Configuring Rexx Interpreter Instances from NetRexx/Java The 2012 International Rexx Symposium Rony G. Flatscher Wirtschaftsuniversität Wien Augasse 2-6 A-1090 Wien Hier The 2012 Vortrags-/Vorlesungstitel Automatisierung International von Rexx Windows Symposium, im Master Anwendungen eintragen RTP, North (3) Carolina 1 Prof. Dr. RonyG. Flatscher

Agenda oorexx startup options Overview New BSF4ooRexx 4.1 support for configuring Rexx interpreter instances from Java/NetRexx Overview Configuration in detail Nutshell examples Roundup Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 2 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

oorexx Startup Options, 1 Overview Multiple oorexx interpreter instances per process! Each instance can be invoked with different options from C++ Documentation in rexxpg.pdf, section "9.1. Rexx Interpreter API" For each Rexx interpreter instance there is a separate.local Eg..input (.stdin),.output (.stdout),.error (.stderr)....environment available to all interpreter instances Over all For each Rexx interpreter instance there may be multiple threads executing Rexx programs concurrently! Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 3 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

oorexx Startup Options, 2 Options available in C++ APPLICATION_DATA void * pointer to Rexx interpreter instance application data EXTERNAL_CALL_PATH String containing additional paths to search for Rexx programs EXTERNAL_CALL_EXTENSIONS String containing additional file extensions which Rexx programs may have, such that the interpreter should look for them as well LOAD_REQUIRED_LIBRARY Array of strings denoting libraries (DLLs,.so) to load Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 4 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

oorexx Startup Options, 3 Options available in C++ (continued) REGISTER_LIBRARY Allows to register external Rexx functions/methods implemented in C++ in the program starting the Rexx interpreter instance DIRECT_EXITS oorexx 4.x version of Rexx exits (array of exit handlers) DIRECT_ENVIRONMENTS oorexx 4.x version of Rexx environments (array of [sub]command handlers) INITIAL_ADDRESS_ENVIRONMENT String denoting the name of the default environment Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 5 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

oorexx Startup Options, 4 Options available in C++ (continued) REGISTERED_EXITS Legacy (SAA) Rexx exits (array of exit handlers) REGISTERED_ENVIRONMENTS Legacy (SAA) Rexx environments (array of [sub]command handlers) Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 6 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

New BSF4ooRexx 4.1 Support for Startup Options, Overview The Java RexxEngine represents an oorexx interpreter instance and is managed by a BSFManager Initialization of the Rexx interpreter instance gets now deferred as long as possible Allows configuring the Rexx interpreter instance A default configuration matching previous BSF4ooRexx options Configuration done via RexxConfiguration object of RexxEngine Rexx interpreter instance gets created upon the first request from Java to execute Rexx code No (re-)configuration possible anymore Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 7 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

New BSF4ooRexx 4.1 Support for Startup Options, RexxConfiguration, 1 Options available in Java/NetRexx EXTERNAL_CALL_PATH EXTERNAL_CALL_EXTENSIONS LOAD_REQUIRED_LIBRARY DIRECT_EXITS DIRECT_ENVIRONMENTS INITIAL_ADDRESS_ENVIRONMENT Options not available to Java/NetRexx (not applicable) APPLICATION_DATA, REGISTER_LIBRARY, REGISTERED_EXITS, REGISTERED_ENVIRONMENTS Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 8 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

New BSF4ooRexx 4.1 Support for Startup Options, RexxConfiguration, 2 To get access to the RexxConfiguration Create a RexxEngine instance Use the public method getrexxconfiguration() Configuration methods available in RexxConfiguration Rexx option EXTERNAL_CALL_PATH The files and paths need to be separated by the operating system's conventions, use eg. System.getProperty("file.separator") - "/" on Unix, "\" on Windows System.getProperty("path.separator") - ":" on Unix, ";" on Windows void setexternalcallpath(string path) throws BSFException String getexternalcallpath() Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 9 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

New BSF4ooRexx 4.1 Support for Startup Options, RexxConfiguration, 3 Configuration methods available in RexxConfiguration Rexx option EXTERNAL_CALL_EXTENSION Additional file extensions, separated by a comma (,) void setexternalcallextension(string path) throws BSFException String getexternalcallextension() Rexx option LOAD_REQUIRED_LIBRARY One or more native libraries that are required for the Rexx programs void addrequiredlibrary(string libraryname) throws BSFException String[] getrequiredlibraries() Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 10 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

New BSF4ooRexx 4.1 Support for Startup Options, RexxConfiguration, 4 Configuration methods available in RexxConfiguration Rexx option DIRECT_EXITS Exit numbers ("function") defined in interface RexxExitHandler Defined exit handlers can be replaced at runtime! - Defined exits can be temporarily "nullified" at runtime! void addexithandler(int function, RexxExitHandler exithandler) throws BSFException RexxExitHandler setexithandler(int function, RexxExitHandler exithandler) throws BSFException RexxExitHandler getexithandler(int function) BitSet getdefinedexits() Object [] getexithandlers() Object[] contains an int and a RexxExitHandler array object Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 11 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

New BSF4ooRexx 4.1 Support for Startup Options, RexxConfiguration, 5 Configuration methods available in RexxConfiguration Rexx option DIRECT_ENVIRONMENTS Defined command handlers can be replaced at runtime! void addcommandhandler(string name, RexxCommandHandler commandhandler) throws BSFException RexxCommandHandler getcommandhandler(string name) RexxCommandHandler setcommandhandler(string name, RexxCommandHandler commandhandler) throws BSFException Object[] getcommandhandlers() Object[] contains a String and a RexxCommandHandler array object Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 12 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

New BSF4ooRexx 4.1 Support for Startup Options, RexxConfiguration, 6 Configuration methods available in RexxConfiguration Rexx option INITIAL_ADDRESS_ENVIRONMENT void setinitialaddressenvironment(string name) throws BSFException String getinitialaddressenvironment() Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 13 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Extension" Java program "SampleFileExtension.java" Add file extension ".xyz" as another Rexx program extension Rexx programs "testsamplefileextension.rex" "rexx_pgm.xyz" Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 14 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Extension " SampleFileExtension.java import org.apache.bsf.*; import org.rexxla.bsf.engines.rexx.*; public class SampleFileExtension { public static void main (String args[]) throws BSFException { BSFManager mgr =new BSFManager(); // create an instance of BSFManager RexxEngine rexxengine=(rexxengine) mgr.loadscriptingengine("rexx"); // load the Rexx engine // Configure the RexxEngine RexxConfiguration rexxconf=rexxengine.getrexxconfiguration(); // add ".xyz" to default call extensions rexxconf.setexternalcallextensions(rexxconf.getexternalcallextensions()+",.xyz"); System.err.println("SampleFileExtension.java, Rexx configuration:\n\n"+rexxconf+"\n"); } } // Rexx code to run (quote filename for Unix filesystems) String rexxcode= "call 'testsamplefileextension.rex' "; // invoke the interpreter and run the Rexx program rexxengine.apply ("SampleFileExtension.rex", 0, 0, rexxcode, null, null); rexxengine.terminate(); // terminate Rexx engine (Rexx interpreter instance) Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 15 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Extension " nrxsamplefileextension.nrx mgr = org.apache.bsf.bsfmanager() -- create an instance of BSFManager rexxengine = org.rexxla.bsf.engines.rexx.rexxengine mgr.loadscriptingengine("rexx") -- load the Rexx engine -- Rexx code to run (quote filename for Unix filesystems) rexxcode= "call 'testsamplefileextension.rex' " -- Configure the RexxEngine rexxconf=rexxengine.getrexxconfiguration() -- add ".xyz" to default call extensions rexxconf.setexternalcallextensions(rexxconf.getexternalcallextensions()",.xyz") System.err.println("nrxSampleFileExtension.nrx, Rexx configuration:\n\n"rexxconf"\n") -- invoke the interpreter and run the Rexx program rexxengine.apply("samplefileextension.rex", 0, 0, rexxcode, null, null) rexxengine.terminate() -- terminate Rexx engine (Rexx interpreter instance) Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 16 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Extension" testsamplefileextension.rex, rexx_pgm.xyz /* testsamplefileextension.rex */ parse source.. f say "---> This is from" pp(filespec("name",f)) "<---" say say "Testing Rexx programs with arbitrary extension '.xyz'..." call "rexx_pgm.xyz" -- quoted, such that it can be found on Unix too say "--- now not supplying the extension '.xyz'" call "rexx_pgm" -- quoted, such that it can be found on Unix too say "---> The end. <---" ::routine pp return "["arg(1)"]" /* rexx_pgm.xyz */ parse source.. f say say " ==> This is from" pp(filespec("name",f)) "<==" say exit ::routine pp return "["arg(1)"]" Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 17 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Extension" Running the Program E:\extendFileExtension>java SampleFileExtension SampleFileExtension.java, Rexx configuration: org.rexxla.bsf.engines.rexx.rexxconfiguration[initialaddressenvironment=[null],externalcallpath=[null], externalcallextensions=[.rxj,.rxo,.rxjo,.jrexx,.xyz],loadrequiredlibrary={}, exithandlers={},commandhandlers={}] ---> This is from [testsamplefileextension.rex] <--- Testing Rexx programs with arbitrary extension '.xyz'... ==> This is from [rexx_pgm.xyz] <== --- now not supplying the extension '.xyz' ==> This is from [rexx_pgm.xyz] <== ---> The end. <--- Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 18 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Path" Java program "SamplePathExtension.java" Add file extension ".xyz" as another Rexx program extension Add path "./anotherpath" for the Rexx interpreter to look up Rexx programs "testsamplepathextension.rex" "anotherpath/rexx_pgm.xyz" Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 19 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Path" SamplePathExtension.java import org.apache.bsf.*; import org.rexxla.bsf.engines.rexx.*; public class SamplePathExtension { public static void main (String args[]) throws BSFException { BSFManager mgr =new BSFManager(); // create an instance of BSFManager RexxEngine rexxengine=(rexxengine) mgr.loadscriptingengine("rexx"); // load the Rexx engine // Configure the RexxEngine RexxConfiguration rexxconf=rexxengine.getrexxconfiguration(); // add ".xyz" to default call extensions rexxconf.setexternalcallextensions(rexxconf.getexternalcallextensions()+",.xyz"); // add ".\anotherpath" (Windows), "./anotherpath" (Unix) rexxconf.setexternalcallpath("."+system.getproperty("file.separator")+"anotherpath"); System.err.println("SamplePathExtension.java, Rexx configuration:\n\n"+rexxconf+"\n"); } } // Rexx code to run (quote filename for Unix filesystems) String rexxcode= "call 'testsamplepathextension.rex' "; // invoke the interpreter and run the Rexx program rexxengine.apply ("SamplePathExtension.rex", 0, 0, rexxcode, null, null); rexxengine.terminate(); // terminate Rexx engine (Rexx interpreter instance) Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 20 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Extension " nrxsamplepathextension.nrx mgr = org.apache.bsf.bsfmanager() -- create an instance of BSFManager rexxengine = org.rexxla.bsf.engines.rexx.rexxengine mgr.loadscriptingengine("rexx") -- load the Rexx engine -- Rexx code to run (quote filename for Unix filesystems) rexxcode= "call 'testsamplepathextension.rex' " -- Configure the RexxEngine rexxconf=rexxengine.getrexxconfiguration() -- add ".xyz" to default call extensions rexxconf.setexternalcallextensions(rexxconf.getexternalcallextensions()",.xyz") -- add ".\anotherpath" (Windows), "./anotherpath" (Unix) rexxconf.setexternalcallpath("."system.getproperty("file.separator")"anotherpath") System.err.println("nrxSamplePathExtension.nrx, Rexx configuration:\n\n"rexxconf"\n") -- invoke the interpreter and run the Rexx program rexxengine.apply("samplepathextension.rex", 0, 0, rexxcode, null, null) rexxengine.terminate() -- terminate Rexx engine (Rexx interpreter instance) Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 21 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Path" testsamplepathextension.rex, rexx_pgm.xyz /* testsamplepathextension.rex */ parse source.. f say "---> This is from" pp(filespec("name",f)) "<---" say say "Testing Rexx programs with arbitrary extension '.xyz'..." call "rexx_pgm.xyz" -- quoted, such that it can be found on Unix too say "--- now not supplying the extension '.xyz'" call "rexx_pgm" -- quoted, such that it can be found on Unix too say "---> The end. <---" ::routine pp return "["arg(1)"]" /*./anotherpath/rexx_pgm.xyz */ parse source.. f say say " ==> This is from" pp(filespec("name",f)) "<==" say exit ::routine pp return "["arg(1)"]" Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 22 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Nutshell Example "External Call Path" Running the Program E:\extendPathExtension>java SamplePathExtension SamplePathExtension.java, Rexx configuration: org.rexxla.bsf.engines.rexx.rexxconfiguration[initialaddressenvironment=[null], externalcallpath=[.\anotherpath],externalcallextensions=[.rxj,.rxo,.rxjo,.jrexx,.xyz], loadrequiredlibrary={},exithandlers={},commandhandlers={}] ---> This is from [testsamplepathextension.rex] <--- Testing Rexx programs with arbitrary extension '.xyz'... ==> This is from [rexx_pgm.xyz] <== --- now not supplying the extension '.xyz' ==> This is from [rexx_pgm.xyz] <== ---> The end. <--- Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 23 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher

Roundup New BSF4ooRexx 4.1 Adds the ability for Java/NetRexx programs to Define options for individual Rexx interpreter instances EXTERNAL_CALL_PATH EXTERNAL_CALL_EXTENSIONS LOAD_REQUIRED_LIBRARY DIRECT_EXITS DIRECT_ENVIRONMENTS INITIAL_ADDRESS_ENVIRONMENT Configuration from Java/NetRexx is very easy using the RexxConfiguration class Hier The 2012 Vortrags-/Vorlesungstitel International Rexx Symposium, im Master eintragen RTP, North Carolina 24 Hier Name des Vortragenden RonyG. im Master eintragen Flatscher