View Full Version: Call Lawson Screen From Custom

LawsonTalk > Coding, Program Errors and Bugs > Call Lawson Screen From Custom


Title: Call Lawson Screen From Custom
Description: Calling Lawson HR Screens


mmrobinette - June 20, 2006 03:17 PM (GMT)
Hey crew

I'm looking for some programming expertise here. We are working toward implementation of Lawson HR at work. There is an interface I've been given to write that will need to be automated.

The automation will include using three (3) HR screens to input data incoming from one file.

My question is this .... is there a way from a 4GL custom program in Lawson to call a screen and populate the paramters and submit and also know whether it was successful in the add/change?

Please let me know as soon as you all can. Any help is appreciated.

trezaei - June 20, 2006 03:30 PM (GMT)
Boy, for such a short question that sure is a loaded one.

The answer is yes and no.
You CAN "INVOKE" online programs. This is fairly easy but can be somewhat tedious on some complicated screens. It basically entails passing all the screen fields and performing the action all in COBOL. There are many screens in Lawson that already do this.

do this

find $LAWDIR/<productline>/??src/ -name "*PD" -exec grep INVOKE {} \;

that should give you some examples, I would probably pipe it to lashow ...

As far as I know you can't invoke batch screens and submit them using the invoke command. But you can submit jobs using the API and you might even be able to build them using API. I'd recommend taking a quick look at the API manual.

You can always use AGS to add jobs with a trick we learned while doing BCI work, there's a flag on the batch screens that allows you to add jobs, and then submitting them can always be done using jqsubmit thru a CALL "SYSTEM" ...


With all the above said, what you seem to really need here is BCI, it can automate adding records to all kinds of screen and submitting jobs and all that jazz. If you own that product then you should really consider it.

mmrobinette - June 21, 2006 01:00 PM (GMT)
GREAT! Thank you Thank you. This is exactly the information I needed. Another quick one ... can the return code from the invoke be examined from the program that does the INVOKE?

mmrobinette - June 21, 2006 02:40 PM (GMT)
QUOTE (trezaei @ Jun 20 2006, 07:30 AM)
find $LAWDIR/<productline>/??src/ -name "*PD" -exec grep INVOKE {} \;


Hey ... quick question on this command. It did find the lines but it didn't give me any PD names just printed the lines. So therefore I didn't know what directory or name to find them under.

Any thoughts on how this could be modified to print the PD name??

Phil Feller - June 21, 2006 03:40 PM (GMT)
grep -l

It can be done without using the find command (which doesn't add anything to this task), by doing:

grep -l INVOKE $LAWDIR/<productline>/??src/*PD

mmrobinette - June 21, 2006 05:39 PM (GMT)
Awesome .... worked like a charm. YOu all are a life saver.



Hosted for free by InvisionFree