Spawing new Progress session from Progress..

Posted by MBeynon on 30-Jun-2017 02:25

Hello,

I'm tasked with writing a program that as part of it's functionality "spawns" new Progress sessions which will lock records for a certain amount of time.

Basically, the program is designed for a tester to reproduce conditions in an application that a customer on site may experience by reproducing the DB activity. It does this by recording the record locking activity over a certain period of time and outputting this to a file. The file is then read back in and the DB locks are reproduced by spawing a new process and locking each record for the duration recorded for that record in the file.

My question is what should I be using to do the spawning? prowin32, bpro or something else?

I've tried prowin32 and bpro but have struggled to get parameters passed across to the new spawned process. I've tried -param for prowin32 and ARG for bpro but neither seems to work?

E.g.

OS-COMMAND("C:\dlc10\bin\prowin32.exe -p user-load-spawned.p -param " + ttLock.File_Name).

gives me

---------------------------
Error
---------------------------
** Your database name is longer than 11 characters. (448)

---------------------------
OK   
---------------------------

or bpro which according to Progress : "Starts a single-user OpenEdge client session in batch or background mode."

OS-COMMAND('C:\dlc10\bin\bpro -b -p user-load-spawned.p ARG=' + ttLock.File_Name).

gives

** Could not recognise argument: +. (301)

and also an unwanted client session Window.

I have found this post on this forum; https://community.progress.com/community_groups/openedge_general/f/26/t/7557 but it hasn't really answered my questions.

Any help would be greatly appreciated,

Thanks.

Posted by James Palmer on 30-Jun-2017 05:25

I have a hazy memory that OS-COMMAND works better when you wrap the command in a VALUE() command.

All Replies

Posted by doa on 30-Jun-2017 04:06

Are you on windows?

If yes you can use "System.Diagnostics.Process:START(cCommandLine,cParamList)."

The first param is the full path to the exe the second param are the parameters

OS-COMMAND just wraps the console of the host OS, and cmd in windows is very picky in terms of parameter format and also some paths (UNC paths don't work for example)

Posted by James Palmer on 30-Jun-2017 05:25

I have a hazy memory that OS-COMMAND works better when you wrap the command in a VALUE() command.

This thread is closed