Question

  Asked: May 14 2008   7:37 PM GMT
  Asked by: Ghhh


"." in file name in COBOL


AS/400, COBOL

I have a file "P.FILE". I want to define it in COBOL, eg,
SELECT PFILE ASSIGN TO P.FILE, but the compiler won't accept it as it uses the period to mark the end-of-statement.
I can't rename or override the file name, it has to be P.FILE.
Any solutions would be greatly appreciated.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0




SELECT PFILE ASSIGN TO "DATABASE-P.FILE".


works for me.

Bruce Vining
http://www.brucevining.com/

Bruce, Thanks that did it! One other problem, what about the COPY DDS for it, quotes don't seem to work there

-------------------------------------------------------

Try:


COPY DDS-ALL-FORMATS OF "P.FILE"
REPLACING == P.FILE-RECORD == BY == PFILE-RECORD ==.


You will most likely get an SEU warning about invalid syntax (I did), but just ignore it. The compiler will know what to do :)

Bruce
http://www.brucevining.com/
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Gilly400  |   May 15 2008  8:30AM GMT

Hi,

Why can’t you override the file name? I don’t think you’ll be able to reference this file unless you can rename or override it.

Regards,

Martin Gilbert.

 

Ghhh  |   May 15 2008  4:44PM GMT

Bruce,
Thanks that did it, what about the COPY DDS for it though, the quotes don’t work,