The auto SQL import jobs command enables you to import jobs into DMS via a predefined SQL script. This command is the same as selecting the Interface | SQL Import | Job Import via SQL manually from the DMS menu. The SQL script is defined using Interface | Import Settings | Job Import SQL Scripts.
In order to import jobs automatically, the user name provided for the login must have access to both the “Enable Auto User Login” and the “Import jobs using SQL”.
The parameter for the automatic import jobs is:
AutoSQLImportJobs=command file
For example, to login to the database WorkData with a user name of Jan Smith to import jobs via an SQL script using the command file C:\Program Files\Dynafact\Import Jobs Cmd.TXT the following would be used:
DMSEnt “AutoUserName=Jan Smith” DatabaseName=WorkData “AutoSQLImportJobs=C:\Program Files\Dynafact\Import Jobs Cmd.TXT"
The “command file” is an existing text file that holds the SQL import jobs command information. The command file parameters must never be surrounded in quotation marks even if the parameter has a space in it. The following commands are given in the schedule command file:
The following example shows a command file that will run the SQL script "DMS SQL Job Import", write the import status to a file called "ReportStatusFilename=C:\Program Files\Dynafact\DMS\Export\SomeResults.Txt", add resources if they do not exist, and do not apply the Import Interface Table. Because the parameter DefaultJobstate is not given, the default job state set in the Terms and Settings will be used as required. Also, since the parameter JobSecurityProtectionCheck is not given, it defaults to No:
SQLScriptName=DMS SQL Job Import
ReportStatusFilename=C:\Program Files\Dynafact\DMS\Export\SomeResults.Txt
AddResourcesIfRequired= Yes
ApplyImportTable=No
Note that if you want to run an import command more than once, you must specify an entirely new command line. For example, if you want to run three SQL import commands, the following command lines would be used:
"C:\Dynafact\Production\DMS\DMSEnt.exe" "UserIniFolder=C:\Dynafact\Production\DMS\User\" "AutoUserName=DMS" " DataBaseName=DMSCopy" "AutoSQLImportJobs=C:\Program Files\Dynafact\DMS\ImportCmd1.TXT" "AutoLogOut"
"C:\Dynafact\Production\DMS\DMSEnt.exe" "UserIniFolder=C:\Dynafact\Production\DMS\User\" "AutoUserName=DMS" " DataBaseName=DMSCopy" "AutoSQLImportJobs=C:\Program Files\Dynafact\DMS\ImportCmd2.TXT" "AutoLogOut"
"C:\Dynafact\Production\DMS\DMSEnt.exe" "UserIniFolder=C:\Dynafact\Production\DMS\User\" "AutoUserName=DMS" " DataBaseName=DMSCopy" "AutoSQLImportJobs=C:\Program Files\Dynafact\DMS\ImportCmd3.TXT" "AutoLogOut"
Also see: Automatic Execution Commands