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

Error rendering macro 'excerpt-include' : No link could be created for 'IMOS'.


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=valueA vnccmd:command action, in URI format, to perform, inclusive of that action's arguments
--actionLimit=valueUsed in conjunction with --action to specify the maximum number of actions that will be executed
--bulksize=valueThe maximum number of records to output to DB in one call (500 by default)
--emailAttach=value

(optional)

  • True (default): Email output in the specified format as an attachment
  • False: Email as embedded HTML
--emailBlank=value
  • True: Email blank outputs
  • False (default): Email non-blank outputs only
--emailFrom=valueSender'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=valueA comma-separated list of user names, Distribution List(s), and/or companyNo (for Address Book report distribution) to receive the output by email
--env=valueIMOS 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 URLMethod for sending an HTTP request, supported by imosmail.exe
--locale=VALUELocale format for the report to export in; the value comes from OS Language Value Codes
--multithreadCommands 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):

  • If rvOutputType=doc, the value is a full path to the output file.
  • Otherwise, the value is an output directory (folder).
--rvFile=valueAn exported Report Designer FORM file to run
--rvFilter=valueA series of logical filters that can apply to the object specified by rvForm
--rvForm=valueAn IMOS Dataforms Object to run
--rvOutputType=value
  • list (default)
  • doc (requires using at least the --rvFile and --outputPath options): Exports a report definition with the data you want, including joins, to a hierarchical XML that can be used in stylesheets
    • --rvFile must specify a Report Designer FORM file that outputs only one instance of the first Table selected. To do this, use report filters in the report definition or use the --rvFilter option with the Datashed. For example, to export a Voyage object to an XML, the FORM file must be a report that filters all voyages down to a single voyage.
    • When the data is exported, a structured XML file is created with the first Table set as the root of the XML file. Fields that are included in the report definition are exported to the XML file. Joined tables are created as child elements of the root and their joined fields are exported as well. The system supports nesting joined tables to any level.
--rvTitle=valueReport Designer view title to run
--rvBaseID=value

Value of the viewID from the query retrieved when running:

  • select viewID, * from reportview where title = '{YOUR_REPORT_TITLE}'
--streamReads 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 numberUsed in conjunction with --stream to specify how many records should be loaded per batch
--user=valueUser name to use for resolving meta-user fields in reports (optional)
--webpost URLMethod for sending an HTTP request, supported by imosmail.exe
--webprocess URLMethod 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:

ArgumentExplanation
--rvTitleRun 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:

ArgumentExplanation
--rvForm VoyageDatashed 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:

  1. If you enable configuration flag CFGCacheVoyPnl and require all voyages to be "bulk" saved.
  2. 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.

ArgumentValuesNotes
vslCodeVessel Code

vslCode=VesselCode sets the Vessel Code parameter.

This is a required parameter for this action; value is controlled using datashed.exe --rvFilter argument.
voyNoVoyage 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.
For example, snapshotType=current sets the data to be taken from the voyage's current snapshot.

Snapshot types include:

  • Snapshots you take (customP&L Snapshot Type Name, or exportXml); these appear with the date, time, and user.
  • initial: Depending on the value of configuration flag CFGInitialSnapshotTimeSelect, snapshots automatically taken when a voyage is either scheduled or commenced.
  • current: Snapshots automatically taken when a voyage is saved.
  • closed: Snapshots automatically taken when a voyage is closed; the date and time are followed by the text Closing.
  • accrual: Monthly Accruals Snapshots taken while using the Daily Snapshot method to generate Accruals; the date and time are followed by the text Accrual.
  • deviation: Snapshots automatically taken when creating a Deviation Estimate; the date, time, and user are preceded by the text Dev Est.

dataSource

snapshot:any combination of the following:

  • E
  • A
  • P

dataSource=snapshot:any combination of (E)stimated, (A)ctual, or (P)osted to output a single snapshot XML file per type.
For example, dataSource=snapshot:EAP triggers output for Estimate, Actual, and Posted P&L data.

deltaOnly

One of the following:

  • true
  • false
  • blank

deltaOnly=true exports the P&L XML only if the snapshot of the specified dataSource type has changed.
Example: If the dataSource is set to A,E,P and only the Estimated P&L snapshot has changed, it will only export the Estimated snapshot.

deltaOnly=false or blank exports the P&L XML.

voypnlNotificationXml

One of the following:

  • true
  • false
  • blank

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\directoryThe 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:

  • snapshot
  • summary
  • details

The format of the XML output:

  • format=snapshot outputs a voypnl XML file with line-item detail of the Voy Pnl.
  • format=summary (default) outputs a PNLINFO XML file with condensed details of the Voy Pnl.
  • format=details outputs a PNLINFO XML file with condensed details of the Voy Pnl in a special format. It cannot be used with voypnlNotificationXml.

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.

ArgumentValuesNotes
marketsMarket Name

markets=Baltic,Imarex_Bunker

Comma-delimited market names. Ignore invalid individual market names. All markets are selected if the parameter is not set.

calendarHoliday Calendar Code

calendar=CNY

A single Holiday Calendar Code value. Null if the value is invalid or not set.

refDateOffsetInteger

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.

stepInteger

step=1

The size of the step; expressed in units.

unit

One of the following:

  • Day
  • Week
  • Month

unit=Day

The unit of the step. Default is Day.

numberOfStepsInteger

numberOfSteps=100

The number of steps to take historically, from the reference date.

snapshotType

One of the following:

  • Ad-hoc
  • Scheduled

snapshotType=Ad-hoc

The Trading P&L Snapshot Type.

snapshotRefString

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.

snapshotDateOffsetInteger

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.

snapshotProfileNameTrading Profile Name

snapshotProfileName=STANDARD

The Trading Profile name. If left blank, you must enter a value for snapshotRef.

filterTrade Filter Name

filter=CARGOVSVESSEL

Specifies the Trading Filter to apply to the snapshot. Ignore if blank.

reportType

One of the following:

  • Aggregated
  • Detailed

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.

outputTabExcel Worksheet Tab nameTab name, only if the outputFile is an Excel file.
emailToemail@address.comComma-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.

ArgumentValuesNotes
cargoIDNumeric value of the specific Cargo IDID of the Cargo to save.

vnccmd:deleteCargo

Deletes cargo with the specified cargoID argument.

ArgumentValuesNotes
cargoIDNumeric value of the specific Cargo IDID 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