17 1 Using X_START as a Front End to X_RUN

LANSA Technical

17.1 Using X_START as a Front End to X_RUN

The X_START facility is shipped with all Visual LANSA systems.

Using X_RUN.EXE to invoke Visual LANSA facilities directly from an icon on your desktop often means that you may end up with many individual icons and when a command parameter needs to be changed it needs to be changed many times.

This problem can be overcome by using the X_START utility. For example, imagine you had the following X_RUN command associated with an icon on your desktop:

X_RUN PROC=TEST01 PART=DEM USER=QPGMR

then by altering format of the X_RUN command behind the icon to:

X_START X_RUN PROC=[TEST01/Process Name/PROCESS]

PART=[DEM/Partition Identifier /PARTITION] 

USER=QPGMR .... etc ...........

you can:

  • cause the values of PROC= and PART= to be prompted.
  • cause the default values of PROC= and PART= to be remembered and for their "last used" values to be exchanged between the X_START commands behind different icons.

The way that X_START works is very simple. It processes the entire command line looking for [ / / ] or { / / } formatted prompt requests.

A [ / / ] or { / / } formatted prompt request must always be formatted exactly like this:

 [default value / description / symbolic name]

or this:

 {default value / description / symbolic name}

Generally you should use the [ / / ] notation in Windows environments.

For example, this is the command invoked when you select Execute Process on a Workstation from the LANSA menu:

%tit%Execute process on workstation

%hlp%x_start.009

%basepath%\x_lansa\execute\X_RUN.exe

PROC=[Name/Process/PROC]

LANG=[ENG/Language/LANG]

PART=[DEM/Partition Identifier/PART]

USER=[QPGMR/LANSA User/USER]

%WIN%DBUS=[DBA/Database User/DBUS]

%WIN%PSWD=[*password/Database Password/PSWD]

DBII=[LX_LANSA/Database Name/DBII%reg%LX_DBName]

%W95%DBUT=[SQLANYWHERE/Database Type/DBUT%reg%LX_DBType]

%WNT%DBUT=[MSSQLS/Database Type/DBUT%reg%LX_DBType]

%W95%CMTH=[E/Communication Method/CMTH]

%WNT%CMTH=[C/Communication Method/CMTH]

%W95%CDLL=[E32APPC.DLL/Communications DLL to Use/CDLL%reg%LX_CommsDLLName]

%WNT%CDLL=[WCPIC32.DLL/Communications DLL to Use/CDLL%reg%LX_CommsDLLName]

PRTR=[LPT1/Default Printer/PRTR]

This function causes the Execute process on workstation dialog box to appear.

The values entered are then substituted into the command. If XXXXXX was keyed as the process name and SYS as the partition identifier, then the command that is assembled for execution would be:

 X_RUN PROC=XXXXXX PART=SYS USER=QPGMR .... etc .......

Additionally, the value XXXXXX would be remembered with the symbolic name PROCESS and the value SYS would be remembered with the symbolic name PARTITION. This means that the next time the X_START facility is invoked and a [//] or {//} prompt has the symbolic name PROCESS then the remembered value XXXXXX will be used in preference to any default value specified in the [//] or {//} prompt.

The symbolic names and their values are remembered in a simple text file named X_START.SAV that is created and updated into the current directory of the process executing the X_START request. If you suddenly lose your last set of values (i.e. they revert to their defaults), then the most likely reason is that you have altered the current directory of your application such, that the X_START.SAV can no longer be found.

The data stored in file X_START.SAV is logically formatted as <symbolic name><value><symbolic name><value> and up to 1024 symbolic names may be in use at any time. Neither the symbolic name nor its value should ever be more than 256 characters in length.

Also see

17.1.1 Rules, Limitations and Guidelines

17.1.2 Commands and Special Variables