The following variables are all used within the standard input and validation routine for a specified input field. These parameters also occur in the input routines for multi-valued fields. However, extra parameters are required by the multi-valued routines and these are detailed later.

A set of input parameters are setup prior to the call to routine 100. This routine will make a call to the PARADYME input routine, PD.INPUT. This routine will handle the input and display of the value from the screen together with all input and output conversions.

The process routines have been assigned pre-defined routine numbers. Each single value input or multi-valued window driver is assigned a thousand value. That is, the first routine is 1000, the second is 2000, the third is 3000, etc. Within a multi-valued window, the routines take the thousand number. This is then sub-divided at the ten level. For instance, the first routine within the routine 5000 would be 5010, the second would be 5020 and so on. This makes it very easy to locate within the code the routine that deals with the input to a particular attribute.

The input variables are now detailed below:-

 CONVERSION$

This is the variable that holds the conversion string to be used in ICONV and OCONV functions or by PARADYME for input validation and conversion. If this variable is null then no conversions will be applied.

 CURSOR.INDEX$

This variable holds the index of the set of screen parameters that will be used by PARADYME to input and display the current field. For multi-valued windows, the value of the current position in the window being processed will be assigned at the top of the routine by a lengthy expression. Should the user wish to use this value, CURSOR.INDEX$ should be used, not the assigning expression.

 JUSTIFICATION$

This variable indicates to the input routine whether to print the field left or right justified. It will contain either 'L' for left or 'R' for right.

 MANDATORY$

This variable indicates to the input routine whether the input to the field is mandatory or optional. It will be assigned to either TRUE$ (If it is a mandatory input) or FALSE$ (If it is an optional input).

 VALUE$

The value that is currently being processed from the main update record is held in a temporary buffer variable called VALUE$. It is loaded into this variable at the start of the routine. The new value is input and assigned to this variable. This variable is then validated and finally, if everything is O.K., the field in the main record is assigned to the contents of this variable.

As can be seen, this variable has a crucial part to play in a PARADYME program. By modifying this variable at appropriate stages, one can modify the value that is saved in the main update record.

The other point to notice is that when creating extra validation, this is the variable against which the tests should take place. For instance:-


			VALUE$ GE 100 AND VALUE$ LE 200
		 

Would be the validation to check that the value entered is between 100 and 200.

 FUNCTION$

This is the variable that holds the value of the function key hit by the user, if one was hit. It basically complements VALUE$ in that it holds the other values entered by the user. If FUNCTION$ is null then no function key was entered. If not null then a function key was entered and appropriate action should be taken. If the user was to implement a HELP key through extra validation then the test would be:-


			FUNCTION$ = HELP$ ; CALL HELP.ROUTINE
		 

Care should be taken when processing VALUE$ that this does not take place when a function key has been entered. This is either done by placing processing after dealing with FUNCTION$ or by enclosing the processing in an IF statement such as:-


			IF FUNCTION$ = NULL$ THEN 
				Processing ..... 
			END 
		

 VALID.INPUT$

This acts as a flag within the input validation routine to indicate that a valid input has been received whether it be into VALUE$ or into FUNCTION$. Once processing exits the routine, it passes to the driver routine which then, depending on the value of FUNCTION$, will determine which is the next input validation routine that needs to be called.

 Multi-valued Window Variables

The following variables are only found local to multi-valued window input validation and driver routines. They can be used or modified by the user to effect changes in the way the program runs. These variables are as follows:-

 WINDOW.LENGTH$

This variable gives the value for the number of lines displayed at any one time on the screen for the window being processed.

 END.OF.WINDOW$

This is the flag that indicates to the multi-valued window driver routine that processing of the current window has terminated and control should now return to the main driver routine.

 VMC.PROMPT.NO$

This indicates to the system which of the set of input routines is to be processed next. By modifying this value it is possible to skip backwards or forwards, one or more fields. It is the control variable for the ON ... GOSUB ... , ... , Statement.

 VMC$

This variable indicates which line of the window is currently being processed or rather, which set of values within a set of associated attributes is being processed currently. By modifying this value the user can force the system up or down the window.

 BKFUNC$

This is a temporary flag set up by PARADYME to indicate to the system if the user has hit one of the function keys that would result in control going back up the window. It is solely used to determine whether to display the previous or next page of the window.

 LINE.FUNCTION$

This is another flag set up by PARADYME. It is set to true if the user has entered either PBACK$ , PFWD$ , DROP$ or CLIMB$ as a function. Testing this flag, PARADYME will determine whether or not to skip all input routines subsequent to the first routine thereby effectively dropping down a line.

This method is adopted for process control rather than modifying VMC$ and VMC.PROMPT.NO$ as it also checks that there is a value for intervening mandatory inputs, stopping at any mandatory input for which no value has been entered.

 REDISPLAY$

This variable is used in multi-mode programs. It is set up in routine 500 and is used to communicate back to the calling driver whether the appropriate display routine should be called as the user has moved to a different page of the window. It is set to TRUE$ if the print routine is to be called. This variable is used in conjunction with REDISPLAY.VMC$ described below.

 REDISPLAY.VMC$

As mentioned above, this variable is setup in routine 500. It is used in the calling routine to set the value of VMC.DISPLAY.4n0$ (described above) should the print routine be called, which in turn is dependant on REDISPLAY$ being set to TRUE$. In such a case REDISPLAY.VMC$ contains the value index of the first value to be printed in the line.

 DUPLICATE$

This is a flag that is incorporated into the code if the user requires a duplicate check on a multi-valued field. The system searches the attribute for a duplicate of the value entered for the present multi-value in the other multi-values of the attribute. If it finds a match then DUPLICATE$ is set to TRUE$.