Here is the code in the function
Code: Select all
WorkFileName = 'wrk':FileName
XMLFileName = 'XML.':FileName
If OutputDirectoryPath = '' Then
OutputDirectoryPath = InputDirectoryPath
End
If Store = 'XGLOBAL' Then
Store=''
End
MoveCommand = 'mv ':InputDirectoryPath:'/':FileName:' ':InputDirectoryPath:'/':WorkFileName
CountCommand = 'wc ':InputDirectoryPath:'/':WorkFileName
RemoveCommand = "rm ": InputDirectoryPath:"/":XMLFileName:" ": InputDirectoryPath:"/":WorkFileName
Call DSExecute('UNIX',RemoveCommand ,Output,ReturnCode)
CALL DSExecute('UNIX',MoveCommand,Output,ReturnCode)
If ReturnCode<> 0 Then
ReturnCode= ReturnCode:'-':Output
Goto Exit
End
Call DSExecute('UNIX',CountCommand,Output,ReturnCode)
If ReturnCode <> 0 Then
ReturnCode = ReturnCode :'-':Output
Goto Exit
End
RecordCount = Left(TRIM(Output),index(TRIM(Output)," ",1)-1)
HdrXML = '<Header line_count="':RecordCount:'"': ' download_id="':FileName:'"':' target_org_node="':Store:'"': ' download_time="IMMEDIATE" apply_immediately="true" />'
XMLCreateCommand = "echo ":"'": HdrXML :"'": " >": InputDirectoryPath:"/":XMLFileName
PrependHdrCommand = "cat " : InputDirectoryPath:"/":XMLFileName:" ": InputDirectoryPath:"/":WorkFileName : " > " :OutputDirectoryPath:"/":FileName
RemoveCommand = "rm ": InputDirectoryPath:"/":XMLFileName:" ": InputDirectoryPath:"/":WorkFileName
Call DSLogInfo( 'XMLCreateCommand --' : XMLCreateCommand, 'jobcontrol')
Call DSLogInfo( 'PrependHdrCommand --' : PrependHdrCommand, 'jobcontrol')
Call DSLogInfo( 'RemoveCommand --' : RemoveCommand , 'jobcontrol')
Call DSExecute('UNIX',XMLCreateCommand:";":PrependHdrCommand:";": RemoveCommand ,Output,ReturnCode)
If ReturnCode <> 0 Then
ReturnCode = ReturnCode :'-':Output
Goto Exit
End
Exit:
Ans=ReturnCode
In normal Mode it cannot get pass the Transformer where this function is used and comes back with an error.Log indicates the error on a stage that is used before so many stages before the Transformer. It shows the correct Link count of the link which is input to the Transformer.But it does not get pass the transformer
What am I missing here?