Accessing Expense Management Archive files in AWS Server using XMDBTOOL
From 10.2, we have new batch file in XMDBTool package called sysutils. There was a requirement to have visibility into the xmdbtool archive and rerun folders through XMDBTool. To get the list of files that are in the archive folder and the re run folder (for both cc and noncc imports) we must use this command:
>sysutils -listfiles yes -type<any one of the types - cc / noncc / ccrerun / nonccrerun>
- listfiles: This parameter must be set to Yes.
- type: This can be cc (if we require to get the cc files in the archive folder), noncc (if we require to get the non-cc files in the archive folder), ccrerun (if we require to get the cc files in the rerun folder), nonccrerun (if we require to get the non - cc files in the rerun folder) or export.
The command sysutils with listfiles set as Yes, generates a file in the folder called sys in the XMDBTool client. Based on the type, the sys folder have different sub-directories. For example, if the type specified is cc then the sys folder in the client have a sub -folder called cc which in turn have the text file having all the information about the files in the cc archive folder.
The files generated under the sys folder are named as <type>_archiveinfo__<timestamp>.txt. These sys files lists out all the data files present under the requested archive or re-run folder, alongwith their file size (indicated in KB).
In addition XMDBTool has a new feature, that allows the user to download the files (cc or noncc) from the archive or the rerun folder. This feature specially can be used to download the files from the rerun folder and rectify and make changes to the file and fix the reason, on why this file was not run successfully. Once the file is corrected, it can be processed again using the XMDBTool client.
For downloading the files, this sysutils batch file is used:
>sysutils -getFile <name of file to download> -type<any one of the types - cc / noncc / ccrerun / nonccrerun>
- getFile: This parameter is used to specify the name of the file to be downloaded.
- type: This can be cc (if we require to get the cc files in the archive folder), noncc (if we require to get the non-cc files in the archive folder), ccrerun (if we require to get the cc files in the rerun folder), nonccrerun (if we require to get the non - cc files in the rerun folder) or export.
The specified files from the server are downloaded to the client <xmdbtool_client_install>/sys folder.
From version 10.2.12, the files can be downloaded using the getFile option, based on the name, names (specify more than one file and all are downloaded with a single command), and the file name pattern (such as the part of filename or wildcard]. Multiple files with the same pattern in the filenames are downloaded.
Example:
- To download single file, use: > sysutils -getFile er_header.txt -type export. This command downloads the er_header.txt to the client machine.
- To download multiple files, use: > sysutils -getFile er_header.txt#er_line.txt -type export. This command downloads the er_header.txt and er_line.txt to the client machine. The separator is #.
- To download files based on pattern, use: > sysutils -pat true -getFile er_*.txt -type export. This command downloads all the files beginning with er_ with a txt extension to the client machine. To search based on pattern, the value of pat must be set to true and the getFile must have the file name pattern specified with the wildcard.