Midrange News for the IBM i Community

Posted by: George Fuste
IBM i developer
Jacksonville, FL
External DS in free form
has no ratings.
Published: 30 Sep 2014
Revised: 30 Sep 2014 - 3523 days ago
Last viewed on: 22 May 2024 (5475 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

External DS in free form Published by: George Fuste on 30 Sep 2014 view comments(2)

Feeling frustrated again with free form DS.  I need to convert the following stmt to free from and having quite a time.  No IBM examples or other user-based examples.

D ProgramStsDs   esds                         extname(pgmstsds)


Can anyone help again?  I would appreciate it.






Return to midrangenews.com home page.
Sort Ascend | Descend


(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Comment on: External DS in free form
Posted: 9 years 7 months 23 days 16 hours 46 minutes ago
Edited: Tue, 30 Sep, 2014 at 09:41:32 (3523 days ago)

The PSDS is a keyword now, rather than just the S before the "DS". I believe when you also have an external file, you can use the EXTNAME keyword, but you have to quote the file name (always). In addition, you can include everything on one line. The following may work for your example:

Posted by: GFuste
Premium member *
Jacksonville, FL
Comment on: External DS in free form
Posted: 9 years 7 months 23 days 14 hours 35 minutes ago

The syntax works great.  I had this before but I had the PGMSTSDS extname in camel case which caused a compiler error  message that it cant find the definition for PgmStsDS...

"SQL1001       External file definition for PgmStsDS not found."

Duh!  It needs to be upper case.   I guess frustration had set in.

Sorry for the dumb post but reaching out to the wise ones often sets one straight.