Archive | April, 2008

Error compiling on CentOS

24 Apr

I was receiving:
error: IO exception
1 error

Turns out this is because of the language:
export LANG=""

fixed it.

Rails migration

14 Apr

To change the database:

ruby script/generate migration add_column

Delete until a certain character on the line

13 Apr

dfx, delete from here until the character “x”

DataStage Server Job large XML file

11 Apr

To an XML file in a Server Job using an “XML Input Stage” you can use a “Sequential File” or “Folder” to send two columns – the first being the filename the second being the contents of the file.
– To do this you would send the option in the “XML Input Stage” as “XML file”

This is kind of hacky – it reads the whole XML file into the second column. I am running a VM and found that this wouldn’t work for XML files > 50meg.

If the file is too big you can get around it by using the “URL/File Path” option in the “XML Input Stage”. In this case the “Sequential File” or “Folder” must send the filename of the file to the “XML Input Stage”. This seems to allow you to use bigger files.

Play around with the “Convert CRLF” and other options in the “Sequential File”/”Folder” to get what you want.

Running a command from DataStage ‘Job Control’

10 Apr

* Delete any temporary file if it was creatd
tmpFile = “my filename”
Call DSLogInfo(“”, “Job failed. Deleting temp file: “:tmpFile)
Call DSExecute(“UNIX”, “rm “:tmpFile,UnixOutput,UnixReturnCode)

Websphere Integration Developer issues

4 Apr

I was getting the following error when trying to use the BPC to test something (Using a Tibco EMS queue).

The problem is one of two things:
1. the JNDI Name for the QueueConnectionFactory is incorrect
(Need to go into Applications>Enterprise Applications>’ModuleName’>Map resource references to resources – make sure the QueueConnectionFactory is correct and matches a QCF in Resources>JMS Providers (or wherever)
2. The SCA Endpoint Binding is incorrect
(Need to go into Applications>SCA Modules>’ModuleName’>Imports – make sure the “Endpoint” is correct

 E   WSWS3016E: Caught JMSException: javax.jms.InvalidDestinationException:
 CWSIA0046E: The parameter Queue[jms/ems/ISL.IS.SEND.QUEUE] is from a foreign implementation that is not supported.
[11/14/07 15:57:07:846 CST] 0000005e ExceptionUtil E   CNTR0020E: EJB threw an unexpected (non-declared) exception during inv
ocation of method "transactionNotSupportedActivitySessionNotSupported" on bean "BeanId(ISL_SC_IS_Test_ClientApp#ISL_SC_IS_Tes
t_ClientEJB.jar#Module, null)". Exception data: JMSWSWS3016E: Caught JMSException: javax.jms.InvalidDestinationException: CWSIA0046E: The parameter Queue[jms/ems/ISL.IS.SEND
.QUEUE] is from a foreign implementation that is not supported.

DataStage executed job return value

4 Apr

Example of how to run a job from “Job Control” in DataStage and set a status (or return value) from an executed job

      ErrCode = DSWaitForJob(hJob1)
      Status = DSGetJobInfo(hJob1, DSJ.JOBSTATUS)
      If Status = DSJS.RUNFAILED Or Status = DSJS.CRASHED Or Status = DSJ.ERRFATAL Then
         * Fatal Error - No Return
         Call DSLogInfo("Job Failed!!!!: MITS_Cons_FTP", "JobControl")
         RetVal = 'Failed: Initial MITS_Cons_FTP failed'
         GO TO THEEND:

  Call DSLogInfo("At the end, retval is " : RetVal,"JobControl")
  Call DSSetUserStatus("STATUS: " : RetVal)