Version 4.5.2
 —  Commands  —

SET

Description

Assign a value to a local variable, global variable or system variable. You cannot assign a value to a dynamic variable.

The values assigned with SET are only valid for the current Entire Connection session.

Using the command line or terminal emulation keys, you can only assign values to global variables and system variables.

Syntax

SET variable {string|variable}...

Examples

Procedure File Example

Findfile.ncp

Variables Returned

None

Rules for SET PCFILE

The file extension defined with SET PCFILE indicates the type of dynamic format conversion that is to be used.

Format Extension
ASCII Any other extension not included in this table (e.g. *.ncd, *.ncs, *.ncm, *.ncr etc.)
Basic *.prn
Binary Any binary file with any extension. The transfer format for Natural is one record with a single binary field.
COBOL *.ncc
dBase III *.dbf
Data Interchange Format *.dif
Encryption *.enc
Excel *.xls or *.xlsx (depending on the Excel version)
HTML *.htm or *.html. This is a specific HTML format that can also be opened with Excel.
Lotus *.wks, *.wk1, *.wkl
Multiplan *.mpn
XML *.xml

System-Generated File Names (Download only)

A file name is automatically generated, if you specify ~~RANDOM instead of a file name in the SET PCFILE statement. The file name is then generated as follows:

ddhhmmss.xxx 

dd is the current day of the month as determined by the system date.

hhmmss is the current time as determined by the system time.

xxx is one of the following file extensions:

Related Commands

DECR, INCR, RESET, SHIFT

Usage

Procedure File: Yes
Command Line: Yes - depends on the type of variable. There are restrictions for system variables concerning whether and where the SET command can be used.
Key: Yes
API: Yes

Top of page