# 9. Program SCIENTRY

## 9.1 Purpose

Program SCIENTRY allows entry of information into data files. It extracts one record at a time from a data file, presents it via a screen display, and permits editing. When the record is written back, the revised record replaces the original in the data file.

## 9.2 Execution

Using the ENTRY batch file:
```
>>? AC ENTRY [display fnprefix] [data fnprefix]
```

Or manually:
```
>>? RUN SCIENTRY
? NUL NUL
? [fnprefix.DI] [fnprefix.DA] [STOP.PR]
```

The program prompts for:
1. **Print file name** -- destination for Chaprola PRINT command output
2. **Debug file name** -- destination for DEBUG listings
3. **Display file name** (.DI) -- screen layout
4. **Data file name** (.DA) -- data records
5. **Procedure file name** (.PR) -- compiled Chaprola program (use STOP.PR or NUL if none)

## 9.3 Function Keys

### Primary Function Keys

| Key | Action |
|-----|--------|
| F1 | **ADVANCE** -- Move to next record without saving changes |
| F2 | **BACKUP** -- Move to previous record without saving changes |
| F3 | **DISPLAY** -- Restore screen display (useful if display disappears) |
| F4 | **END** -- Position to end of data file (blank record after last) |
| F5 | **SAVE** -- Write record to file and advance to next record (= F9 + F1) |
| F6 `[#]` Enter | **CHANGE CURSOR** -- Position cursor at field number # |
| F7 `[#]` Enter | **GO TO RECORD** -- Position to record number # |
| F8 | **BLANK SCREEN** -- Return to SCIENTRY menu for different files |
| F9 | **WRITE** -- Write record to file without advancing |
| F10 | **EXECUTE** -- Read screen, execute resident Chaprola procedure (.PR) |

### Shift + Function Keys

| Key | Action |
|-----|--------|
| Shift-F1 `[fn.PR]` Enter | Change procedure file and execute |
| Shift-F2 | EXIT to SCIOS `>>?` prompt |
| Shift-F5 | Cursor right one character within field |
| Shift-F6 | Cursor left one character within field |
| Shift-F8 | Erase from cursor to end of field |
| Shift-F9 | Back tab one field |
| Shift-F10 | Forward tab one field |

### Ctrl + Function Keys

| Key | Action |
|-----|--------|
| Ctrl-D | EXIT to SCIOS `>>?` prompt |
| Ctrl-F2 | Buffer ON/OFF toggle |
| Ctrl-F3 | Scroll screen up (line by line) |
| Ctrl-F4 | Scroll screen down (line by line) |
| Ctrl-F5 | Forward tab one field |
| Ctrl-F6 | Back tab one field |
| Ctrl-F7 | Return cursor to HOME (field 1) |
| Ctrl-O | Return keyboard from graphics/greek to normal |
| Ctrl-P F5 | Blank entire record |

### Alt + Function Keys

| Key | Action |
|-----|--------|
| Alt-F3 | Page Up (for looking) |
| Alt-F4 | Page Down (for looking) |
| Alt-F7 | Return cursor to previous position (before Ctrl-F7) |

### Alt + Number Keys

| Key | Action |
|-----|--------|
| Alt-1 | Change visual attribute of background |
| Alt-2 | Change visual attribute of status line |
| Alt-3 | Change visual attribute of alphanumeric field |
| Alt-4 | Change visual attribute of numeric field |
| Alt-5 | Change visual attribute of chosen field |
| Alt-6 | Status line ON/OFF |
| Alt-7 | Back tab 10 fields |
| Alt-8 | Forward tab 10 fields |
| Alt-9 | Wrap around OFF/ON toggle |

### Visual Attributes (Alt-1 through Alt-5)

Each press cycles through: highlighted, reverse video, blinking, blinking-highlighted, blanked, and default.

## 9.4 Status Line

The status line appears on line 25 (bottom of screen):

```
+----------------------------------------------------------------------+
| A    B    C    D  E F  G          H*                  I*             |
+----------------------------------------------------------------------+
```

| Position | Description |
|----------|-------------|
| A | Horizontal character position of cursor |
| B | Line number on screen |
| C | Same as B |
| D | Field number where cursor is located |
| E | `B` = Buffer is ON (use Ctrl-F2 to toggle) |
| F | `E` = Program SCIENTRY is active |
| G | Status: `H` = Hold (busy), `L` = Lock (double-space), `P` = Print mode, `R` = Reading from screen, `W` = Writing to disk |
| H | Record number displayed on screen |
| I | Name of data file being accessed |

*Error messages and function key messages appear in positions H and I.

## 9.5 Limitations

| Resource | Limit |
|----------|-------|
| Maximum lines in text file | 192 |
| Screen lines | 24 (line 25 = status line) |
| Maximum fields per text file | 2,047 |
| Maximum visible fields | 450 |
| Maximum record length | 4,095 characters |

---

*Previous: [Display Files](08-display-files.md) | Next: [SCIEDIT](10-sciedit.md)*
