Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Update May 2015; see History

FORCE <target> <text>

FORCE allows you to force keystrokes into another job’s input stream. <target> may be "all" or a jobname or a user name. <text> is any string of characters.

To force control characters, precede them with ^. For example:

FORCE TSKAAA RUN PROG^M

In the Unix environment, FORCE uses the SIGUSR1 signal, which can only be delivered between processes belonging to the same effective user or if the sender is the superuser. Refer to File Ownership and Privileges for further details on dealing with the Unix privilege issues. In the Windows environment, FORCE uses the IJC (Inter Job Communication) system, which has no privilege issues, but is subject to being turned off by the IJCFREQ command in miame.ini. Note that the ^M refered to above is composed with the literal characters ^ and M.

FORCE.LIT supports the AMOS-style multi-line syntax:, i.e.

.FORCE TSKAAB

LOG BAS:

RUN MYPROG

15

~

TIME

 

The above would force TSKAAB to execute "LOG BAS:", then "RUN MYPROG", then "15", and finally a blank line (Tilde by itself is treated as a blank line.) The blank line terminates the force operation. (The TIME command would then be executed back in the current job.)

Note that under A-Shell/Windows, the response time for receiving forced commands may be several seconds. To avoid overrunning the target job, the sender will be forced to wait for each command to be acknowledged by the receiver.

It also supports forcing commands to yourself. This is useful for forcing input to a program that does not normally accept input from a command file. It is usually used with the $NJ system variable in DO files to specify the current jobname, e.g.:

;MYPROG.DO

:R

LOG BAS:

FORCE $NJ

RUN MYPROG

15

~

TIME

 

Note that the TIME command here will execute before the forced commands, since CMD and DO input is processed first, then type ahead. Also note that there isn't much point in this exercise unless MYPROG (in this case) doesn't accept command file input. Otherwise we could just omit the FORCE command and MYPROG would run the same from the DO file as it would with the forced input.

A-Shell still supports the non-AMOS standard single-line FORCE, in which the command is passed on the command line, e.g.:

.FORCE TSKAAB LOG SYS:^M

Note that in this mode, you have to explicitly add a ^M to the end of the line to force a carriage return.

Finally, note that the LITMSG.xxx message files have been updated for some new messages in FORCE.

History

2015 May, A-Shell 6.1.1408:  Updated routine to recognize and preserve a new unique identifer field in the JOBTBL. The new version is backward compatible with earlier versions of A-Shell and has a "B" in the version number to help easily identify it.