using JadLoad to automate extraction of schemas

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:42 pm

by CarlRanson >> Tue, 6 May 2003 23:54:40 GMT

Hi All

Is there any trick that can be used to get JadLoadB to extract a schema as part of a script. Preferably via a parameter file, but a full schema extract would do.

We are tying to automate our load process and want schema files for a sanity check at the end.

any ideas?
CR

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:42 pm

by allistar >> Wed, 7 May 2003 10:33:13 GMT

Hi Carl,
From what I know this is not possible (at least not pre Jade 6). I have a suspicion that there is the ability to extract partial and full schemas programatically. It's a featute we are hanging out for too.

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:42 pm

by Patwos >> Thu, 8 May 2003 5:04:43 GMT

Hi Carl/Allistar,

I just did a quick keyword search in Parsys for "programmatically extract" and found a couple of requests for this feature. They are duplicates of 9254 and when I search for #9254 it looks like it has 9 other duplicates.

From the details in Parsys, it looks like the guys at Jade have already put this into their Jade 6 release - I've copied/pasted their reply here to save you some time:

"The extractBatch method ,Class Schema, can be executed from jadloadb to extract a patch,a specific schema or list of schemas, or to extract using information from a file."

That probably doesn't help for now, but it's nice to know its coming in the next release of Jade.

Thanks,
Pat.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:43 pm

by CarlRanson >> Thu, 8 May 2003 22:53:42 GMT

Nice one.
Thanks Pat.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:43 pm

by cnwrbb1 >> Fri, 6 Jun 2003 12:40:26 GMT

The extractBatch method is available in 5.2.08.175. I used the following (which I can invoke from thin client to run on the app server - make sure directories are relative to this box):

extractBatch(param : String input;
command : String output;
args : ArgsArray output;
result : Integer output;
returnVal : Integer output) serverExecution;

vars

begin
create args transient;

command := app.getJadeInstallDirAppServer & "\jadloadb";
args.add(" ini=" & app.getIniFileNameAppServer);
args.add(" path=" & app.dbPath);
args.add(" server=multiUser");
args.add(" schema=JadeSchema");
args.add(" app=Jade");
args.add(" executeSchema=JadeSchema");
args.add(" executeClass=Schema");
args.add(" executeMethod=extractBatch");
args.add(" executeParam=" & '"' & param & '"');
args.add(" executeTransient=true");

returnVal := node.createExternalProcess(app.getJadeInstallDir, command, args, null, false, true, result);

end;


ArgsArray is a subclass of StringArray with a longer member. oo err.

As much of the param systax that I am aware of is:
Command, <schema file name or mul name for M or E or Q>,<ddb filename not M or E or Q>,<param file name for F> or <patch number for P or Q>,<schema name> or <schema name list for M>
e.g. E,c:\temp\myschemas.mul
M,c:\temp\selected.mul,scm1,scm2
A,c:\temp\scm1.scm,c:\temp\scm1.ddb,scm1

I have successfully used the A (All) and P (parameter file) options:

param := "A," & scmFileName & "," & ddbFileName & "," & schemaName;
param := "F," & scmFileName & "," & ddbFileName & "," & paramFile & "," & schemaName;

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:43 pm

by johnmunro >> Thu, 22 Jan 2004 10:23:49 GMT

Is there a way of telling it to encrypt the schemas it extracts?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:43 pm

by cnwrbb1 >> Thu, 22 Jan 2004 21:35:56 GMT
Is there a way of telling it to encrypt the schemas it extracts?

Don't know ... I have requested comprehensive batchExtract documentation, PAR #26125.
- Rob

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:43 pm

by JADE Support >> Thu, 22 Jan 2004 22:01:16 GMT

The extractBatch option was deliberately not documented as it was a work in progress. Use of this undocumented facility in the 5.2 release is not supported.

The officially released version of this feature is now now available in the JADE 6 release. You can read the documentation for this in the Extracting Schemas as a Non-GUI Client Application section of the JADE 6 UserGuide.pdf documentation.

As regards the question on extracting encrypted schemas, you can add the following to your jadclient command line on Windows to encrypt the schema:

"<encrypt>"

Note that the quotes around the chevrons are required when running this on a Windows environment as the chevrons have special meaning in a Windows command line.

This option was inadvertently omitted from the 6.0.17 documentation and this has now been addressed by the JADE Product Information team.

Thanks,
Brian Johnstone,
JADE Support.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using JadLoad to automate extraction of schemas

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:43 pm

by encos_dev >> Tue, 13 May 2003 0:02:13 GMT

I know this is a crude fix, but we solved this problem by having a scripting program launch the development environment & do the extract (via it taking control of the mouse & keyboard). It works 99% of the time & allows us to do daily builds.

Hanging out for Jade 6 & the jadloadb extract feature.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 9 guests