Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 527
  • Last Modified:

Refer to non-standard filename in AS400 SQLRPGLE program

I would like to use an imbedded SQL statement within an AS400 SQLRPGLE program to retireve select records from a file that is named "Y.DPRMAS".  I continue to receive error message that "Object Qualified Name DPRMAS  not valid".  I was wondering if someone can give me an example of how to select records from a file with this naming convention?
1 Solution
Gary PattersonVP Technology / Senior Consultant Commented:
A few of ideas:

1) Switch the naming convention to *SYS from *SQL.  *SYS uses the "/" as a delimeter instead of the "." used by *SQL
2) Create an alias for the file (CREATE ALIAS), and use the alias.  You may run into the same delimeter issue, though.
3) Create a logical file over the file with a conforming name, and query the logical file.

- Gary Patterson

Also, maybe try [select xxx from library."Y.DPRMAS"]. Quoting the name is sometimes successful.

jfvonAuthor Commented:
Thanks to both of you for your excellent suggestions.  I found that Gary's solution is elegant because it is simple enough for someone like me to use.  Creating the LF did the trick.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now