Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Events and Logic > SYSTEM-CRT

 

 

Purpose

SYSTEM-CRT passes a command to the operating system and provides for screen refreshing.
 

Syntax

RC = SYSTEM-CRT(statement)
 

Operation

RC is the scratch variable containing a return code indicating the status, success or failure, of the call itself  (and not the success or failure of any program called). 
statement
 
is the statement to be passed to the Operating System, or a variable containing the statement.  Literal values must be enclosed in single or double quotes.
 

Remarks

The value of the return code depends upon the operating system; usually a return code of 0 (zero) indicates success.

This command is typically used to call an externally defined program.  When the external program has finished, control can be returned to PROIV.


SYSTEM-CRT performs the following actions:

Flushes any pending PROIV screen output.
Resets terminal connection characteristics to those in effect before PROIV was invoked.
Executes the external command.  
Resets terminal connection characteristics to those required by PROIV.
Schedules the screen to be redrawn prior to the next PROIV input field.


The resetting of terminal connection characteristics may cause input that the user has already typed, but which has not yet been accepted, to be lost.  

The screen is not cleared. This must be done by the external routine if required.

Output from the external routine is not under PROIV's control and so PROIV features such as report-to-screen paging cannot be applied to it.
 

Example 1

#RC = SYSTEM-CRT("prog1")   This command calls program prog1.
 

Example 2

#ST = SYSTEM-CRT("cp filea fileb")   This command copies the contents of filea to fileb.
 

Comment on this topic

Topic ID: 520125

Table of Contents

Index

Glossary

-Search-

Back