Welcome to the Veson Nautical Knowledge Base. In the Help Center, you can view the same articles and contact support as needed.
IMOS On-Prem - Datashed Arguments
Datashed is a utility for extracting data from IMOS and exporting it in various formats. It can be run stand-alone from the command line as an ad hoc utility†, or it can be run from the Messaging Service. Datashed accepts many arguments, some of which may be incompatible with one another.
For more information, see the Messaging Service Manual.
Command line option* | Description |
---|---|
--action=value | A vnccmd:command action, in URI format, to perform, inclusive of that action's arguments |
--actionLimit=value | Used in conjunction with --action to specify the maximum number of actions that will be executed |
--bulksize=value | The maximum number of records to output to DB in one call (500 by default) |
--emailAttach=value | (optional)
|
--emailBlank=value |
|
--emailFrom=value | Sender's email address (as specified in Messaging Service Configuration Outgoing Message Locations, e.g., xxxx@gmail.com) to use when emailing report output (optional, to be used with emailTo option) |
--emailTo=value | A comma-separated list of user names, Distribution List(s), and/or companyNo (for Address Book report distribution) to receive the output by email |
--env=value | IMOS environment to use (optional) |
--httpHeader headerName headerValue | HTTP header fields added to outgoing HTTP messages generated by imosmail.exe to support external systems that require additional parameters to accompany the message payload (e.g., a user name and password) |
--httpRequest URL | Method for sending an HTTP request, supported by imosmail.exe |
--locale=VALUE | Locale format for the report to export in; the value comes from OS Language Value Codes |
--multithread | Commands Datashed to run across multiple threads, taking full use of available CPU cores to perform its query faster |
--outputPath=value | Output location (optional, overrides Report Designer view settings):
|
--rvFile=value | An exported Report Designer FORM file to run |
--rvFilter=value | A series of logical filters that can apply to the object specified by rvForm |
--rvForm=value | An IMOS Dataforms Object to run |
--rvOutputType=value |
|
--rvTitle=value | Report Designer view title to run |
--rvBaseID=value | Value of the viewID from the query retrieved when running:
|
--stream | Reads data from the database in chunks of 5,000 records to prevent out-of-memory exceptions that might occur from loading all the data at once. The report being run must be uniquely sorted using only standard columns, and output must be set to XML or CSV |
--streamBatchSize number | Used in conjunction with --stream to specify how many records should be loaded per batch |
--user=value | User name to use for resolving meta-user fields in reports (optional) |
--webpost URL | Method for sending an HTTP request, supported by imosmail.exe |
--webprocess URL | Method for sending an HTTP request, supported by imosmail.exe |
--webquery URL | Method for sending an HTTP request, supported by imosmail.exe |
--bulktimeout=value | Datashed parameter which is relevant when running Reporting DB reports. The value set in this parameter will be the time (in seconds) allocated for time out. |
- †When running datashed.exe from the command line, for some arguments you may need to have an IMOS shell open, and also to set the IMOSENV environment variable to the intended IMOS environment name.
- *When providing values to arguments, it is a good idea to wrap the VALUE in double-quotes (" ").
Datashed Use-Case Scenarios
Datashed accepts many arguments and can be used in many different scenarios. This is a list of common scenarios and appropriate arguments.
Running a Report Designer Report
Datashed is able to run a Report Designer report. This is particularly useful when scheduling a report to be emailed to a distribution list. When running a Report Designer report, the parameters of the datashed call will override any settings stored in the report definition. This includes overriding details such as which ouptut directory to use and which email address to send to.
datashed.exe --rvTitle="Report Title" --outputPath="C:\temp"
Breakdown of this command:
Argument | Explanation |
---|---|
--rvTitle | Run a Report Designer report using the set Title. |
--outputPath | Output the contents of the report to this specified folder. IMOS will export the report in the format specified in the Report Designer report properties. You cannot export the report if it is set to open in List View. |
Running a Large Report Designer Report
For larger reports, data can be read from the database in chunks of records (default = 5000) to prevent out-of-memory exceptions that might occur from loading all the data at once.
datashed.exe --rvTitle "report_name_2" --stream
datashed.exe --rvTitle "report_name" --stream --streamBatchSize 10000
Exporting a Voyage Pnl Snapshot XML
Datashed can export a Voyage Pnl Snapshot XML based on recalculation or a snapshot. The snapshot XML will include every Pnl line item detail and is specifically dependent upon the vnccmd pnlXml.
- Examples:
datashed.exe --rvForm Voyage --rvFilter "VesselCode==""XXXX""AND VoyageNo==XXXX" --action "vnccmd:pnlXml?vslCode=XXXX&voyNo=XXXX&snapshotType=daily&dataSource=EAP&voypnlNotificationXml=true&outputFolder=C:\temp" --multithread
datashed.exe --rvForm Voyage --rvFilter "VesselCode==""XXXX""AND VoyageNo==XXXX" --action "vnccmd:pnlXml?vslCode=XXXX&voyNo=XXXX&snapshotType=current&dataSource=snapshot:EAP&voypnlNotificationXml=true&outputFolder=C:\temp" --multithread
This method is best used with snapshot types like current, for which only one of each A, E, P can exist.
Breakdown of this command:
Argument | Explanation |
---|---|
--rvForm Voyage | Datashed command is run against the Voyage data object instead of a Report Designer report. |
--rvFilter "VesselCode==""XXXX""" AND VoyageNo==XXXX" | Datashed will run only against the Voyage data objects that match the provided VesselCode and VoyageNo. |
--action "vnccmd:pnlXml?vslCode=XXXX&voyNo=XXXX&snapshotType=current&dataSource=EAP&voypnlNotificationXml=true&outputFolder=C:\temp" | The action specified, pnlXml, acts on all voyages that match the VesselCode and VoyageNo filter and takes several arguments of its own; see below for more details on vnccmd:pnlXml. |
Bulk Saving Voyages to Update the "Current" Snapshot or Prompt Voyage XML Files
You may come across the following two scenarios that datashed.exe could help with:
- If you enable configuration flag CFGCacheVoyPnl and require all voyages to be "bulk" saved.
- If you have a Vessel Data Integration and require all vessel XML files to be bulk sent to their new system (requires Message Handler setup).
The command below can be set up as a one-time scheduled task.
Note: It is highly encouraged to test this in a database backup with one vessel first.
datashed.exe --rvForm=Voyage --rvFilter="VoyageStatusCode!=""Closed""" --action "vnccmd:saveVoyage?vslCode={VesselCode}&voyNo={VoyageNo}"
Bulk Saving Cargoes
If you want all cargoes to be saved, the command below can be set up as a one-time scheduled task.
Note: It is highly encouraged to test this in a database backup with one cargo first.
datashed.exe --rvForm=Cargo --rvFilter="CargoID!=0" --action "vnccmd:saveCargo?cargoId={CargoID}"
Running the Trading Module Historical VaR
Datashed can run the Trading module Historical VaR report. This report is specifically dependent upon the vnccmd runHistoricalVarReport. The following is an example:
datashed.exe --action "vnccmd:runHistoricalVarReport?numberOfSteps=30&snapshotType=Ad-hoc&snapshotRef=Daily&step=1&stepUnit=Day&filter=CARGO&outputFile=C:\temp\VarReport.xml"
This example leverages the --action parameter of datashed to execute a runHistoricalVarReport command. For further information on the runHistoricalVarReport command, see below.
vnccmd:pnlXml
vnccmd is an internal utility for calling specific actions in IMOS from the command line. It is common to use one specific action, pnlXml, when working with datashed. Here is a list of the pnlXml action arguments.
Argument | Values | Notes |
---|---|---|
vslCode | Vessel Code | vslCode=VesselCode sets the Vessel Code parameter. This is a required parameter for this action; value is controlled using datashed.exe --rvFilter argument. |
voyNo | Voyage Number | voyNo=VoyageNo sets the Voyage Number parameter. This is a required parameter for this action; value is controlled using datashed.exe --rvFilter argument. |
snapshotType | Snapshot Type | snapshotType=any available IMOS snapshot type; the action will select only snapshots of that type. Snapshot types include:
|
dataSource | snapshot:any combination of the following:
| dataSource=snapshot:any combination of (E)stimated, (A)ctual, or (P)osted to output a single snapshot XML file per type. |
deltaOnly | One of the following:
| deltaOnly=true exports the P&L XML only if the snapshot of the specified dataSource type has changed. deltaOnly=false or blank exports the P&L XML. |
voypnlNotificationXml | One of the following:
| voypnlNotificationXml=true creates Voyage P&L output XML in the summary format of voypnl notification message, using the same output format and tags as the voypnl XML generated by manually saving the voyage from the Voyage Manager. voypnlNotificationXml=false or blank uses the default format. |
outputFolder | \path\to\directory | The path to the preferred output location. For example, outputFolder=C:\temp outputs the snapshot XML into the C:\temp directory. |
format | One of the following:
| The format of the XML output:
|
vnccmd:runHistoricalVarReport
vnccmd is also able to run the Trading Module Historical VaR Report. This allows you to schedule the Historical VaR report for regular output, and even automatically email it to certain recipients. Like the pnlXml command above, the runHistoricalVarReport has its own set of commands that are build into a datashed action argument.
Argument | Values | Notes |
---|---|---|
markets | Market Name | markets=Baltic,Imarex_Bunker Comma-delimited market names. Ignore invalid individual market names. All markets are selected if the parameter is not set. |
calendar | Holiday Calendar Code | calendar=CNY A single Holiday Calendar Code value. Null if the value is invalid or not set. |
refDateOffset | Integer | refDateOffset=-1 Day for which to run the Historical Var, referencing the current day. -1 meaning yesterday. Default to 0 if the value is invalid or not set. |
step | Integer | step=1 The size of the step; expressed in units. |
unit | One of the following:
| unit=Day The unit of the step. Default is Day. |
numberOfSteps | Integer | numberOfSteps=100 The number of steps to take historically, from the reference date. |
snapshotType | One of the following:
| snapshotType=Ad-hoc The Trading P&L Snapshot Type. |
snapshotRef | String | snapshotRef=Daily The Snapshot reference name; typically set in the Trading P&L Snapshot scheduled task. If left blank, you must enter a value for snapshotProfileName. |
snapshotDateOffset | Integer | snapshotDateOffset=-1 Specific day for which to retrieve a snapshot, referencing the current day. Only used if snapshotType is set. Default to 0 if the value is invalid or not set. If multiple snapshots exist for the same combination of snapshotRef and snapshotDateOffset, the latest snapshot for the combination of snapshotRef and snapshotDateOffset should be returned. |
snapshotProfileName | Trading Profile Name | snapshotProfileName=STANDARD The Trading Profile name. If left blank, you must enter a value for snapshotRef. |
filter | Trade Filter Name | filter=CARGOVSVESSEL Specifies the Trading Filter to apply to the snapshot. Ignore if blank. |
reportType | One of the following:
| reportType=Detailed Determines if output should be the Detailed or Aggregated version of the Historical VaR. |
outputPath | \path\to\directory | outputPath=C:\Temp The path to the preferred output location. |
outputTab | Excel Worksheet Tab name | Tab name, only if the outputFile is an Excel file. |
emailTo | email@address.com | Comma-separated email distribution list for the report, which can be individual users, IMOS distribution groups, and companyNo (for company report distribution), similar to the datashed "emailTo" argument |
vcncmd:saveCargo
Saves cargo with a specified cargoID argument.
Argument | Values | Notes |
---|---|---|
cargoID | Numeric value of the specific Cargo ID | ID of the Cargo to save. |
vnccmd:deleteCargo
Deletes cargo with the specified cargoID argument.
Argument | Values | Notes |
---|---|---|
cargoID | Numeric value of the specific Cargo ID | ID of the Cargo to delete. |
Sending Emails
Datashed is able to send emails either through the command line parameters, or by running a report with an email distribution list configured. When sending an email, Datashed will use a Messaging Service Outgoing Message Location. This Outgoing Location must be an SMTP server with the Name default.
Still need help? Visit the Veson Nautical Help Center.
Copyright © 2017-2024 Veson Nautical LLC All Rights Reserved - Privacy Notice | End User Terms of Use