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 - 1240 days ago
Last viewed on: 20 Feb 2018 (2949 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: 3 years 4 months 23 days 22 hours 33 minutes ago
Edited: Tue, 30 Sep, 2014 at 09:41:32 (1240 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: 3 years 4 months 23 days 20 hours 22 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.