“.” in file name in COBOL

40 pts.
Tags:
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.

Answer Wiki

Thanks. We'll let you know when a new response is added.

<pre>
SELECT PFILE ASSIGN TO “DATABASE-P.FILE”.
</pre>

works for me.

Bruce Vining
<a href=”http://www.brucevining.com/”>http://www.brucevining.com/</a>

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

——————————————————-

Try:

<pre>
COPY DDS-ALL-FORMATS OF “P.FILE”
REPLACING == P.FILE-RECORD == BY == PFILE-RECORD ==.
</pre>

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
<a href=”http://www.brucevining.com/”>http://www.brucevining.com/</a>

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gilly400
    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.
    23,730 pointsBadges:
    report
  • Ghhh
    Bruce, Thanks that did it, what about the COPY DDS for it though, the quotes don't work,
    40 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following