Originally posted by: rarw
Hi,
I just started working on this problem with the original person in the post (mrm). I have expereince creating maps in WTx and processing cobol files; this is my first ORACLE database task.
I have gotten Yvonne Ricard's example to work on our ORACLE database -thank you! I am working on adding complexity to the Yvonne's working example; our next hurdle is getting a date from the ORACLE database.
I have the following code(myQuery1e)in the .mdq file
select case_num, program_cd, to_char(create_dt,'MM/DD/YYYY HH24:MI:SS') as create_dt from #TEST_VAR#
The rule in the driver map (test_driver.mmc) for the override is:
=VALID(RUN("test_run.mmc"," -ID1 '-MDQ S0890.mdq -DBNAME dev3 -QUERY myQuery1e -VAR TEST_VAR="+In1Test+"' -OF1 test_var_out.txt"),FAIL(LASTERRORMSG() + LASTERRORCODE()))
This does not work.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_driver.mmc
<MapAudit StartTime="17:18:45 April 10, 2007">
<Platform> Command Server for Windows - Version 8.1(114)</Platform>
<ExecutionSummary MapStatus="Error" mapreturn="30" ElapsedSec="1.8260" BurstRestartCount="0">
<Message>FAIL function aborted map:One or more inputs was invalid8</Message>
<CommandLine>'C:\WTx\workfolder\Examples\database example\Becky\test_driver.mmc'</CommandLine>
<ObjectsFound>1</ObjectsFound>
<ObjectsBuilt>0</ObjectsBuilt>
<SourceReport card="1" adapter="File" bytes="24" adapterreturn="0">
<Message>Data read successfully</Message>
<Settings>C:\WTx\workfolder\Examples\database example\Becky\db_var.txt</Settings>
<TimeStamp>17:18:31 April 10, 2007</TimeStamp>
</SourceReport>
<TargetReport card="1" adapter="Sink" bytes="0" adapterreturn="0">
<Message>Success</Message>
<TimeStamp>17:18:47 April 10, 2007</TimeStamp>
</TargetReport>
<WorkArea type="File">
<inputarea card="1" Path="C:\WTx\workfolder\Examples\database example\Becky\test_driver.I01" TimeStamp="17:18:47 April 10, 2007" bytes="65605"/>
</WorkArea>
</ExecutionSummary>
</MapAudit>
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_run.mmc
<<MapAudit StartTime="17:18:45 April 10, 2007">
<Platform> RUN Function for Windows - Version 8.1(114)</Platform>
<ExecutionSummary MapStatus="Error" mapreturn="8" ElapsedSec="1.8130" BurstRestartCount="0">
<Message>One or more inputs was invalid</Message>
<CommandLine>'C:\WTx\workfolder\Examples\database example\Becky\test_run.mmc' -ID1 '-MDQ S0890.mdq -DBNAME dev3 -QUERY myQuery1e -VAR TEST_VAR=ED_ELIGIBILITY
' -OF1 test_var_out.txt</CommandLine>
<ObjectsFound>1</ObjectsFound>
<ObjectsBuilt>0</ObjectsBuilt>
<SourceReport card="1" adapter="DB" bytes="2464127" adapterreturn="0">
<Message>Success</Message>
<Settings>-MDQ S0890.mdq -DBNAME dev3 -QUERY myQuery1e -VAR TEST_VAR=ED_ELIGIBILITY
</Settings>
<TimeStamp>17:18:45 April 10, 2007</TimeStamp>
</SourceReport>
<WorkArea type="File">
<inputarea card="1" Path="C:\WTx\workfolder\Examples\database example\Becky\test_run.I01" TimeStamp="17:18:47 April 10, 2007" bytes="4587833"/>
</WorkArea>
</ExecutionSummary>
</MapAudit>
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What do we need to get the date from the ORACLE database? The query works as a standalone. Also, is a type tree needed for the query?
Any help will be appreciated. Thank you.
Becky
#DataExchange#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender