Cobol Continuation Line for File Path

1.6k Views Asked by At

I am learning Cobol and I am struggling with declaring my file path. In the Environment Division I have the following code

SELECT Sales-File ASSIGN to 
     "C:\Users\Bogdan\Desktop\Program Cobol\Modul 14\AROMASALES.RPT"

MY File Path is too big for one line , so I should have a continuation Line. I have tried everything I could , but so far breaking the path in two lines is not working. Can you tell me atleast if it's possible to break the file path in 2 rows? Thank you !

I am sorry for my mistakes, it's my first post here. The Compiler is OpenCobol, with the 72 column format(I thought that all cobol compilers have this 72 column rule). I am trying to read a file which has a path too long for this 72 column format . I know I can change the file location, but I am wondering if , by any means, I can use a path as long as in my example.

SELECT StudentFile ASSIGN
    TO "C:\Users\BLABLA\Desktop\Program Cobol\Modul 13\Scripts\Salutare"
    ORGANIZATION IS LINE SEQUENTIAL.
1

There are 1 best solutions below

0
On

Normal continuation is done by :

  • writing your string up to col 72 (no closing quote)
  • on the next line, put a hyphen ('-') in col 7
  • on the same line, continue your string with an opening quote