AppWorx, Dollar Universe and Sysload Community

 View Only

 Export uproc/session/TSK

Sam Mtd's profile image
Sam Mtd posted Nov 09, 2021 07:03 AM
Hello Everyone,

I would like to know if there is anyway to export all UG/SESSION/UPROC from dollarunivers to an excel file.

Could you please help me with this, i have been looking around but i couldn't find how, do i need to do it via the consol or cmd line ?

Thank you so much.
Patrick Dhaene's profile image
Patrick Dhaene
Hi , 
    You should take a look at the command uxlst .
    This should work.

kind regards,
Patrick
Sam Mtd's profile image
Sam Mtd
Hello Patrick

Thank you for your answer, do you have any idea how to run this command, actually the server is installed on a windows machine, if you have any exemples of the command and what it gives in the output i will be really thankfull to you sir.

Thank you so much
Patrick Dhaene's profile image
Patrick Dhaene
Hi , 
     you open a command prompt.
    you run the uxsetenv.bat command
    then you run the command :
                   %uxexe%\uxlst UPR EXP UPR=* FULL OUTPUT=c:\temp\uprocs.txt
                   %uxexe%\uxlst SES EXP SES=* FULL OUTPUT=c:\temp\sessions.txt
                   %uxexe%\uxlst MU MU=* FULL OUTPUT=c:\temp\MU.txt

SupportAutomation AptaSolutions's profile image
SupportAutomation AptaSolutions
Hello @Sam Mtd,

There are many ways to go about doing what you want to accomplish, but it depends on your use case. You could get some information from UVC by hitting CTRL-A ​on your list of uprocs then CTRL-C and pasting the results into Excel. But this would only give you a listing of your uprocs with some very peripheral information (Name, Label, Version, Domain, Application). 

The methods mentioned by @Patrick Dhaene would also work and give much more detail. It would require you running this command on each individual node, or creating a uproc that could be deployed on each node to run locally. 

My preferred method would be to use the very powerful UVMS command line to export information into XML files (which can then be read by Excel, or other tools). This would give you the most information, including the contents of any CL_INT scripts, among other data. This method is also repeatable and automatable, so it could be done automatically on a regular interval. You could also duplicate some functionality seen in UVC's deployment hub, where you can automatically "expand" objects (using the -dep modifier) in order to also export dependent objects (for example, exporting expanded uprocs would also export the associated Domain and Application objects). Or, you could export expanded Tasks, which would also export all associated Sessions, Uprocs, MUs, rules, etc. If your end goal is to export only objects that are currently used to run jobs, this might be your best bet (keeping in mind that any uproc and/or session objects that are not used by a task would not be exported). 

To do this, you need to run two commands from UVMS CLI:

  1. uniadd TOPKG
    1. This will create a new package stored in UVMS that will contain all your exported objects
  2. uniexp PKG
    1. This will export the package file to XML format, when using the -xmlfile modifier

Example: 

First:
uniadd TOPKG -login admin -pwd Password! -pkg example -company TSTTST -node TESTNODE -area X -upr "*"

This command will export all Uprocs from node 'TESTNODE' in company 'TSTTST' to a package named 'example'. 

Second:
uniexp PKG -login admin -pwd Password! -xmlfile upr.xml -pkgtype OBJECTS -pkg example

This command will export the package created in the first step, 'example', to an xml file named 'upr.xml'

You can take this further by scripting it. You can pair the above commands with the 'unilst node' command to list all your nodes, and then run the add and export commands on each node listed. All done from one central location. 

I would recommend you check out the documentation linked above to see what works best for your situation (I didn't even get to the -full modifier that could export pretty much all objects on a given node). 

I hope that helps!

Regards,

Domenico Cotugno
Apta Solutions
Samuel BOURDALE's profile image
Samuel BOURDALE
Hello,

for my part I proceeded as follow : 
- Export of all objects (upr/ses /tsk .. ) with command lines USHW .. 
- Parsing my results in CSV format
- Loading CSV files in SQL Server Database
- And then using EXCEL and PowerQuery to query my databases, develop reports and so on ..

The more difficult thing is to develop the scripts for parsing results of "uxshw" , I used AWK on AIX. 

These exports / imports are done every week or on demand through a DUAS server.

I now have all the configuration of all the objects of all my nodes available on EXCEL even the dependencies etc.

with this data we also developed reports on inconsistencies and comparisons, we can do everything with excel / VBA and so one but it means time ;)

That said it took me a while to develop but it's really worth it, we use it every day, this a real project of  work optimisation.


For info we also use excel and powerquery for the executions, retrieved from REPORTER, with excel we generate reports and perform processing time analyzes, such as derivations, inconsistencies etc.

Regards
Samuel
Sam Mtd's profile image
Sam Mtd
Hello All,

I really thank you all for your different solutions, i am having another issue after load UVMS Env, when i try the command uxlst or uxshw i'm having the error below: 

'uxshw' is not recognized as an internal or external command, operable program or batch file.

i tried the %uxexe%\ at the beginning still KO

can you help me please, Thank you 
SupportAutomation AptaSolutions's profile image
SupportAutomation AptaSolutions
Hello @Sam Mtd

The 'uxshw​' and 'uxlst' commands are part Dollar Universe's command line interface and must be run at the individual node level. They cannot be run from the UVMS.

The 'uniadd' and 'uniexp' commands are part of UVMS's CLI and can be run from the UVMS to query every node associated with your central UVMS. 

This is why I prefer using the UVMS CLI as you can get information from every node from a central location. You can also accomplish this using the 'uxshw' and 'uxlst' commands by adding the 'node=' parameter in your command, though you still need to run this from the node level (as a scripted uproc, for example). 

Again, it would be interesting to know what you intend to do with this data so we can give the best possible solution.

If you would like to "catalog" your production plan, for example, you might also want to look into deploying a Dollar Universe Explorer instance:
Dollar Universe Explorer

I hope that helps!

Regards,

Domenico Cotugno
Apta Solutions
Sam Mtd's profile image
Sam Mtd
Hello, 

Thank you for your response, what i want actually is just to get all the jobs running in dollaruniverse in a sort of tabular view 1st column Session 2nd column uProc thats belogns to that session a 3rd columns for TSK that runes the session or the uproc (and MU .... and other informations if available)

Thank you
Sam Mtd's profile image
Sam Mtd

Hello Everyone, 

i am sorry to be annoying, so i went to test the UNIADD solution, but i'm having an issue finding the right cmd line, whene typing uniadd -TOPKG, it shows that TOPKG is an unknown object, i only have this :

Usage: uniadd <object>
Choose the proper object:
uniadd LOGIN to declare a central login (online/offline)
uniadd SYSTEMUSER to create a system user
uniadd GROUP to create a group
uniadd TOGROUP to add a login, system user or role to a group
uniadd NODE to create a node (online/offline)
uniadd NODEVIEW to create a node view
uniadd CLUSTER to create a cluster
uniadd TOCLUSTER to add a UVMS node to a cluster

is it the version ? 

thank you in advance

SupportAutomation AptaSolutions's profile image
SupportAutomation AptaSolutions
Hello @Sam Mtd,

The documentation for the UNIADD TOPKG command can be found here:
https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/dollar-universe/6-10/Univiewer_Administrating_8/Commands/Packages/uniadd_TOPKG.html

Did you use 'uniadd -TOPKG' instead of 'uniadd TOPKG'? The first parameter after 'uniadd' should not have a dash character ahead of it. There error you saw might have been a **** typo/syntax​ error.
Sam Mtd's profile image
Sam Mtd
Hi, 
thank you for your answer, i managed to create the package using the GUI, its not the result i want :(
best regards
SupportAutomation AptaSolutions's profile image
SupportAutomation AptaSolutions
Glad to see you got it sorted. 

One more thing I just realized is that the 'uniadd TOPKG' command may have only been added in version 6.10. If you are on a prior version, the 'TOPKG' option may not be available. 

If you have a package created from the GUI, you should still be able to use uniexp PKG to export your existing packages to XML.