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 - 3494 days ago
Last viewed on: 23 Apr 2024 (5434 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.

 

Thanks

GF

 

 

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

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: External DS in free form
Posted: 9 years 6 months 26 days 10 hours 36 minutes ago
Edited: Tue, 30 Sep, 2014 at 09:41:32 (3494 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:

DCL-DS PgmSts   EXTNAME('PGMSTSDS') PSDS  END-DS;
Posted by: GFuste
Premium member *
Jacksonville, FL
Comment on: External DS in free form
Posted: 9 years 6 months 26 days 8 hours 25 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.

GF