Thanks

I had used the Union on my select.

However, I was trying to incorporate this into an old rpg program using setll, read
Without totally rewriting, since it is vendor code.

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> On Behalf Of Charles Wilt
Sent: Wednesday, May 23, 2018 1:59 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: multi format logical in sql

No.

Best you can do is a UNION
select <...> from file1
UNION ALL
select <...> from file2

however, you have to have a compatible set of columns from both files.

select charfld1 as fld1, ' ' as fld2, numfld2 as fld3 from file1 UNION ALL select char(numfld1), charfld2, 0 from file2

Charles


On Wed, May 23, 2018 at 11:46 AM, Smith, Mike <Mike_Smith@xxxxxxxxxxxxxxxx>
wrote:

I have a multi format logical file. This file has some select omit
criteria and a couple of the formats use fields not in the others,
and is keyed.

I'm trying to determine if I can recreate this via sql.

I think I have successfully created a select statement, but I'm not
having much luck creating a view or index

I thought that I might be able to remove the selection criteria and
order and create a view, then maybe create an index over the view

But I'm not having any luck at all.

Can I do this?

Any examples on how to accomplish this?

Thanks

Mike
NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this
message in error, or are not the named recipient(s), please
immediately notify the sender and delete this message.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.