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

x
  • 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?
0
jfvon
Asked:
jfvon
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


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

Tom
0
 
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.
0

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