2
votes

I wanted to import an XML file into my informatica repositry from the command line using PMREP command.

The command I executed:

pmrep objectimport -i .XML -c Control.XML -l Import_Log.txt

The control file:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE IMPORTPARAMS SYSTEM "impcntl.dtd">

<!--apply label name LABEL_IMPORT_NEW to imported objects-->

<IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="NEWOBJECTS"

APPLY_LABEL_NAME="LABEL_IMPORT_NEW">

<FOLDERMAP SOURCEFOLDERNAME="sOURCE_FOLDER_NAME" SOURCEREPOSITORYNAME="SOURCE_REP_NAME" TARGETFOLDERNAME="TARGET_FOLDER_NAME"

TARGETREPOSITORYNAME="TARGET_REP_NAME"/>

<!--replace all mappings-->

<RESOLVECONFLICT>

<TYPEOBJECT OBJECTTYPE="ALL" RESOLUTION="REPLACE"/>

</RESOLVECONFLICT>

</IMPORTPARAMS>

I renamed the control file as Control.XML or Control.dtd or Control.cnf. But nothing worked.

when I executed the command, The repository was invoked, but immediately got this failure message.

Invoked at Fri May 01 06:26:22 2015

failed to execute objectimport

When I checked the log file, I got the following error:

FATAL:Error at (file /.../Control.XML, line 2, char 45(: An exception occured! Type:XMLPlatformException, Message:Could not close the file.

I tried to name the control file as impcntl.dtd(this was just a try) But got this error,

FATAL:Error at (file /.../Control.XML, line 2,char 3): Expected a markup declaration.

When I removed the line "--> !DOCTYPE IMPORTPARAMS SYSTEM "impcntl.dtd" <--" from the control file, I got the following error,

Label [LABEL_IMPORT_NEW] cannot be found in the repository [SOURCE_REP_NAME]

I am using Unix version: Solaris SunOS 5.10(sparc), and Infa version: 9.1 hotfix 4.

It would be great if somebody can give me a solution for this.

Thanks!

1
Here is a similar problem: community.informatica.com/thread/32186. But since you already solved that part, the last message seems to be important: Do you already have a label called LABEL_IMPORT_NEW ? If not, try to remove the part APPLY_LABEL_NAME="LABEL_IMPORT_NEW". - pgruetter
Will try this sir.. Thanks! @socken23 - Ra-V

1 Answers

0
votes

I do a lot with pmrep, in general your control file looks fine and it is obeying the dtd definition. Just making sure of a few things:

Did you make a call to connect before the objectimport call? [like /> connect -r RepositoryName -n UserID -x password -h serverPath -o port# -s SecDomain