ajsdaconvert
- Organization of this page
Format
ajsdaconvert -i folder-for-pre-conversion-execution-result-files -o folder-for-post-conversion-execution-result-files [-q]
Function
The ajsdaconvert command converts a previous version of the execution result files stored in the folder for pre-conversion execution result files to the current version, and then outputs the files to the folder for post-conversion execution result files.
Since the previous versions of the execution result files are unavailable for the current version of macro functions, you need to convert the execution result files before performing export.
When you upgrade the version of JP1/AJS3 - Definition Assistant, use this command to convert the previous version of the execution result file to the current version.
Although the folder for pre-conversion execution result files contains multiple versions of files, you do not need to identify each file's version. This is because all the files in this folder will be stored with the current version of file format into the folder for post-conversion execution result files.
After conversion, the execution result file is converted to xls format in the 32-bit version and to xlsm format in the 64-bit version.
Use this command to convert the file format. Note that a file can be converted from xlsm format to xls format only if the number of definitions is 65,000 units or less.
Permissions for execution
None
Command stored in:
JP1/AJS3 - Definition-Assistant-installation-folder\bin
Arguments
-i folder-for-pre-conversion-execution-result-files
Specifies the folder that stores the previous versions of execution result files. Specify the absolute path of the folder.
The specifiable length of a character string is 1 through 184 bytes.
Make sure that the number of execution result files stored in this folder does not exceed 100.
We recommend that if execution result files to be stored are large in size (more than dozens of MBs per file), the number of files stored should be about 20 files because it takes time to process them.
-o folder-for-post-conversion-execution-result-files
Specifies the folder that stores the execution result files after conversion. Specify the absolute path of a folder that differs from the one specified in the -i option.
You can specify from 1 to 184 characters (units: bytes).
The specifiable length of a character string is 1 through 184 bytes.
-q
Outputs the KAVZ0615-Q message if another file with the same already exists in the folder for post-conversion execution result files. This message asks you whether you want to overwrite the file. Choosing Yes button overwrites the file. Choosing No button does not overwrite the file.
Notes
-
Before executing the ajsdaconvert command, make sure that all the definition information management templates are closed and no other processing is being executed.
-
Do not execute more than one ajsdaconvert command at the same time. This may cause an error in a subsequent command and the KAVZ0814-E message is output.
-
This command cannot be executed if automatic import or automatic export is set in the environment settings file (ajs2da.conf). The KAVZ0614-E message appears, and the command terminates abnormally. Before you attempt to use this command, cancel the automatic import and export settings.
-
The auto-filter that is set for the execution result file before conversion will be canceled after conversion. If you manually set the rows and columns to be hidden, the setting will also be canceled after conversion of the execution result file.
-
The command skips processing without converting the files if one of the following occurs. To check which files are skipped, see the log file:
-
In the Japanese version of JP1/AJS3 - Definition Assistant, the folder for execution result files for the English version of JP1/AJS3 - Definition Assistant is specified in the -i option of the command.
-
In the English version of JP1/AJS3 - Definition Assistant, the folder for execution result files for the Japanese version of JP1/AJS3 - Definition Assistant is specified in the -i option of the command.
-
The execution result file before conversion is not for the definition information management template.
-
The file before conversion is the master file or its name is same as the master file.
-
In the 32-bit version of JP1/AJS3 - Definition Assistant, a new version of a pre-conversion file in xlsm format is specified in the command.
-
In the 64-bit version of JP1/AJS3 - Definition Assistant, a new version of a pre-conversion file in xls format is specified in the command.
-
In the 32-bit version of JP1/AJS3 - Definition Assistant, a folder in which the number of definitions of pre-conversion files in xlsm format is more than 65,000 units is specified in the command.
-
In the folder for pre-conversion execution result files, there are both files in xls format and files in xlsm format that have the same file name before their extension#.
In this case, one file is converted while the other is not. For this reason, do not put files with duplicate names before the extension in the folder for pre-conversion execution result files.
#
For example, there are two files with the names of: AJS2DA-IMPORT-121212121212121.XLS and AJS2DA-IMPORT-121212121212121.XLSM.
-
-
The command just copies the files without converting them if:
-
The file format before and after conversion is the same and the execution result files before conversion are the current or later version.
-
-
If the folder specified in the -o option contains a file with the same name as for the one to be converted, the command converts the file. However, if the -q option is specified, the command outputs the KAVZ0615-Q message that asks you whether you want to overwrite the file.
-
After conversion, the person who updated the properties of the execution result file is changed to the user who executed this command.
-
The current version of the definition information management template is applied to the files after conversion. As a result, a converted file may contain columns of definition items that did not exist (were not supported) in the file before conversion. However, nothing is set in these definition information columns because the file before conversion does not contain information about these columns. If you want to use the definition information management template after conversion to export information including the definition information columns added to the current version, manually set information for the added definition information columns. Then, perform export.
-
Neither push any function key nor enter any character during execution of the command.
-
Do not push the ESC key during execution of the command. Pushing the ESC results in interrupting command execution and outputs the KAVZ0616-E message dialog box.
-
During execution of the command, do not add (by moving or copying) a file to or delete a file from the folder for pre-conversion execution result files.
If you add or delete a file, the processing results might not be output correctly to the log file or to a message dialog box that indicates the processing results when conversion finishes.
-
Although the contents of the execution result file being converted might not be displayed correctly during execution of the command, there will be no problem with the contents of the execution result file after conversion.
-
If you convert many files or a large file, post-processing of the system may take time even after command execution has terminated.
-
If R/3 job definition information in the pre-conversion execution result file contains invalid definitions of a yen sign (\) or double quotation mark ("), the invalid definition information will still be invalid after conversion by the command. If you want to export definition information from the execution result file after conversion, correct the definition information before attempting to export.
-
Make sure that a unit name is entered in all the unit definitions in the pre-conversion execution result file. A line on which a unit name is not entered is treated as the end of the definition information, and the subsequent lines are not included in the post-conversion execution result file.
-
If Microsoft Office IME is used, conversion processing might take time. Therefore, temporarily change the settings to Microsoft IME before executing the command.
-
When you convert an execution result file saved in a version earlier than JP1/AJS3 - Definition Assistant 10-00, the values specified for the definition item column (Condition, Judgment value, and File name) for Judgment type in the Basic job definition information section in the pre-conversion file are set for the definition item column of the Judgment job definition information section in the post-conversion file.
-
When you convert an execution result file saved in a version earlier than JP1/AJS3 - Definition Assistant 10-00, although the definition item column (Variable, judgment value of Variable (char.), and judgment value of Variable (number)) in the Other definition information section is set in the pre-conversion file by using the save function for unsupported definition information items, the values are not shifted to the definition item column of the Judgment job definition information section in the post-conversion file. Instead, they are set for the same definition item column in the Other definition information section in the post-conversion file. If you need to shift these values, manually delete the values set for the Other definition information section and set the values for the Judgment job definition information section in the post-conversion file.
-
When converting an execution result file saved with a version of JP1DA earlier than 10-50, even if Language (the item specified with a JP1/AJS3 for Enterprise Applications command argument of -1) is configured by Other R/3 job definition information in the R/3 job definition information section for the file before the conversion, this setting will not be transferred to the Language column of the R/3 job definition information section of the file after the conversion. (After the conversion, the setting will be configured in Other R/3 job definition information).
If transfer of the setting is necessary, for the file after the conversion, manually delete the value configured in Other R/3 job definition information, and configure the value in the Language column of the R/3 job definition information section.
-
Do not launch or display other windows on top of the Excel window while this command is running. If other windows are launched or displayed on top of the Excel window, the conversion processing might take a long time or a message indicating that resources are insufficient might appear.
-
If the following message appears while this command is running, the conversion processing might have failed. In this case, reduce the number of files in the folder for storing the pre-conversion execution result files, and then execute the command again.
"This task cannot be completed due to insufficient resources. Reduce the amount of data to be selected or close other applications, and then try again. Do you want to continue without restoring the previous state?"
Return values
None
Example 1
In this example, the command converts the execution result file (previous version) in the "C:\Program Files\Hitachi\JP1AJS2DA\backup_old" folder to the format of the current version and then stores the file in the "C:\Program Files\Hitachi\JP1AJS2DA\backup" folder:
ajsdaconvert -i "C:\Program Files\Hitachi\JP1AJS2DA\backup_old" -o "C:\Program Files\Hitachi\JP1AJS2DA\backup"
Example 2
This example assumes that the version of JP1/AJS3 - Definition Assistant has been upgraded, but the current version of the program may use the previous version of execution result files to perform export. In this example, the command converts all the versions of execution result files to the current version. The execution result files are stored by their version in the following folders:
-
Folder for execution result files 07-00
D:\BACKUP\ajsdabackup70
-
Folder for execution result files 07-00-/B
D:\BACKUP\ajsdabackup70B
-
Folder for the current version of execution result files
C:\Program Files\Hitachi\JP1AJS2DA\backup
ajsdaconvert -i "D:\BACKUP\ajsdabackup70" -o "C:\Program Files\Hitachi\JP1AJS2DA\backup" ajsdaconvert -i "D:\BACKUP\ajsdabackup70B" -o "C:\Program Files\Hitachi\JP1AJS2DA\backup"
Supplementary note
When all the files are converted, the message dialog box appears, indicating the processing results. The command also outputs the processing results to the log file, unless a command option error occurred.
Log file format
Stored in:
%ALLUSERSPROFILE%\Hitachi\JP1\JP1_DEFAULT\JP1AJS2DA\log
The default value of %ALLUSERSPROFILE% is system-drive\ProgramData.
Log file name
Current log file name: ajsdaconvert.log (latest result)
Storage log file name: ajsdaconvert0[1-5].log (The previous result is 01, the oldest result is 05. Maximum of five generations are saved.)
Output format
- #1
-
Indicates the year, month, day, hour, minute, and second in the YYYY/MM/DD hh:mm:ss format.
- #2
-
Outputs the following information:
Table 7‒3: Output information for the processing result Output information
Meaning
Remarks
OK
Successful
Including the case where the command just copied the files without converting them.
SKIP (reason-code)
Unprocessed
The meaning of the reason code is:
- 01
-
The file is other than the definition information management template.
- 02
-
A file for the English version of JP1/AJS3 - Definition Assistant is specified in the Japanese version. Alternatively, a file for the Japanese version of JP1/AJS3 - Definition Assistant is specified for the English version.
- 03
-
A file is the master file or its name is same as the master file.
- 04
-
A file in xlsm format for the new version is specified. (This code is output when the command is executed in the 32-bit version.)
- 05
-
A file in xls format for the new version is specified. (This code is output when the command is executed in the 64-bit version.)
- 06
-
The number of files in xlsm format exceeds 65,000 units (This code is output when the command is executed in the 32-bit version.)
- 07
-
The name of the file before the extension is the same as that of the file already converted.
NG (reason-code)
Failure
The meaning of the reason code is:
- 10
-
An attempt to read the file before conversion caused an error (processing continues).
- 11
-
An attempt to save the file after conversion caused an error.
- 12
-
There is a file with the same name as the file before conversion in the post conversion execution result folder and No button is pushed for the overwrite confirmation dialog box (processing continues).
- 13
-
An error occurred during conversion.
- 99
-
Other error that cannot be identified.
- #3
-
If processing is interrupted due to an error, information following this line will not be output.
Output example
The following shows an output example when the ajsdaconvert command terminates normally.