This document contains special considerations that apply when running Natural under VM/CMS.
The following topics are covered:
You can use the Natural system command CMS
to
issue CP
and CMS
commands; for example, CMS FLIST * DATA B
or CMS CP
SPOOL PRT *
.
If you enter CMS
without parameters, a menu
prompts you for a CP/CMS
command. To exit from the
menu enter a period (.) in the first position.
To issue CP
or CMS
commands from within a Natural program, code the following statement:
CALL 'CMS' command rc
where:
command | is either an alphanumeric variable or a constant, |
rc | is a variable
(format/length I4) which receives the return code from the
CP or CMS
command.
|
The second parameter (rc) is optional. Full command resolution is provided just as in normal CMS interactive command mode.
To read a line from the CMS program stack into a Natural variable, code the following:
CALL 'CMSREAD' line
where line is an alphanumeric variable.
The line read from the program stack is either truncated or padded with blanks to fit the length of the variable.
If the program stack is empty, CMSREAD
returns the
character string *EOD*
.
The hardcopy function of the Natural CMS Interface is enabled by specifying parameter
HCAM=CMS
either in NATPARM ASSEMBLE
, or dynamically when invoking
Natural.
The Natural terminal command %H
sends output to
your virtual printer. Specifying %HL
produces a file
called NATURAL LISTING A
.
Software AG provides fixes in the form of Zaps to remedy problems which are discovered after your Natural installation tape was shipped.
Before applying the Zaps, ensure that you have made backup copies of the files.
Use the NATZAP
facility to apply these Zaps to your
Natural text files.
After applying the Zaps, the Natural module and DCSS
must
be built anew. Use the NATBLDM
and
NATBLDS
commands respectively to do this.
For more information about NATZAP
, type HELP
NATZAP
in the Natural installation user ID.
See Natural in Batch Mode (All Environments) and Natural in Batch under CMS.
The Natural statement REQUEST
DOCUMENT
is used to connect to an http server to retrieve
HTML or XML files. The file TCPIP DATA
contains configuration information for TCP/IP client programs. This file
resides on the TCP/IP client minidisk and is typically accessed by the
command
VMLINK TCPIP
If you are planning to use REQUEST DOCUMENT
, include in a
Rexx program to invoke Natural the line:
EXEC VMLINK TCPIP
In a Rexx program, you can use the CALLNAT
function to
execute a Natural subprogram and pass parameters to it. The Rexx program must
be executed while Natural is active, for example, by a
CALL
statement in a
Natural program:
CALL 'CMS' 'EXEC MYREXX'
MYREXX
can then execute a Natural subprogram with the
CALLNAT
function:
result = callnat('MYNAT',parm1,parm2)
MYNAT
should reside in the same Natural library as the
Natural program that called the Rexx program. Upon successful execution of
MYNAT
, the Rexx variable result
will
contain the name of the called subprogram, padded with blanks to a length of 8
(that is, in this example: result='MYNAT '
). If
an error was encountered, result
will contain the
Natural error number prefixed with "NAT", for example:
NAT0082.
To exchange data between Rexx and Natural, you can use the statements
READ WORK FILE
and
WRITE WORK FILE
,
preceded by
DEFINE WORK FILE n 'STEM rexxstem.'
The work file must be declared using the parameter macro
NTWORK
or the profile parameter WORK
with
AM=CMS
. See also Print File
and Work File Support.