akkigpt
New Member.
1551 views

how to unload script in HPSM using command prompt or program external to HPSM server

Jump to solution

I want to perform 

db -> Table as “unload” -> Search “CR-PSD.unl” -> Click Proceed

to execute from Command line or program without using HPSM server.

 

how can I excute this step using command line or HPSM program

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: how to unload script in HPSM using command prompt or program external to HPSM server

Jump to solution

Generally, if you'd like to access SM data from other systems, you can use the web service APIs:

https://s3.amazonaws.com/smhelpcenter/smhelp941/codeless/index.html#webservicesguide/concepts/purpose.htm%3FTocPath%3DGuides%2520and%2520reference%7CWeb%2520Services%2520Guide%7C_____0

Specifically to your question, you can create a script record: db -> scripts -> add like below:
2016-09-18_14-23-10.jpg2016-09-18_14-21-04.jpg2016-09-18_14-21-04.jpg

And then in the windows command line run:

 sm.exe script.execute NULL NULL test.script NULL -bg

it will export all the records defined in UnitTest into D:\\test3.unl. 

Hope it helps,

Ling-Yan

View solution in original post

5 Replies
Micro Focus Expert
Micro Focus Expert

Re: how to unload script in HPSM using command prompt or program external to HPSM server

Jump to solution

Generally, if you'd like to access SM data from other systems, you can use the web service APIs:

https://s3.amazonaws.com/smhelpcenter/smhelp941/codeless/index.html#webservicesguide/concepts/purpose.htm%3FTocPath%3DGuides%2520and%2520reference%7CWeb%2520Services%2520Guide%7C_____0

Specifically to your question, you can create a script record: db -> scripts -> add like below:
2016-09-18_14-23-10.jpg2016-09-18_14-21-04.jpg2016-09-18_14-21-04.jpg

And then in the windows command line run:

 sm.exe script.execute NULL NULL test.script NULL -bg

it will export all the records defined in UnitTest into D:\\test3.unl. 

Hope it helps,

Ling-Yan

View solution in original post

akkigpt
New Member.

Re: how to unload script in HPSM using command prompt or program external to HPSM server

Jump to solution

lingyanmeng thanks a lot for your sugesstion  hope it will work for me I have to try it out.

Actually I want to unload a specific .unl file to a folder in unix with different name

(append with date- basically this  is  for .unl backup for rollback purpose ) without using HPSM UI.

how this can be done using any api or command line 

0 Likes
akkigpt
New Member.

Re: how to unload script in HPSM using command prompt or program external to HPSM server

Jump to solution

lingyanmeng

what is "unit test" parameter under "name" 

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: how to unload script in HPSM using command prompt or program external to HPSM server

Jump to solution

The "UnitTest" is one of the predefined unload file, you can replace it with your own unload file defination:

You can find and define new unload files at: db -> unload

Ling-Yan

0 Likes
Highlighted
akkigpt
New Member.

Re: how to unload script in HPSM using command prompt or program external to HPSM server

Jump to solution

Hi ling-yan,

As in the provoided Script is it posssible to pass the parameter "unittest' and "D:\\test3.unl" from command line shomwhere in below syntax

sm.exe script.execute NULL NULL test.script NULL -bg

 And I also need a Script to purge a unl file.

this is because if iI want to rollback a loaded file then data should purge.

Please can you provide some idea or guide path how to do this ?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.