Compiling file from command line, how to

Solapas principales

How do I compile a file through the command line?

 

I am generating a very basic csp page in a bash shell, it is generating fine and displays what I want to see as long as I go into studio and compile it .  This defeats my purpose of having the page and I am having no luck figuring out what I am doing wrong.  I think the issue has to do with the file not being included when I compile from command line.

Ver is 2017 running  RHEL 7

 

From command line I see

TST 3f2>DO $SYSTEM.OBJ.Compile("csp.vvmaccessnewrds","h")

Compilation started on 06/24/2020 09:47:26 with qualifiers 'h'
Compiling class csp.vvmaccessnewrds
Compiling routine csp.vvmaccessnewrds.1
Compilation finished successfully in 0.008s.

In studio I see

TST 3f2>DO $SYSTEM.OBJ.Compile("csp.vvmaccessnewrds","h")

Compiling file /r2montst/vvmaccessnewrds.csp
Compiling class csp.vvmaccessnewrds
Compiling routine csp.vvmaccessnewrds.1
Compilation finished successfully in 0.536s.

 

 

 

Respuestas

$System.OBJ doesn't handle CSP pages, but $System.CSP does. You can use LoadPage:

Set sc = $System.CSP.LoadPage("/dev/test.csp", "duck")

(You need to use the URL here, not the class name.) This compiles the CSP page into a class, and then compiles that class.

Thank you, this is the command that finally worked

d $system.OBJ.CompileList("/r2monitor/shadmon/vvmr2vrostatus.csp")