Run Non-WebSpeed Procedure

crjunk

Member
Can WebSpeed run an existing Progress procedure that is used with one of our existing desktop applications?

I tried adding the following to the Main Block in my CGI Wrapper:
RUN cp.p.

Is this possible?

Thanks,
CR Junk
 

gcampbell

Member
As long as it doesn't output anything (and even then that doesn't really matter) then yes.

If it's pure business logic then it shouldn't be an issue at all.
 

crjunk

Member
Do I have to do anything special in the WebSpeed portion in order for the non-WebSpeed procedure to run?

As a test, I copied the file CP.P to the same directory where my WebSpeed CGI Wrapper is located. I then added: Run CP.P. to a procedure in the WebSpeed CGI file but the code does not seem to be executed.

The code in CP.P does not return any output. All it contains is:

FOR EACH OMH WHERE
OMH.REC-STATUS = "WAITING" OR
OMH.REC-STATUS = "PENDING" :
UPDATE OMH.REC-STATUS = "".
END.

Thanks,
CR Junk
 

Casper

ProgressTalk.com Moderator
Staff member
Don't you start up the database with -NL (no-lock default)?

I guess you have to replace update statement for assign statement.

Updat is a comination of the following statements:
DISPLAY moves the values of fields or variables into the screen buffer and displays them.
PROMPT-FOR prompts the user for data and puts that data into the screen buffer.
ASSIGN moves data from the screen buffer to the record buffer.

Since you are running on a webspeed agent you can't have display statements in your source.

Look in your log files I guess you can find something there ( I haven't checked if an error raised but i figure it could).

As Mr. Campbell said any procedure can be run within a webspeed session as long as it doesn't output anything. (So no display, which is part of update).

HTH,
Casper.
 

gcampbell

Member
Is cp.p located in your agents PROPATH? You can you search for cp.p via Webspeed Workshop to determine if it will find cp.p when running your web code.

later,
Gordon
 

gcampbell

Member
Change your UPDATE to an ASSIGN (or drop it altogether). An UPDATE requires user input which can't be done via a cgi-wrappwer.

Thanks to CASPER for pointing out the update. I was assuming an ASSIGN, not an UPDATE -- even though you specifically state an UPDATE. Anyone like to wear my rose-coloured glasses?

Later,
Gordon
 

crjunk

Member
Thanks everybody! After changing the UPDATE to ASSIGN, the code is executed correctly. I'm slowly learning Progress and WebSpeed.

CR Junk
 
Top