Marc's Place

DIBIOL/DBL - UESL Subroutines

The UESL Universal External Subroutine Library (UESL) comprises a group of subroutines
which are an integral part of the DIBOL-83 language and are generally available on all
DIBOL-83 implementations. Most of these are available as built-in-functions (see
FUNCTIONS).

ASCII (zie %CHAR)

       ASCII returns the ASCII character for a numeric character code.

               XCALL ASCII (nfield, afield)


DATE (zie %DATE)

       DATE returns the current system date in dd-mmm-yy format.

               XCALL DATE (afield)


DECML (zie %DECML)

       DECML returns the numeric character code for an ASCII character.

               XCALL DECML (afield, nfield)


DELET

       DELET removes one or more versions of a file from a directory.

               XCALL DELET ({ch,} filespec)


ERROR (zie %ERLINE, %ERROR en %SYSERR)

       ERROR returns the error number and the line number at which the last
       trappable error occurred.

               XCALL ERROR (errnum, line, syserr)

       Note - syserr is a VAX DIBOL extension which returns the number of
       the system or RMS error associated with the last trappable error.


FATAL

       FATAL specifies the action to be taken when a non-trappable error is
       detected by the run-time system. When you do not use FATAL the default
       program to be executed is set by using the logical DBL$FATAL_IMAGE.

               XCALL FATAL (action{,filespec})

         Acceptable action values are:

                 0    Return to system level on untrapped error.

                 1    Use the default user-designated program on an untrapped
                       error.  If there is no default user-designated program,
                       return to the system level.

                 2    Use the user-designated program specified by the
                       filespec on the untrapped error.  This filespec
                       designation remains in effect while the current program
                       is running.

                 3    Return, in the filespec field, the name of the default
                       user-designated program.  If none is defined, return
                       spaces.

                 Lay-out of the message sent if an untrapped error occurs:

                 ERR1,       D3
                 ERR2,       D3
                 ERLN,       D10
                 MODUL,    A31
                 PRGNM,    A31


FILEC

       FILEC creates a file.

               XCALL FILEC (file, fdl)


FLAGS

       FLAGS alters operating parameters of the run-time system.

               XCALL FLAGS (parameters{,action})

                    FLAGS Option Fields
          ------------------------------
          | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
          ------------------------------

              10    Suppress Terminator Echo
               9    Explicit Terminator not required
               8    Ignore Interrupt Sequences
               7    Suppress STOP Message
               6    Not used
               5    Suppress Character Echo
               4    RUBOUT for Video Displays
               3    File Protection
               2    Upper/Lower Case Character
               1    Data Formatting. Instead you may set the logicals SYS$DIGIT_SEP to
                     a '.' and SYS$RADIX_PT to a ','.

         Acceptable action codes for FLAGS are:

              none  all non-zero flags are enabled, all zero flags are
                       disabled.

                 0    all non-zero flags are disabled, all zero flags are
                       unchanged.

                 1    all non-zero flags are enabled, all zero flags are
                       unchanged.

                 2    current flags are returned to the first argument.


INSTR (zie %INSTR)

       INSTR searches a string of data for another string.  String 1 is the
       string to be searched, and string 2 is the string to be searched for.

               XCALL INSTR (start,string1,string2,position)


JBNO (zie %JBNO)

       JBNO returns the job number.

               XCALL JBNO (nfield)


MONEY

       MONEY specifies a currency symbol as either the dollar symbol ($) or
       some other symbol. You can also set the logical SYS$CURRENCY.

               XCALL MONEY (afield)


PAK (kan nu dmv A = B)

       PAK converts zoned decimal fields to packed decimal.

               XCALL PAK (record,size,dfield{,...})


RENAM

       RENAM changes the name of an existing file.

               XCALL RENAM ({ch,}newfile, oldfile)


RSTAT (zie %RSIZE en %RTERM)

       RSTAT returns the size and terminating character for the last record
       read by a READ or READS statement.

               XCALL RSTAT (size{,char})


RUNJB

       RUNJB starts another program without terminating the current program.

               XCALL RUNJB (filespec, terminal)


SIZE (zie %SIZE)

       SIZE returns the size of a field.

               XCALL SIZE (field,size)


TIME (zie %TIME)

       TIME returns the current system time of day in hhmmss format.

               XCALL TIME (dfield)


TNMBR (zie %TNMBR)

       TNMBR returns the number of the terminal to which the program is
       attached.

               XCALL TNMBR (nfield)

       The numeric field should be 10 digits long.


TTSTS (zie %TTSTS)

       TTSTS returns an indication of waiting terminal input.  If no
       characters are waiting, a zero is returned; otherwise the number of
       characters waiting is returned.

               XCALL TTSTS (nfield{,ch})


UNPAK (kan nu dmv B = A)

       UNPAK converts packed decimal fields to zoned decimal.

               XCALL UNPAK (record,dfield{,...})


VERSN (zie %VERSN)

       VERSN returns the DIBOL version number.  The format of the version
       string is vvvvvvvsssstmm.nnpp where:

          vvvvvvv     is the operating system.
          ssss        is the operating system subsystem.
          t           is the release status.
          mm          is the major version number.
          nn          is the minor version number.
          pp          is the patch level.

               XCALL VERSN (afield)


WAIT (zie %WAIT) (zie ook (S)SEND en (S)RECV))

       WAIT suspends program execution pending the occurrence of an event.

               XCALL WAIT ({seconds},parameters{,event})


          WAIT Option Fields
          ------------
          | 4 | 3 | 2 | 1 |
          ------------

               1    Wait for specified time to expire.
               2    Wait for terminal input at any one of the terminals
                     opened by the program.
               3    Wait for a terminator to be typed at any one of the
                     terminals opened by the program.
               4    Wait for a message.
© 1997- Marc Vos (and others)   -   Privacy Statement   -    Contact Me

On this website, Google Analytics is used to track visitor statistics. These are anonymised data about the number of visitors, which pages they visit on this site, from which regions they visit, which web browsers they use, etc.. You will also see non-personalised ads via Google AdSense. Cookies from Paddle or Paypal are placed when you click on a 'Buy now!' or 'Donate!' button, and possible cookies from Disqus when you use that system to comment on one or more blogposts.
Privacy Statement