Dan,

Many years ago, we had a similar problem. How to retrieve a value in a CL program using an SQL statement. I ran across a LOOKUP command written by Michael Sansoterra. It allows you to retrieve a value in CL using an SQL statement. I tried to look it up on the web, but couldn't find it anywhere. Looking at the date on the programs, I see I implemented it in 2003. It consists of a command, an SQLRPGLE program and a panel group object for the help text. If you are interested in it, I could send you the source for the 3 objects. We are using it on V7R1 currently.

Dean Eshleman
Software Development Architect
Everence

1110 North Main Street
PO Box 483
Goshen, IN 46527
(800) 348-7468 ext. 3528
(574) 533-9515 ext. 3528
everence.com<http://www.everence.com/>

On 8/18/2017 4:18 PM, Dan wrote:
I have a CREATE TABLE in a CLLE program that queries SYSCOLUMNS for one
record (never more than one record, could be zero) and I need the value
from one field.

I tried DCLF SYSCOLUMNS and did an override to the file created by CREATE
TABLE, but upon doing a RCVF, I got CPF428A (Open failed because "The
format for file TMPSYSCOLS contains one or more large object fields and the
open request did not indicate that large object fields could be processed
by the user of the open."

I did specify AlwGraphic(*Yes) on the DCLF because it wouldn't compile
without it. But I see no option on DCLF or RCVF to process or ignore
"large object fields".

So, I am changing the query in the aforementioned CREATE TABLE to select
the one field I need. Now the table has the field, but since it is created
on the fly, I have nothing at compile time for a DCLF, and I'd really like
to avoid creating a permanent file for this. It would just be freaking
useful to be able to do a SELECT INTO in CL like we can in RPG.

Don't know if the "late Friday after a long week brain fry" is affecting my
memory, but is there a way to do this without creating a permanent file
needed to compile the program?

FWIW: We're on v7r1 with the latest TRs.

- Dan


Dean Eshleman
Software Development Architect
Everence

1110 North Main Street
PO Box 483
Goshen, IN 46527
(800) 348-7468 ext. 3528
(574) 533-9515 ext. 3528
everence.com<http://www.everence.com/>

______________________________________________________________________
Confidentiality Notice: This information is intended only for the individual or entity named. If you are not the intended recipient, do not use or disclose this information. If you received this e-mail in error, please delete or otherwise destroy it and contact us at (800) 348-7468 so we can take steps to avoid such transmission errors in the future. Thank you.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.