|
| select records from specific file member |
 |
Wed, 05 Dec 2007 09:56:05 EST |
|
| Post Reply
|
| Re: select records from specific file member |
 |
Wed, 05 Dec 2007 10:55:25 EST |
I've determined that in order to access the specific member, I first need to
create an alias for that member and then use the alias in my select
statement.<br />
<br />
So in QM, I've entered the following:<br />
<br />
create alias my_alias for lib/file/member<br />
select * from my_alias<br />
<br />
however I get the error:<br />
<br />
Keyword SELECT not expected. Valid tokens:
<END-OF-STATEMENT><br />
<br />
|
| Post Reply
|
| Re: select records from specific file member |
 |
Wed, 05 Dec 2007 11:37:34 EST |
Well, I finally figured out how to create the alias. My problem was trying to
combine both the create alias and select statement in one query. So first I ran
an interactive query for just the create alias and that ran successfully. Next
I ran a new interactive query for the select statement using the alias I created
and it worked.<br />
<br />
|
| Post Reply
|
| Re: select records from specific file member |
 |
Wed, 5 Dec 2007 19:55:59 -0500 |
Alias is created permanently in whatever you have as *CURLIB or maybe QGPL,
I think. Personally, for such things I hardcode QTEMP, and the alias goes
away automatically when the job ends.
You can drop the alias. As I recall, you have to say "DROP TABLE
aliasname".
Sam
<pgrimard@gmail.com> wrote in message
news:1518036920.1196872684931.JavaMail.wassrvr@ltsgwas010.sby.ibm.com...
> Well, I finally figured out how to create the alias. My problem was
> trying to combine both the create alias and select statement in one query.
> So first I ran an interactive query for just the create alias and that ran
> successfully. Next I ran a new interactive query for the select statement
> using the alias I created and it worked.<br />
> <br />
> This leads me to a new question. What is the life span of an alias
> created in qm? After creating the alias, I exited qm and logged out of
> the server. Then I came back in, started up qm and my alias still
> existed.
|
| Post Reply
|
| Re: select records from specific file member |
 |
Thu, 06 Dec 2007 13:30:40 EST |
|
| Post Reply
|
|
|
|
|
|
|
|
|
|