MUMPS IO Documentation

Similar documents
HALCoGen TMS570LS31x Help: example_sci_uart_9600.c

Open Source Used In TSP

ColdFusion Builder 3.2 Third Party Software Notices and/or Additional Terms and Conditions

Ecma International Policy on Submission, Inclusion and Licensing of Software

ANZ TRANSACTIVE MOBILE for ipad

Intel Stress Bitstreams and Encoder (Intel SBE) 2017 AVS2 Release Notes (Version 2.3)

Ecma International Policy on Submission, Inclusion and Licensing of Software

User Manual. Date Aug 30, Enertrax DAS Download Client

System Log NextAge Consulting Pete Halsted

ProgressBar Abstract

Table of Contents Overview...2 Selecting Post-Processing: ColorMap...3 Overview of Options Copyright, license, warranty/disclaimer...

The Cron service allows you to register STAF commands that will be executed at a specified time interval(s).

Open Source Used In Cisco Configuration Professional for Catalyst 1.0

IETF TRUST. Legal Provisions Relating to IETF Documents. Approved November 6, Effective Date: November 10, 2008

NemHandel Referenceklient 2.3.1

NemHandel Referenceklient 2.3.0

Copyright PFU LIMITED 2016

pyserial-asyncio Documentation

IETF TRUST. Legal Provisions Relating to IETF Documents. February 12, Effective Date: February 15, 2009

MagicInfo Express Content Creator

Data Deduplication Metadata Extension

Open Source Used In c1101 and c1109 Cisco IOS XE Fuji

Open Source and Standards: A Proposal for Collaboration

Static analysis for quality mobile applications

PageScope Box Operator Ver. 3.2 User s Guide

User Manual for Video Codec

Preface. Audience. Cisco IOS Software Documentation. Organization

HYDROOBJECTS VERSION 1.1

SW MAPS TEMPLATE BUILDER. User s Manual

US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Copyright PFU LIMITED

iwrite technical manual iwrite authors and contributors Revision: 0.00 (Draft/WIP)

calio / form-input-nginx-module

CSCE Inspection Activity Name(s):

Bar Code Discovery. Administrator's Guide

Fujitsu ScandAll PRO V2.1.5 README

About This Guide. and with the Cisco Nexus 1010 Virtual Services Appliance: N1K-C1010

FLAMEBOSS 300 MANUAL

Definiens. Image Miner bit and 64-bit Edition. Release Notes

LabVIEW Driver. User guide Version

TWAIN driver User s Guide

Definiens. Image Miner bit and 64-bit Editions. Release Notes

Internet Connection Guide

Flask-Sitemap Documentation

Documentation Roadmap for Cisco Prime LAN Management Solution 4.2

@list = bsd_glob('*.[ch]'); $homedir = bsd_glob('~gnat', GLOB_TILDE GLOB_ERR);

Package fst. December 18, 2017

Grouper UI csrf xsrf prevention

cs50.c /**************************************************************************** * CS50 Library 6 *

TheGreenBow VPN Client ios User Guide

FLAME BOSS 200V2 & 300 MANUAL. Version 2.6 Download latest at FlameBoss.com/manuals

AccuTerm 7 Internet Edition Connection Designer Help. Copyright Schellenbach & Assoc., Inc.

DAP Controller FCO

Conettix Universal Dual Path Communicator B465

iphone/ipad Connection Manual

Watch 4 Size v1.0 User Guide By LeeLu Soft 2013

Definiens. Tissue Studio Release Notes

openresty / array-var-nginx-module

License, Rules, and Application Form

Denkh XML Reporter. Web Based Report Generation Software. Written By Scott Auge Amduus Information Works, Inc.

Packet Trace Guide. Packet Trace Guide. Technical Note

Distinction Import Module User Guide. DISTINCTION.CO.UK

PTZ Control Center Operations Manual

Explaining & Accessing the SPDX License List

HYDRODESKTOP VERSION 1.4 QUICK START GUIDE

RPly Documentation. Release Alex Gaynor

This file includes important notes on this product and also the additional information not included in the manuals.

Anybus Wireless Bridge Ethernet Bluetooth Access Point Product Guide

modpoll is a command line based Modbus master simulator and test utility. It is free software.

Splunk. Splunk. Deployment Guide

Scott Auge

SkyPilot OS Installation: Fedora Core 5

SMS2CMDB Project Summary v1.6

Business Rules NextAge Consulting Pete Halsted

QuarkXPress Server Manager 8.0 ReadMe

User Guide. Calibrated Software, Inc.

This file includes important notes on this product and also the additional information not included in the manuals.

Package fst. June 7, 2018

HIS document 2 Loading Observations Data with the ODDataLoader (version 1.0)

Installation. List Wrangler - Mailing List Manager for GTK+ Part I. 1 Requirements. By Frank Cox. September 3,

VMware vcenter Log Insight Manager. Deployment Guide

PyWin32ctypes Documentation

Programming Style & Firmware Standards


KEMP Driver for Red Hat OpenStack. KEMP LBaaS Red Hat OpenStack Driver. Installation Guide

Adobe Connect. Adobe Connect. Deployment Guide

Simba Cassandra ODBC Driver with SQL Connector

Avaya VPN Client Software Release 10.05_100

Epic. Epic Systems. Deployment Guide

Note: The version the Event service must be 1.10 or later (but less than 3.0.0).

HYDRODESKTOP VERSION 1.1 BETA QUICK START GUIDE

JPdfBookmarks Manual. by Flaviano Petrocchi

Use in High-Safety Applications

Installing the Shrew Soft VPN Client

Technics Audio Player User Guide

Copyright 2010 by Microtek International, Inc. Trademarks. Important. All rights reserved.

SAM4 Reset Controller (RSTC)

PTZ Control Center Operations Manual

python-hl7 Documentation

FOR TCG ACPI Specification

Transcription:

MUMPS IO Documentation Copyright (c) 1999, 2000, 2001, 2002, 2003 Raymond Douglas Newman. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Raymond Douglas Newman nor the names of the contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Introduction MUMPS IO may be performed to the following classes: Devices Files Network Pipes The MUMPS commands that are used to do IO are: OPEN USE WRITE READ CLOSE How to use these commands with each class is discussed below. Devices The Device class includes such things as the console, serial lines (terminals or printers), parallel ports (printers) and pseudo terminals (xterms). Standard in (stdin) or MUMPS channel 0 (zero) is usually of class Device.

OPEN for Devices NOTE: OPEN may not be used with MUMPS channel 0. The OPEN command is of the form: OPEN channel:(device:mode)[:timeout[:namespace]] channel is the MUMPS channel number from 1 to 15 inclusive. device is the full device specification - like /dev/cuaa0. mode is one of: IO - open the device for both Reading and Writing READ - open the device for Reading only WRITE - open the device for Writing only timeout is the optional time in seconds to wait for the device. For example: OPEN 1:("/dev/lpt0":"W") ;Open the printer for writing USE for Devices The USE command is of the form: USE channel[:parameters[:namespace]] channel is the MUMPS channel number from 1 to 15 inclusive. parameters are zero or more of the following. If more than one parameter is supplied, they must be enclosed in parenthesis () and separated with colons. TERMINATOR=$C(n,...) Specify the input terminators. All input terminators must be in the range of ASCII 0 to ACSII 31. The special case of $C(13,10) requires both characters to be in the input stream to terminate input. The terminating character(s) is/are returned in the special variable $KEY. The default input terminator for this class is $C(13). OUTPUT=$C(n,...) Specify the output terminators to output when WRITE! is executed. This may be up to 6 (six) characters. The default output terminators for this class are $C(13,10). [NO]CONTROLC Enable/Disable interuption of a running process. NOTE: This applies to stdin only and defaults to CONTROLC. [NO]CONTROLT Enable/Disable mimi process status. NOTE: This applies to stdin only and defaults to CONTROLT. [NO]ESCAPE Enable/Disable escape sequence processing. When enabled, escape sequences are returned in the variable $KEY.

The default for this class is ESCAPE. [NO]ECHO Enable/Disable character echo. The default for this class is ECHO. DELETE= Define the character delete key as NONE, BACK $C(8), DELETE $C(127) or BOTH $C(8) and $C(127). The default for this class is DELETE=DELETE. WRITE for Devices The WRITE command is of the form: WRITE comma separated list of writearguments where writearguments are:! carrige return, linefeed combination or specified out terminator expression - output any valid MUMPS expression *intexpr - output the ASCII character intexpr#256 READ for Devices The READ command is of the form: READ comma separated list of readarguments where readarguments are:! output carrige return, linefeed combination or specified out terminator variable[#count][:timeout] - input data to a maximum length of [#count] into a MUMPS variable. *variable[:timeout] - input one ASCII character as an integer (0 to 255) If :timeout is specified and is zero or a positive number, the system will wait that many seconds for data to become available. Should the read be a *variable and a single character is received or should the [#count] be reached or a terminator be received, then $TEST is set to 1. Else $TEST is set to zero. If the form READ "literal",var is used, all typeahead is canceled before the read is done. CLOSE for Devices The CLOSE command is of the form: CLOSE channel

Note: Closing channel 0 is ignored. Files The File class includes text files (binary or ASCII). Standard in (stdin) or MUMPS channel 0 (zero) can be of class File. OPEN for Files NOTE: OPEN may not be used with MUMPS channel 0. The OPEN command is of the form: OPEN channel:(file:mode)[:timeout[:namespace]] channel is the MUMPS channel number from 1 to 15 inclusive. file is the full file specification - like /home/me/myfile. mode is one of: APPEND - open the file for Writing and append to the end of the file READ - open the file for Reading only WRITE - open the file for Writing only and delete the current file timeout doesn't do anything for a file For example: OPEN 1:("/home/me/myfile":"W") ;Open myfile for writing USE for Files The USE command is of the form: USE channel[:parameters[:namespace]] channel is the MUMPS channel number from 1 to 15 inclusive. parameters are zero or more of the following. If more than one parameter is supplied, they must be enclosed in parenthesis () and separated with colons. TERMINATOR=$C(n,...) Specify the input terminators. All input terminators must be in the range of ASCII 0 to ACSII 31. The special case of $C(13,10) requires both characters to be in the input stream to terminate input. This is typically used for reading files created on DOS. The terminating character(s) is/are returned in the special variable $KEY. The default input terminator for this class is $C(10). OUTPUT=$C(n,...) Specify the output terminators to output when WRITE! is executed. This may be up to 6 (six) characters. The default output terminator for this class is $C(10).

WRITE for Files The WRITE command is of the form: WRITE comma separated list of writearguments where writearguments are:! carrige return, linefeed combination or specified out terminator expression - output any valid MUMPS expression *intexpr - output the ASCII character intexpr#256 READ for Files The READ command is of the form: READ comma separated list of readarguments where readarguments are:! output carrige return, linefeed combination or specified out terminator variable[#count] - input data to a maximum length of [#count] into a MUMPS variable. *variable - input one ASCII character as an integer (0 to 255) CLOSE for Files The CLOSE command is of the form: CLOSE channel Note: Closing channel 0 is ignored. A file may be deleted by opening it for WRITE then closing it. For example: OPEN 1:("file":"W") ;Open file to be deleted CLOSE 1 ;Delete it Network The Network class includes tcp socket connections (Server or Client). Standard in (stdin) or MUMPS channel 0 (zero) can be of class Network. OPEN for Network NOTE: OPEN may not be used with MUMPS channel 0. The OPEN command is of the form:

OPEN channel:(port/address:mode)[:timeout[:namespace]] channel is the MUMPS channel number from 1 to 15 inclusive. port/address is the port to be opened (Server) or the ip address space port (Client). mode is one of: TCPIP - open the specified ip address/port combination (Client connection) SERVER[=n] - open the specified port in Server mode. When =n is specified fork each connection up to a maximum of n simultaneous jobs. timeout specifies the time to wait for the connection to become available (Client) or to wait for a client to connect (Server). An error will occur when a non-existant address is assessed after a specific time. Both the error and the time are O/S specific as follows: linux FreeBSD Timeout (secs) 3 60 Error Z313 Z260 For example: OPEN 1:("80":"S=5") ;Open http port as server USE for Network The USE command is of the form: USE channel[:parameters[:namespace]] channel is the MUMPS channel number from 1 to 15 inclusive. parameters are zero or more of the following. If more than one parameter is supplied, they must be enclosed in parenthesis () and separated with colons. TERMINATOR=$C(n,...) Specify the input terminators. All input terminators must be in the range of ASCII 0 to ACSII 31. The special case of $C(13,10) requires both characters to be in the input stream to terminate input. This is typically used for reading files created on DOS. The terminating character(s) is/are returned in the special variable $KEY. The default input terminator for this class is $C(13). OUTPUT=$C(n,...) Specify the output terminators to output when WRITE! is executed. This may be up to 6 (six) characters. The default output terminator for this class is $C(13).

WRITE for Network The WRITE command is of the form: WRITE comma separated list of writearguments where writearguments are:! carrige return, linefeed combination or specified out terminator expression - output any valid MUMPS expression *intexpr - output the ASCII character intexpr#256 READ for Network The READ command is of the form: READ comma separated list of readarguments where readarguments are:! output carrige return, linefeed combination or specified out terminator variable[#count] - input data to a maximum length of [#count] into a MUMPS variable. *variable - input one ASCII character as an integer (0 to 255) CLOSE for Network The CLOSE command is of the form: CLOSE channel Note: Closing channel 0 is ignored. Pipes The Pipes class includes named unix pipes OPEN for Pipes The OPEN command is of the form: OPEN channel:(pipe:mode)[:timeout[:namespace]] channel is the MUMPS channel number from 1 to 15 inclusive. pipe is the full pipe specification - like /home/me/mypipe. mode is one of:

NEWPIPE - open a new named pipe for reading. PIPE - open an existing named pipe for writing. timeout doesn't do anything for a pipe For example: OPEN 1:("/home/me/mypipe":"N") ;Open mypipe for reading USE for Pipes The USE command is of the form: USE channel[:parameters[:namespace]] channel is the MUMPS channel number from 1 to 15 inclusive. parameters are zero or more of the following. If more than one parameter is supplied, they must be enclosed in parenthesis () and separated with colons. TERMINATOR=$C(n,...) Specify the input terminators. All input terminators must be in the range of ASCII 0 to ACSII 31. The special case of $C(13,10) requires both characters to be in the input stream to terminate input. This is typically used for reading files created on DOS. The terminating character(s) is/are returned in the special variable $KEY. The default input terminator for this class is $C(13,10). OUTPUT=$C(n,...) Specify the output terminators to output when WRITE! is executed. This may be up to 6 (six) characters. The default output terminator for this class is $C(13,10). WRITE for Pipes The WRITE command is of the form: WRITE comma separated list of writearguments where writearguments are:! carrige return, linefeed combination or specified out terminator expression - output any valid MUMPS expression *intexpr - output the ASCII character intexpr#256 READ for Pipes The READ command is of the form: READ comma separated list of readarguments

where readarguments are:! output carrige return, linefeed combination or specified out terminator variable[#count] - input data to a maximum length of [#count] into a MUMPS variable. *variable - input one ASCII character as an integer (0 to 255) CLOSE for Pipes The CLOSE command is of the form: CLOSE channel