DataLoad Commands

A DataLoad command is essentially a macro representing special processing. There are two types of command, although this is not necessarily apparent to the DataLoad user. The majority of commands act as a user friendly alias for the normal data or keystrokes that can be entered into a cell and these are discussed in this section, however a number of specialised built-in commands are also available and are discussed below. A command is typically used to hide complex keystrokes behind a more user friendly command name. For instance, to "Save & Proceed" in the NCA Applications the following keystroke combination is required:

\%A{DOWN 4}{ENTER}

Attempting to enter those keystrokes every time a Save & Proceed is required will make the DataLoad spreadsheet more unreadable and therefore harder to understand and maintain, and the likelihood of mistakes also increases. A much better approach is to register those keystrokes under a user friendly command name. The Save & Proceed keystrokes are normally defined as *SP. This means that the command can be used multiple times in one load but it is only defined in one place, thus that definition can be changed once rather than every time the command is used in a sheet.

Prior to V4.1 all DataLoad commands were hardcoded into the software and no changes could be made to command definitions. As of V4.1 commands can be edited, added or deleted. The default commands are maintained in the file "commands.dat", which must be located in the same directory as dataload.exe. Command definitions are also stored in the DataLoad spreadsheet files. This makes the spreadsheets portable and any special commands you have created for a your load will still work as you designed them on another user's PC.

V4.1 also introduced the concept of command groups. For every DataLoad command there can be a number of different definitions, each belonging to a different group. Different definitions are required where a load may be used with multiple applications that have different access paths to the same functionality. For instance, to Save & Proceed in Oracle's 10SC (Smart Client) Applications the following keystrokes are required:

\%AA

Because this is different to the NCA definition we may want to define *SP differently in multiple command groups, thus allowing the same command to be used to load into different applications but with different keystrokes resulting. A command group must be selected from the drop down list on the main DataLoad form before a load can commence.

The following table lists the standard DataLoad commands available and the effects of using those commands.

G Many shortcuts used by NCA are different to those in 10SC (Smart Client). For that reason many of these commands will not work in 10SC when used in versions of DataLoad prior to V4.1. Before that version the commands were configured for Oracle Applications NCA and sent the appropriate keystrokes for that product. If Oracle Applications NCA is not the DataLoad target and V4.1 or above cannot be used these commands may not work because of different shortcut commands or menu structures. In this case direct keystrokes should be sent, as described in Sending Keystrokes

DataLoad Command
(Case Sensitive)

Application Action(s)

   
TAB <Tab>
ENT <Enter>
*UP <Up Arrow>
*DN <Down Arrow>
*LT <Left Arrow>
*RT <Right Arrow>
*SP Save & Proceed
*FE Field Editor
*PB Previous Block
*NB Next Block
*PF Previous Field
*NF Next Field
*PR Previous Record
*NR Next Record
*ER Erase Record
*DR Delete Record
*FR First Record
*LR Last Record
*SAVE Save Record
*SB Send a single space character
*ST Select entire field text.
*SLN or *SL(N) Pause for N seconds. Note 1
*BM Block Menu
*AX Alt + X where X is a single letter (A-Z). Note 2
*FI Find +
*FA Find All +
*QE Query Enter +
*QR Query Run +
*CL Clear Field +
*IR Insert record +
*CW(window) Change to window window. +
*ML(coordinates) Position the mouse at coordinates and press the left button. ++
*MR(coordinates) Position the mouse at coordinates and press the right button. ++

+ DataLoad V4.0.2 and above only.

++ DataLoad V4.1 and above only.

Note 1 DataLoad can send keystrokes to NCA faster than they can be processed. If this problem is encountered delays can be added to the load which will pause DataLoad at key times. The *SLN command can be added to the input script to indicate DataLoad should 'sleep' for a given number of seconds. E.g. '*SL5' will cause a delay in processing for 5 seconds. Decimal numbers can be used for more precise delays, E.g. *SL0.5 will result in a half second delay. A large number of predefined delays are available in DataLoad and these, along with *SL, are described in greater detail in Using delays. To reduce setup work, predefined delays should be used instead of *SL wherever possible.

Note 2 In Oracle Applications it is sometimes necessary to press a button to navigate to another block. This can be achieved by pressing <Alt-X>, where X is the letter that is underlined on the button. Any menu item can also be invoked by pressing <Alt> + the letter underlined on the menu.

Built-in Commands

The following commands are built-in to DataLoad and cannot be edited or replaced in the commands form.

Command
(Case Sensitive)
Application Action(s)
   
*CW(window) Make window the new target window for DataLoad.
*SLN or *SL(N) Sleep for N seconds.
*ML(coordinates) Position the mouse at coordinates and press the left button.
*MR(coordinates) Position the mouse at coordinates and press the right button.

*CW allows you to switch between different windows and load data into all of them. This command is useful when it is not possible to change windows by any other means, but also has good uses even when this is not the case. It is often possible to change the active window through the application, for instance navigating to the next block in Oracle Applications sometimes causes the focus to move to another window. Despite this it is often faster to change to the new window by calling *CW rather than allowing the application to make the change, and this not only results in faster loads but reduces errors as well.

*SL causes DataLoad to 'sleep' for the specified number of seconds and is an important command for controlling the rate at which DataLoad progresses. This command is described in more detail in Using delays.

*ML and *MR. These commands will cause a left or right mouse click to occur at the point on the screen specified in the coordinates parameter. These commands can be very important and have a number of uses. First, they are essential for accessing any application functionality for which no keyboard shortcut exists. Where a button, for example, cannot be accessed using a keyboard shortcut a mouse click must be used. The mouse is also very useful for improving the speed and accuracy of navigation within the application during a load. It is often much quicker to move the cursor using the mouse than by issuing the necessary keystrokes. This may apply whether the cursor is just moving between blocks in a form or between different windows.

The coordinates parameter is the X and Y screen positions where the click should occur. Since there is no way a user can know what these coordinates are DataLoad has a method for automatically inserting the coordinates into the command. When the user enters *ML or *MR in a cell a dialog box is shown prompting the user to position the mouse where the click should occur. This dialog box should not be dismissed yet because doing so indicates to DataLoad that the mouse is in the correct position for the click. When the mouse is in the location where the click should occur the user should then press Enter. This will dismiss the dialog box and insert the screen coordinates into the *ML or *MR command. Those coordinates can be manually entered into further cells where this same click should occur, or the dialog box can be displayed again by entering *ML or *MR.

The mouse clicks work very well to make functionality available for which no keyboard shortcuts exist, or to improve cursor navigation during a load. This command is only suitable, however, where the item to be clicked will always be in the same location. Since Oracle Applications' forms are always drawn in the same position this should not be a problem, however it is important that the forms are left in their default positions while the load is being developed and the *ML and *MR commands programmed.