Tutorial / Guide on display information on a workstation (Green Screen)

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
sotis
Posts: 16
Joined: Thu Sep 16, 2021 11:37 pm

Tutorial / Guide on display information on a workstation (Green Screen)

Post by sotis »

Hello everyone,

I am looking for a beginner friendly Tutorial / Guide (if any) that describes with examples the relevant LANSA commands that can be used to
Display/ Request / user input, etc information on a workstation, in other words any resource that shows how to create a program that displays - receives information to and from the user on a workstation preferably with examples.

all the best,
Sotiris
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: Tutorial / Guide on display information on a workstation (Green Screen)

Post by Dino »

Hi Sotiris,

Are you going to create them using Visual LANSA or are you working directly in a green screen with an old green screen development license?
What version of LANSA are you currently using?

You can create them in Visual LANSA, and in the past you were able to create them also directly in the green screen.

They are called Process (like menus) and Functions (the actual options/programs), they have to be rdml (uncheck "Enabled for rdmlx" when creating the functions if you want to be able to display a green screen), the functions belong to a process,
functions.jpg
functions.jpg (18.18 KiB) Viewed 5273 times
they have limitations in the data types that can be used while coding in RDML (Alpha, Signed, Decimal or Packed only), and uses a few other old commands like DISPLAY, REQUEST, POP_UP (same as DISPLAY just as a window), SET_MODE, IF_KEY, etc. the tables you can use need to be also "rdml" tables, meaning, using only the data types indicated before and when created in the repository unchecked the "Enabled for rdmlx", and several details more.

A good set of examples of functions code can still be found under PROCESS starting with PSL in the LANSA Repository, those are examples of how to request information, maintain, use popups, prompts, create reports, etc.
functions2.jpg
functions2.jpg (107.46 KiB) Viewed 5273 times
You can find detailed information on DISPLAY, REQUEST, POP_UP, SET_MODE, IF_KEY and other commands under the technical guide in docs.lansa.com with examples how to use:
https://docs.lansa.com/15/en/lansa015/i ... play_e.htm
https://docs.lansa.com/15/en/lansa015/i ... mode_e.htm

Note that for creating of functions, you can use the old templates still available (use the ones starting with FR for full programs, BB for subsets of code)

Those commands, DISPLAY, REQUEST, POPUP are very powerful commands. Basically you tell them what fields to request or display, and they will automatically build the screen, using the descriptions/labels in the repository, they can have functions keys activated that allow you to change mode (like F21=Change and the mode goes from display to change), handle the F4=Prompt automatically, the F1, and if a next INSERT/UPDATE/DELETE command reports a validation error, it is reported automatically back to the screen, which will highlight the fields with error and show you the messages. nowadays... more code is needed to create the same kind of things when working in multilayer web applications...
functions3.jpg
functions3.jpg (160.76 KiB) Viewed 5273 times
sotis
Posts: 16
Joined: Thu Sep 16, 2021 11:37 pm

Re: Tutorial / Guide on display information on a workstation (Green Screen)

Post by sotis »

Hello Dino,

thank you for your answer.
Currently we are using LANSA 13.

I have been provided by my organization with a template as a starting point but there are several small details that is hard to find the relevant documentation.

For example the following field is defined:

DEFINE FIELD(#PB$INST) Type(*Char) Inp_ATR(PBIN) Output_Atr(PBIN)

What is the meaning of the $ sign (if any) in the field definition?

best,
Sotiris
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: Tutorial / Guide on display information on a workstation (Green Screen)

Post by Dino »

That $ sign... was just a valid character at some time to be used in a field name. no particular significance. not allowed anymore in the repository, just in the code of a program for backward compatibility, I guess.
Post Reply