Auto Import Jobs
Previous Topic  Next Topic 

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: 


  1. ImportFilename=(Filename that holds the data to import into DMS.  This parameter is required)
  2. ReportStatusFilename=(Filename to write the import status and any errors to.  If not given, the default filename of import folder\ImportStatus.TXT will be used.
  3. DefaultJobState=(The default job state if not given on the import job record; optional; if not given and a default is required, the default set in the System Terms will be used)
  4. AddResourcesIfRequired= YES/NO (Default=YES)
  5. ApplyImportTable= YES/NO (Default=YES; indicates whether or not to apply the Import Interface Table)
  6. CheckIfPreviousStatusComplete= YES/NO (default NO)
  7. IgnoreCompletedJobsOperations= YES/NO (default NO)
  8. IgnoreJobsWithReleaseDateGreaterEqualTo= YYYYMMDD (default is blank)
  9. IgnoreJobUserFieldRecords= YES/NO (default NO)
  10. IgnoreOperationUserFieldRecords= YES/NO (default NO)


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