× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



We could use more information in order to help better, methinks.

What do you mean by a temp table? I don't know your meaning, but a table is a table is a table - you refer to it by its name and, if necessary, qualify it with its library.

You say it is not accepted - have you looked at the job log, to see what messages precede the last one? There is usually a lot of information available. Did you even use F1 to see the details - the second-level text - in order to get all the information you can before coming here?

Go to the documentation - you will see it say that your SELECT LMLTPC must return only one row - does it return more than one - you have no where clause in it, so who knows?

Again in the documentation, you will see this statement - This statement can only be embedded in an application program. Are you trying to do this on a command line?

You don't have a closing parenthesis in your statement - is that the real error?

What is astccdta.#acbalmpk? A single variable? A data structure?

If astccdta.#acbalmpk is a single variable, you can't do this - you can't put the result that has multiple columns into a single host variable.

Where are you trying to use this code? RPGLE? Then host variables and host structures need a colon before the name.

Is this in an SQL stored procedure? Then you don't need the colon.

Look at the documentation - look at the error messages - we all have learned to do that over the years - it's one of the beautiful things about this platform, the way IBM has given use useful helpful information when things go wrong.

----- Original Message -----
How do you refer to a Temp table on the i? this is not accepted:


SELECT *
INTO astccdta.#acbalmpk
FROM
(
SELECT LMLTPC
, COALESCE(IRLOC1,'') as IRLOC1
, COALESCE(IRLOC2,'') as IRLOC2
, COALESCE(IRLOC3,'') as IRLOC3
, IRPRT#
, IRQOH#
, IRWHS#
, '' as IEPRT#
, '.00' as IEQOH#
, '' as IELOC1


On Fri, Aug 23, 2013 at 9:10 AM, Hoteltravelfundotcom <
hoteltravelfun@xxxxxxxxx> wrote:

I see so that is not bad, I can just create the PF first. The thing is,
can I create the pF with DDS? This seems to be less of a problem for the
reporting tool.


On Fri, Aug 23, 2013 at 8:56 AM, Gary Thompson <gthompson@xxxxxxxxxxx>wrote:

I guess you want to use the >view which works fine< as the source
for data in a >new PF< you create ?

I guess you will create your new PF (table) with SQL DDL,
and then copy data from your >view which works fine< into
the new PF (table) ?

Steps would seem to be to:
1) create the PF with the desired CCSID.
2) copy data from view to PF (table)



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:
midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Hoteltravelfundotcom
Sent: Friday, August 23, 2013 6:36 AM
To: Midrange Systems Technical Discussion
Subject: View to create a PF?

I have a Logical view which works fine but I cannot display the data in
the Report tool because its CCSID is HEX. If I could create it to PF then I
could CHGPF on the CCSID (which CHGLF does not have.)

Can this be done?
This is the code:

CREATE VIEW astlib.acbalmpk AS (
(SELECT LMLTPC, COALESCE(IRLOC1,'') as IRLOC1,
COALESCE(IRLOC2,'')
as IRLOC2, COALESCE(IRLOC3,'') as IRLOC3, IRPRT#, IRQOH#, IRWHS#,
'' as IEPRT#, '.00' as IEQOH#, '' as IELOC1, '' as IELOC2, '' as
IELOC3, '' as IERIDC, '' as IEWHS#
FROM
(SELECT LMLTPC, LMLOC1, LMLOC2, LMLOC3 FROM ASTDTA.ICLOCMLM WHERE LMLTPC
IN ('PAL', 'RAK' ) )t1 left outer join (SELECT IRLOC1, IRLOC2, IRLOC3,
IRPRT#, IRQOH#, IRWHS# FROM ASTDTA.ICBLDTIR ) t2 On LMLOC1=IRLOC1 AND
LMLOC2=IRLOC2 AND LMLOC3=IRLOC3 ) UNION ALL (SELECT ' ' as LMLTPC, ' ' as
IRLOC1, ' ' as IRLOC2, ' ' as IRLOC3, '' as IRPRT#, '.00' as IRQOH#, '' as
IRWHS#, IEPRT#, IEQOH#, IELOC1, IELOC2, IELOC3, IERIDC, IEWHS# FROM
ASTDTA.ICBALMIE) )
--

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.