# Directives

START | Restart Session

## Formats

1. Restart Session: | START [max_mem[,prog_name$]][,ERR=stmtref]
2. Launch Separate Task: | START prog_name$,term_id[,ERR=stmtref]

Where:

max_mem | Number of 1024-byte units of memory you want to limit PxPlus to using.
prog_name$ | Character string defining the initial program to be loaded and run. String expression (maximum 256 characters).
term_id | Terminal ID in FID(0) format for the new session. Numeric expression.
stmtref | Program line number or statement label to which to transfer control.

## Description

Use the START directive to re-initialize the current session or to launch a completely new session. START can be used to specify the maximum amount of memory to be allocated to the user and optionally the program to LOAD and RUN. If you omit the memory size, PxPlus uses the current memory limits.

## Format 1

Restart Session

START [max_mem[,prog_name$]][,ERR=stmtref]

This format completely re-initializes the current session by closing all files, clearing all user data (including Global variables), and clearing the current program. All memory currently allocated to the session is released to the system, and a new limit is defined.

Examples:

> start 10 ! Re-initializes with 10KB
> start 20,"INVGEN" ! Runs program INVGEN with 20KB
> start ! Re-initializes with same memory size

To simplify conversion processes, you can set the 'QS' parameter to On so that a statement like START nnn,"this_prog" only clears local variables (the same as a BEGIN) and starts the specified program. The recommendation is to use BEGIN ;RUN "this_prog" to start a new program set. Use STARTto completely restart the session.

#### Note:
In PxPlus, the memory size might be different from other Business Basics due to the nature of memory management for variables, arrays, program sizes, etc. You can set the 'IZ' system parameter to have PxPlus ignore any memory size restrictions.

## Format 2

Launch Separate Task

START prog_name$,term_id[,ERR=stmtref]]

You can launch a new session, separate from the task issuing the START command. The contents of term_id (terminal identifier) will be assigned to the FID(0) value of the new session.

#### Note:
When running using WindX and a client-server style connection (*ntslave, *plus/cs/client, or Application server), a START command will result in your session being disconnected.