using SNDPGMMSG in CL frograms

Use this board to ask questions or have discussions with other Genie users.
Post Reply
kmiles@misd.net
New User
Posts: 15
Joined: Tue Aug 21, 2018 8:14 am
First Name: Keith
Last Name: Miles
Company Name: Macomb ISD
Phone: 5862283375
Address 1: 38177 LITTLE MACK AVE
City: CLINTON TWP
State / Province: Michigan
Zip / Postal Code: 48036
Country: United States
Contact:

using SNDPGMMSG in CL frograms

Post by kmiles@misd.net »

a lot of our CL programs use SNPPGMMSG to indicate job submitted to the user but this does not work when running from Genie. I tried to create a CL utility that sends a message to a display file window using cl program that shows a window using SNDRCVF RCDFMT(WINDOW01) WAIT(*NO). This works in the green screen environment but when it is run from genie it displays the message but requires the user to press enter before it proceeds to the next command. If there any work around for this?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: using SNDPGMMSG in CL frograms

Post by Scott Klement »

Web browsers don't allow the server to change the web page without something being done in the browser to initiate it.

So, if the web page is sitting and waiting for input (including just the enter key or a function key, but also including input into fields) the server running on the IBM i cannot change the screen. It must wait until the uiser has submitted the page back to the server. Imagine if any web server on the Internet could change your screen at anytime without you even navigating to their site? It'd be unusable... so browsers don't allow it.

What you can do to work around this is write JavaScript code that submits the screen. For example, in the onload event you might use an "if" statement to look for a particular field/value on the screen that indicates that it should proceed without waiting, and if that's set, do pressKey("Enter").
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests