PARAGRAPHS

Man Page Index


Paragraphs can only be invoked automatically via the jshell, jsh, when executing in jsh mode. The jshell, in jsh mode, will attempt to read the first parameter of an entered command from the MD/VOC file as previously specified by the JEDIFILENAME_MD environment variable. If the record is determined to be a paragraph record then the paragraph interpreter, para, is invoked. A logon paragraph record can also be invoked by the jshell via the dash option, alternatively the paragraph record can be invoked from the command line using the paragraph interpreter.

e.g. para ./VOC/PARAGRAPHX

Format
The first line of a paragraph record begins with PA e.g.
PARAGRAPHX
001 PA

This line can then be followed by any of the following :
Comment
Any Line preceded by an asterisk. e.g:
* THIS IS A COMMENT LINE
Label
Any non spaced text suffixed by a colon. e.g:
Label:

 

Paragraph Prompt
A paragraph prompt to obtain values, e.g:
<<I2,Second,1N>>

Load parameter two from the command line into PromptId Second. If parameter two on the command line is null then prompt for value for Second ensure validates to 1 numeric. The paragraph prompt is formatted as follows:

<<{Code,}PromptId{,Mask}>>

Code

A Always Prompt.
Cn Use parameter n from command line. If value does not exist then null is used.
In Use parameter n from command line. If value does not exist then prompt.
Sn Use parameter n from original command line. If value does not exist then prompt.
P Use input for all PromptIds of the same name. This is the default action.
R{s}Prompt use s as separator, until null input. Default separator is space.
F(File, RecordId {,Attr {,Value {,Subvalue}}}) Input from record RecordId, in file File.
@(c,r) Prompt at column c, row r.
@(BELL) Sound BELL at prompt.
@(CLR) Clear screen before prompt.
@(TOF) Prompt at top left of screen.

PromptId   Identifier used to name prompt values.

Mask  Validate Input
Pattern Match
e.g. 0N - Match any numerics
7X - Match seven printable characters.
3A - Match three alpha characters.
text - Match text
(Conversion)
e.g. (D2/) - Match date dd/mm/yy or mm/dd/yy.

~~Mask means input should NOT match mask.

Note: A Paragraph prompt not mixed with a command line or paragraph statement will attempt to execute the resultant value.

 

Paragraph Statement

One of the following syntax statements.

DISPLAY text Output text
DATA Input Stacked input
GO Label Continue at Label
LOOP Start Loop
REPEAT Repeat Loop
CLEARPROMPTS Clear Prompt Identifier Values

IF Expression THEN Statement

where:
Expression - Includes PromptId, operators and/or @variables

@DATE Current internal date
@TIME Current internal time
@DAY Current two digit day of month
@MONTH Current two digit month of year
@YEAR Current two digit year
@LOGNAME Environment PLID value SYSTEM(49)
@USERNO Current port number SYSTEM(18)
@WHO Current user name SYSTEM(19)
@ABORT.CODE Last error code SYSTEM(17)
@SYSTEM.RETURN.CODE Last error code SYSTEM(17)
@USER.RETURN.CODE TBD

Operators include MATCHES, EQ, LE, LT, etc.

Command
Any executable command with or without paragraph prompts. e.g:

SSELECT<<I2,FILEX,10X>>

or

SELECT FILEX

Examples

PARAGRAPHX
001 PA
002 IF <<C3,THIRD>> EQ THEN GO CHK.SECOND
003 DISPLAY GOT 3 ARGUMENTS
004 GO END
004 CHK.SECOND:
005 IF <<C2,SECOND>> EQ THEN GO END
006 DISPLAY GOT 2 ARGUMENTS
007 END:

PARAGRAPHX
001 PA
002 * This is an example paragraph
003 IF<<C2,COMMAND>> NE THEN GO DO.CMD
004 DISPLAY ENTER
005 CLEARPROMPTS
006 DO.CMD:
007 DISPLAY ENTER


JCL