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:

This will not work with SQL RPGLE as it does not understand any of the EXTNAME modifiers.

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:
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


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

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

Hi Filip,

The following code compiles well on my system:

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

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

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.


This thread ...

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

This mailing list archive is Copyright 1997-2019 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].