R S X L I B & T R A M P ====================================== Software Reference Manual Version V1.0 November 1983 This document describes how to use the RSX11M user libraries RSXLIB and TRAMP. It provides the information required to use the routines and to create the libraries. Contents CHAPTER 1 Introduction to RSXLIB and TRAMP 1.1 Overview . . . . . . . . . . . . . . . . . . . . . 1-1 CHAPTER 2 Library description 2.1 RSXLIB . . . . . . . . . . . . . . . . . . . . . . 2-1 2.1.1 Name Conventions . . . . . . . . . . . . . . . . 2-1 2.1.2 Creating the library . . . . . . . . . . . . . . 2-2 2.2 TRAMP . . . . . . . . . . . . . . . . . . . . . . 2-6 2.2.1 Name Conventions . . . . . . . . . . . . . . . . 2-6 2.2.2 Creating the library . . . . . . . . . . . . . . 2-6 CHAPTER 1 Introduction to RSXLIB and TRAMP 1.1 Overview RSXLIB and TRAMP (Terminal form, Report generator and Menu processing package) are sets of user callable routines. RSXLIB contains general purpose routines, TRAMP contains three packages for program development. The three packages are TFR (Terminal Form Routines), RGR (Report Generator Routines) and MPR (Menu Processing Routines). All routines are written in FORTRAN IV for RSX11M. Only those routines which could not be written in FORTRAN are written in MACRO. Both packages make use of the standard RSX11M SYSLIB and F4POTS libraries. The full documentation about TFR, MPR and RGR can be found in the Software Reference Manuals of all three packages. These manuals are originally written for use with the RT11 operating system, so that there can be some differences when used with the RSX11M operating system. The documentation about the SYSLIB library can be found in the RSX11M System Library Routines Reference Manual. The documentation about the F4POTS library can be found in the FORTRAN IV PLUS Object time system reference manual. NOTE This document gives only brief informaton about the routines of RSXLIB. More detailed information can be found in the headers of the sources of the routines. CHAPTER 2 Library description 2.1 RSXLIB Table 1 lists the RSXLIB subroutine alphabetically within categories with a brief description of each subroutine. The type of the routines can be: S =subroutine IF=integer function JF=integer*4 function RF=real function DF=double precision real function LF=logical function. Besides the routines listed in table 1 there are three additional routines which are not user callable (ERRMSG, SWRITS and TRACE). 2.1.1 Name Conventions All conversion routines are named "outCVTin", with for out and in the following codes: S =string R =real D =double precision real I =integer J =integer*4 The first character of all function routines gives the type of the function: I=integer J=integer*4 R=real D=double precision real L=logical Library description page 2-2 2.1.2 Creating the library To create the library run the indirect command file RSXLIB.CMD: @RSXLIB You have to insert the object files into the library by hand: RUN $LBR LBR>RSXLIB/CR=filename,filename,......,filename LBR>RSXLIB=filename,.......,filename etc. LBR>^Z Library description page 2-3 Table 1: Summary of RSXLIB Subroutines name type arguments description ------ ----- ------------------------------------- Input Output Operations: IASK IF PROMPT,IMIN,IMAX,IDEFLT,DEFPIC,SGLCHR,IRETCH Ask a integer number from terminal IGTCHR IF Get a character from the terminal buffer IGTKEY IF Get a key strike from the terminal buffer (VT100) JASK JF PROMPT,JMIN,JMAX,JDEFLT,DEFPIC,SGLCHR,IRETCH Ask a integer number from terminal KEYPAD S ONOFF Set auxilary keypad of VT100 terminal on or off LJNASK LF PROMPT,DEFLT,SGLCHR,IRETCH Ask a Ja/Nee answer from terminal LYNASK LF PROMPT,DEFLT,SGLCHR,IRETCH Ask a Yes/No answer from terminal RASK RF PROMPT,RMIN,RMAX,DEFLT,DEFPIC,SGLCHR,IRETCH Ask a real number in any format from terminal RSWRIT S IUNIT,CC,NR,STRING Repeated string write SASK S PROMPT,RESULT,MIN,MAX,DEFLT,SGLCHR,IRETCH Ask a character string from terminal SWRITE S IUNIT,CC,STR1,...,STRn Write the strings concatenated TTBCLR S Clear the terminal buffer (only for compatibility with RT11) Conversion Operations: ICVTS IF STRING,IPOS,IRET Read an integer number from a string Library description page 2-4 JCVTS JF STRING,IPOS,IRET Read an integer*4 number from a string RCVTDA RF DATE,IPOS,IRET Convert a string with a date to number of days past start of century RCVTS RF STRING,IPOS,IRET Read a real number from a string RCVTTI RF TIME,IPOS,IRET Convert a string with a time to number of seconds past midnight SCVTD S VALUE,PICTUR,STRING Convert a double precision real number to a string SCVTI S IVALUE,PICTUR,STRING Convert an integer number to a string SCVTJ S JVALUE,PICTUR,STRING Convert an integer*4 number to a string SCVTLU S TEXT Convert all lower case characters to upper case SCVTR S VALUE,PICTUR,STRING Convert a real number to a string SCVTTI S RTIME,STIME,IRET Convert a real (=time in seconds past midnight) to a string with notation hh:mm:ss.tt SCVTUL S TEXT Convert all upper case characters to lower case Miscellaneous Services: CLEAR S Clears screen and puts pointer in upper left corner CONCAT S LSTR,RSTR,OUTSTR Concatenate two strings into the output string when given, or else into the first string given DCLCMD S CML,MOD Issue a DCL-command from a FORTRAN-program,and wait for completion if asked for FATAL S SUBR,ERRTXT Force a non-FORTRAN fatal error Library description page 2-5 GETSTR S LUN,AREA,MAXLEN,ERR Read a string from a specified logical unit into a specified array GSUBS S SRCSTR,IPOS,SEPCH,RESSTR,LSTR,IEOS Get a substring to the separating character from the source string GTLIN S STRING Read a string from LUN 5 HEADER S CSTR,RSTR,OUTSTR Build a standard AKZO Pharma header string in the output string INDEX IF INSTR,PATTRN,ISTART Return the character position of the first occurrence of the pattern within the string ISCOMP IF STR1,STR2 Compare two character strings and return integer result LARG LF NRARG Check the existence of the given argument LCHKI LF STRING,IRTVAL Check the string for a correct integer number LCHKJ LF STRING,JRTVAL Check the string for a correct integer*4 number LCHKR LF STRING,RETVAL Check the string for a correct real number LEN IF STRING Return the length of the given string, ending with a null-byte MCRCMD S CML,MOD Issue a MCR-command from a FORTRAN-program,and wait for completion if asked for PUTSTR S LUN,AREA,CC,ERR Write a given string to a specified logical unit REPEAT S INSTR,OUTSTR,IRPT,ILEN Concatenate a specified string with itself to produce the indicated number of copies and place the result in the outputstring SBUILD S OUTSTR,LEN,STRING1,...,STRINGn Concatinate string 1 to n to the output string Library description page 2-6 SCOPY S INSTR,OUTSTR,NRCHAR Copy a characterstring from one array to another STRPAD S PADSTR,ILEN Pad a characterstring with rightmost blanks until that string is a specified length TRIM S STRING Shorten a given string by removing all trailing tabs and blanks 2.2 TRAMP All information about the use of the package and the compilers can be found in the reference manuals. Some information, however, is dependent on the operating system with which will be worked. The reference manuals are written for the RT11 operating system, so that there might be slight differences. 2.2.1 Name Conventions All routine names start with a three character code TFR, MEN or RGR folowed by three characters if the routine is user callable and two characters if the routine in not user callable. 2.2.2 Creating the library To create the library and compilers run the indirect command file TRAMP.CMD: @TRAMP