| 
      
      
      From: David E. <de...@us...> - 2005-03-31 22:32:41
      
     | 
| Mahesh .P. Mallia wrote:
 > I am using TinyCOBOL on a local Linux FC3 distro to
 > compile my cobol progs. I need help regarding the
 > syntax to be used in the FD statement. How do I bind
 > the cobol file name with an actual external file in
 > the file system.
 > I have tried
 >
 > SELECT myFile ASSIGN TO DISK
 >
 > and then
 >
 > FD myFile
 > EXTERNAL
 > LABEL RECORDS ARE STANDARD
 > FILE IS 'infile'.
 >
 > This gives me a SEGMENTATION FAULT error on
 > compiling. If I don't give the external file clause it
 > throws the error that no external file is assigned.
 > How to solve this ?
TC does not have a ' FILE IS ...' clause.
It does have a  'VALUE OF FILE-ID IS { literal | identifier }' clause.
The 'EXTERNAL' clause will not work as in the example above. This is a bug.
However, you can bind the internal file name with the external
file-system  file name by using the 'EXTERNAL' clause in the 'SELECT'
statement .
The syntax is a follows.
SELECT ... ASSIGN TO EXTERNAL { variable | literal }
The 'EXTERNAL' clause in the 'SELECT' statement can be used to
relate internal to external filenames at run time, by using
environment variables.
An example of this can be found in 'test.code/t19/test19a.cob'.
 |