The auto import jobs command enables you to import jobs into DMS. This command is the same as selecting the Import | Text Import | Import Jobs via Text File manually from the DMS menu.
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 Mfg Orders”.
The parameter for the automatic import jobs is:
AutoImportJobs=command file
For example, to login to the database WorkData with a user name of Jan Smith to import jobs using the command file C:\Program Files\Dynafact\Import Jobs Cmd.TXT the following would be used:
DMSEnt “AutoUserName=Jan Smith” DatabaseName=WorkData “AutoImportJobs=C:\Program Files\Dynafact\Import Jobs Cmd.TXT"
The “command file” is an existing text file that holds the 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 auto import jobs command file will import jobs into DMS from C:\Program Files\Dynafact\DMS\Import\Import.Txt, write the status and any errors to the C:\Program Files\Dynafact\DMS\Import \SomeResults.Txt, and add resources if required. All other parameters take the default values:
ImportFilename=C:\Program Files\Dynafact\DMS\Import\Import.Txt
ReportStatusFilename=C:\Program Files\Dynafact\DMS\Import \SomeResults.Txt
AddResourcesIfRequired= Yes
The following example auto import jobs command file will import jobs into DMS from C:\Program Files\Dynafact\DMS\Import\Imp Jobs.Txt, will not add resources if required , ignore all job user fields from the import file, and ignore all operation user fields from the import file. All other parameters will take their default values including the report status that will write the status and any errors to C:\Program Files\Dynafact\DMS\Import \ImportStatus.TXT:
ImportFilename=C:\Program Files\Dynafact\DMS\Import\Imp Jobs.Txt
AddResourcesIfRequired= NO
IgnoreJobUserFieldRecords= YES
IgnoreOperationUserFieldRecords= YES
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 two import commands. the following would be used:
"C:\Dynafact\Production\DMS\DMSEnt.exe" "UserIniFolder=C:\Dynafact\Production\DMS\User\" "AutoUserName=DMS" "DataBaseName=DMSCopy" "AutoImportJobs=C:\Program Files\Dynafact\DMS\ImportCmd1.TXT" "AutoLogOut"
"C:\Dynafact\Production\DMS\DMSEnt.exe" "UserIniFolder=C:\Dynafact\Production\DMS\User\" "AutoUserName=DMS" "DataBaseName=DMSCopy" "AutoImportJobs=C:\Program Files\Dynafact\DMS\ImportCmd2.TXT" "AutoLogOut"
"C:\Dynafact\Production\DMS\DMSEnt.exe" "UserIniFolder=C:\Dynafact\Production\DMS\User\" "AutoUserName=DMS" "DataBaseName=DMSCopy" "AutoImportJobs=C:\Program Files\Dynafact\DMS\ImportCmd3.TXT" "AutoLogOut"
Also see: Automatic Execution Commands