Open UP1.9 Developer in RunTime Mode


Jim Stephenson
 

I am sure this is a strange request.

I have a need to open a UP1.9 Studio license in RunTime mode and run a specific Program and then close the app.

Is that even possible?

I can run a shortcut that will open UP1.9 and login. But even though I have the INI set to open in mode 'R', it opens in ToolKit mode until I press Ctrl-F7 to go to RunTIme. When I do that it starts the program I told it to run in my record main.

But I need this to be unattended.


Steven Blank
 

Jim,

Is this a one-off? Or an ongoing operation?

If the latter, I should strongly suggest you consider purchasing an MGPART1 license, also known as Partitioning Lite, 5-threads — well-under a thousand USD, the last I had need.

Then you can call it from the command-line; or from another Magic operation with Call Remote, anywhere on the network; or schedule tasks using Windows Task Scheduler. It does NOT accept http requests, so it's secure by virtue of it's ignorance.

If the former, why not just use the runtime? Why does it need to be the Studio? If it NEEDS to be the Studio, then look into the "Tools Infrastructure" topic and its "Automatic Processing" subsection. It's in the online Help.

Steven G. Blank
SGBlank Consulting


On 4/6/2022 1:59 PM, Jim Stephenson wrote:
I am sure this is a strange request.

I have a need to open a UP1.9 Studio license in RunTime mode and run a specific Program and then close the app.

Is that even possible?

I can run a shortcut that will open UP1.9 and login. But even though I have the INI set to open in mode 'R', it opens in ToolKit mode until I press Ctrl-F7 to go to RunTIme. When I do that it starts the program I told it to run in my record main.

But I need this to be unattended.


Jim Stephenson
 

Thanks Steve, I am considering the MGPART license. 

This will be an ongoing process until I can convince the client to switch over completely to the SQL version of this app.

The client only has DeskTop licenses, so we can't open the SQL files from the RunTime they have.

On Wed, Apr 6, 2022 at 6:05 PM Steven Blank <sgblank@...> wrote:
Jim,

Is this a one-off? Or an ongoing operation?

If the latter, I should strongly suggest you consider purchasing an MGPART1 license, also known as Partitioning Lite, 5-threads — well-under a thousand USD, the last I had need.

Then you can call it from the command-line; or from another Magic operation with Call Remote, anywhere on the network; or schedule tasks using Windows Task Scheduler. It does NOT accept http requests, so it's secure by virtue of it's ignorance.

If the former, why not just use the runtime? Why does it need to be the Studio? If it NEEDS to be the Studio, then look into the "Tools Infrastructure" topic and its "Automatic Processing" subsection. It's in the online Help.

Steven G. Blank
SGBlank Consulting


On 4/6/2022 1:59 PM, Jim Stephenson wrote:
I am sure this is a strange request.

I have a need to open a UP1.9 Studio license in RunTime mode and run a specific Program and then close the app.

Is that even possible?

I can run a shortcut that will open UP1.9 and login. But even though I have the INI set to open in mode 'R', it opens in ToolKit mode until I press Ctrl-F7 to go to RunTIme. When I do that it starts the program I told it to run in my record main.

But I need this to be unattended.


Steven Blank
 

Another reason to purchase a Partitioning Server license. MGPART1 can access ANY database. An order picking system I wrote ran for years on desktop clients, relying entirely on an MGPART1 server for access to Oracle tables. The secret operation is Call Remote, which can return results both synchronously and asynchronously. For example, Blobs containing Memory Table images are easy to pass from a Partitioning Server back to a DeskTop client on demand.

Truly, it'll open a whole new world of possibilities for you.

Steven G. Blank
SGBlank Consulting


On 4/6/2022 5:31 PM, Jim Stephenson wrote:
Thanks Steve, I am considering the MGPART license. 

This will be an ongoing process until I can convince the client to switch over completely to the SQL version of this app.

The client only has DeskTop licenses, so we can't open the SQL files from the RunTime they have.

On Wed, Apr 6, 2022 at 6:05 PM Steven Blank <sgblank@...> wrote:
Jim,

Is this a one-off? Or an ongoing operation?

If the latter, I should strongly suggest you consider purchasing an MGPART1 license, also known as Partitioning Lite, 5-threads — well-under a thousand USD, the last I had need.

Then you can call it from the command-line; or from another Magic operation with Call Remote, anywhere on the network; or schedule tasks using Windows Task Scheduler. It does NOT accept http requests, so it's secure by virtue of it's ignorance.

If the former, why not just use the runtime? Why does it need to be the Studio? If it NEEDS to be the Studio, then look into the "Tools Infrastructure" topic and its "Automatic Processing" subsection. It's in the online Help.

Steven G. Blank
SGBlank Consulting


On 4/6/2022 1:59 PM, Jim Stephenson wrote:
I am sure this is a strange request.

I have a need to open a UP1.9 Studio license in RunTime mode and run a specific Program and then close the app.

Is that even possible?

I can run a shortcut that will open UP1.9 and login. But even though I have the INI set to open in mode 'R', it opens in ToolKit mode until I press Ctrl-F7 to go to RunTIme. When I do that it starts the program I told it to run in my record main.

But I need this to be unattended.



Steve Greenfield
 

Hi Jim,

 

I can see your requirement is complicated by a need to access the Studio version.

 

Although this may not help you directly (until you get Runtime access to SQL database) but what you are asking is perfectly possible in UP1.9 Runtime – load UP unattended (from Windows Task Scheduler for example) and run a program.

 

We do this for a handful of overnight processes and use a configuration text file for each call which overwrites some of the INI settings and can pass specific parameters for the program – we find the file option easier and more maintainable than constructing it all into the command line for production. This is explained on page 878 of the Mastering uniPaaS pdf file.

 

I see you are trying to get your Studio to start in Runtime mode – have you tried setting /DeploymentMode=B (background) in your command line or configuration file? This certainly works for the Runtime version but I don’t know if it is applicable for the Studio too.

 

This is how we’ve implemented this - firstly in your application the program you want to run must have a Public Name.

 

In the logic of the Main Program add a small block to check for the passed parameter CallProgName (see ConfigurationFile.TXT below) – we do this so we can call any program in the application with a Public Name, we also exit cleanly after the program completes :–

Block If INIGet('CallProgName')<>''

                Call By Name INIGet('CallProgName')

                Raise Event Exit System

Block End

 

We have a Global virtual in the Main Program G:RunningInBackgroundMode which gets set from INIGet('DeploymentMode')='B' – we use this to disable any message popups on programs which are shared between desktop and background modes.

 

Our command line that can be set up as a shortcut or fed into the Windows Task Scheduler – you may need to put full paths for filenames etc.

 

uniRTE.exe /INI=MAGIC.INI @ConfigurationFile.TXT (if you have a full path with spaces then you need to surround the configuration path/filename in quotes @”<<path\filename.txt>>”)

 

ConfigurationFile.TXT

/StartApplication=<<insert your ECF path & filename>>

/DeploymentMode=B

/InputPassword=N

/USER=<<insert a login/username>>

/CallProgName=<<give the Call By Name Public Name>>

/Param1=

/Param2=

/Param3=

 

The Param1/2/3 are optional but useful if you want to pass parameters into the named program – just read them with an INIGet in the program. As this is background mode the programs mustn’t open screens or have popup messages – also why we set InputPassword to No.

 

Security could be an issue if you have rights on programs as you either have to have a user with no password or include the password in the configuration file.

 

Best Regards

 

Steve Greenfield

DataFormation UK Ltd

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Jim Stephenson
Sent: 06 April 2022 21:59
To: main@magicu-l.groups.io
Subject: [magicu-l] Open UP1.9 Developer in RunTime Mode

 

I am sure this is a strange request.

I have a need to open a UP1.9 Studio license in RunTime mode and run a specific Program and then close the app.

Is that even possible?

I can run a shortcut that will open UP1.9 and login. But even though I have the INI set to open in mode 'R', it opens in ToolKit mode until I press Ctrl-F7 to go to RunTIme. When I do that it starts the program I told it to run in my record main.

But I need this to be unattended.