I am writing a routine as follows. It selects data from Hash File.
-----------------------------------------------------------
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
LenJobName='30L'
Command = "SELECT CIRCLE FROM GEO "
Command := " WHERE CODE= ": Code :" ;"
Call DSExecute("UV",Command,Output,Code)
Ans=Output
@USER1 = Ans
MainExit:
Return(Ans)
-------------------------------------------------------------
The out I am getting as follows.
==================================
TEST #1
*******
Arg1 = 9324
Test completed.
Result = CIRCLE
MU
1 records listed.
==================================
I need to get only the value of the column,that is I need only MU .
I dont need column heading CIRCLE_CD and 1 records listed. The actual result is MU only.How to frame the query to avoid column headings.
DsRoutines
Moderators: chulett, rschirm, roy
DsRoutines
Thanks, BK
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Using a routine is going to be WAY too slow. However, the answer to your actual question is that what is returned is the entire output of the command - you have to isolate the field (line) in which your result is displayed, for example Field(Output,@FM,3,1) or simply Output<3>.
The SQL could include a SUPPRESS COLUMN HEADING clause, but the output field number would be (at a guess) 2 not 3.
But far, far better would be simply to use the hashed file as a conventional lookup, supplying a reference input to a Transformer stage.
The SQL could include a SUPPRESS COLUMN HEADING clause, but the output field number would be (at a guess) 2 not 3.
But far, far better would be simply to use the hashed file as a conventional lookup, supplying a reference input to a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hint Please....
Can you please tel me how to delimit a the following output
I am using Field function as follows
Subst = Field(Output, " ", 1)
But I am not getting value,how to delimit the following
UASL_CIRCLE_CD
MU
1
Hint please
I am using Field function as follows
Subst = Field(Output, " ", 1)
But I am not getting value,how to delimit the following
UASL_CIRCLE_CD
MU
1
Hint please
Thanks, BK
Re: Hint Please....
I got the desired output. using the command as follows.
Subst = Field(Output, @FM, 3)
where 3 is the third formated result.
thanks for reply Mr.Ray
Subst = Field(Output, @FM, 3)
where 3 is the third formated result.
thanks for reply Mr.Ray
Thanks, BK