Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Editing source programs

&pagelevel(3)&pagelevel

Storage methods for source programs and header files

The C/C++ compiler processes source programs and header files which are stored asfollows:

Source programs stored as

  • cataloged SAM and ISAM files (with KEYPOS=5 and KEYLEN <= 16)

  • PLAM library elements of type S

  • POSIX source files

Header files stored as

  • cataloged files if the source program is itself a cataloged file

  • PLAM library elements of type S

  • POSIX source files

The file editor EDT

The file editor EDT is available in BS2000 for editing a C/C++ source program. EDT can process cataloged SAM/ISAM files, PLAM library elements and POSIX files.

EDT converts lowercase letters to uppercase letters by default. Since source program texts in C/C++ usually contain a large number of lowercase letters, automatic conversion to uppercase must be prevented by issuing the command LOWER ON after EDT is called.

The following table provides an overview of the most important EDT statements for processing files and library elements.
The file editor EDT is described in detail in the manual “EDT (BS2000/OSD)” [15].

SAM files

@READ‘file‘

Read contents of a SAM file into the current work file.

@WRITE‘file‘

Write contents of the current work file to a SAM file

ISAM files

@GET‘file‘

Read contents of an ISAM file into the current work file

@SAVE‘file‘

Write contents of the current work file to an ISAM file

@OPEN‘file‘

Physically open ISAM file

@CLOSE

Close an ISAM file opened with @OPEN

PLAM library elements

@OPEN LIB=lib(ELEM=elem)

Open library element in the current work files

@COPY LIB=lib(ELEM=elem)

Read contents of a library element into the current work file

@WRITE LIB=lib(ELEM=elem)

Write contents of the current work file to a library element

@CLOSE

Close a library element opened with @OPEN

POSIX files

@XOPEN FILE=pathname,MODE=
ANY/UPDATE/NEW/REPLACE

Open and read an existing POSIX file or create a new POSIX
file

@CLOSE

Close a POSIX file opened with @XOPEN

@XCOPY FILE=pathname

Read contents of a POSIX file into the current work file

@XWRITE FILE=pathname,MODE=
ANY/UPDATE/NEW/REPLACE

Write contents of a current work file to a POSIX file

EDT statements for processing files and library elements (extract)

By default, PLAM library elements are stored by EDT as elements of type S with the highest version number (X’FF’).

Key assignments

In order to program in C and C++, the user requires a number of special characters, some of which may not be available on all keyboards. For example, keyboards with the German character set have “umlauts” assigned instead of some characters specifically required for C and C++.
The following table lists the different key assignments and their (international) hexadecimal codes. This information can be used to create a user-specific keyboard configuration if required.

Identifier / Functions in C and
C++

“English”
keyboard

“German”
keyboard

Hexadecimal
code

left angle bracket

<

<

4C

right angle bracket

>

>

6E

logical OR

|

ö

4F

logical exclusive OR

^

^

6A

underscore

_

_

6D

left square bracket

[

Ä

BB

right square bracket

]

Ü

BD

backslash

\

Ö

BC

left brace

{

ä

FB

right brace

}

ü

FD

bit complement

~

ß

FF