× 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.



Just to be clear, the fix here was not to add "ext" to the declaration.

The fix was to remove "*all" from the "extname" definition.

This will work with SQL:
extname('ADMINMAS')

This will not work with SQL RPGLE as it does not understand any of the EXTNAME modifiers.
extname('tableName':*ALL)



The "ext" declaration has the only added impact of allowing the name of the data structure to be the name of the File.
Allowing you to possibly omit the extname definition.


From the ILE RPG Reference:
EXT
The EXT keyword is used in a free-form data structure definition to indicate that the data structure is
externally-described. If the EXTNAME keyword is not also specified, the name of the data structure is
used to locate the external file that provides the subfield definitions.
If the EXT keyword is specified, it must be the first keyword.


Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Filip Drzewiecki
Sent: Thursday, August 30, 2018 12:43 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Long names and Data structures based on SQL Table problem

@Arco

Adding ext to declaration has helped!
You are great :)!

Thanks
śr., 29 sie 2018 o 23:33 Arco Simonse <arco400@xxxxxxxxx> napisał(a):

Hi Filip,

The following code compiles well on my system:

**FREE
dcl-ds myTable ext extname('ADMINMAS') qualified alias;
end-ds;
dcl-ds myTable_X likeds(myTable);

EXEC SQL
SELECT * INTO :Mytable_x
FROM Administration_Master
WHERE Administration_Id = 1;
return;

Make sure that your filename is in uppercase when you use quotes, and
you will need the keyword EXT preceding to the EXTNAME keyword.

Hope that helps.

Regards,
-Arco

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.