Page 1 of 1

Datastage v752s01 Import error (importing from command line)

Posted: Mon Mar 05, 2007 6:25 pm
by cconlon
I'm having trouble using the 'dscmdimport.ext' command. When I run it from the command line, specifying as below (where TEST is the project and 'D:\Apps\DataStage_Client\ribs_xfm_sos_service_load.dsx' is the filepath):

dscmdimport /H <host> /U <username> /P <password> TEST D:\Apps\DataStage_Client\ribs_xfm_sos_service_load.dsx /V

I get this message:

Attaching to '<host>' ...
dscmdimport aborted:
Failed to attach to the project

Any suggestions as to why it didn't work? The empty project TEST was just created, without protections.

Posted: Mon Mar 05, 2007 6:38 pm
by ray.wurlod
If my memory serves, the mandatory argument (the DSX name) should be last on the command line. Try moving the /V switch to a position earlier in the command.

Posted: Mon Mar 05, 2007 9:11 pm
by kduke

Code: Select all

SET DSImportCmd=C:\Progra~1\Ascential\DataStage7.5.1\dsimport.exe


Code: Select all

for /F "tokens=1" %%i in (%DsxList%) do (

  ECHO Importing %%i to Project: %Project% on Host: %Host%

  echo %DSImportCmd% /H=%Host% /U=%User% /P=%Password% %Project% %ProjectDir%\%%i >> %LogFileName%
  %DSImportCmd% /H=%Host% /U=%User% /P=%Password% %Project% %ProjectDir%\%%i >> %LogFileName%
  IF NOT %ERRORLEVEL%==0 GOTO ProjFail

  ECHO. >> %LogFileName%
  ECHO *** Completed Import for Project: %Project% on Host: %Host% >> %LogFileName%
  ECHO     from File: %ProjectDir%\%%i >> %LogFileName%
  ECHO. >> %LogFileName%
)

Posted: Tue Mar 06, 2007 12:48 am
by kumar_s
You need to give '=' after the parameters like /H /U /P.

Code: Select all

dscmdimport /H=host /U=username /P=password TEST D:\Apps\DataStage_Client\ribs_xfm_sos_service_load.dsx /V