From: Rildo P. <ri...@pr...> - 2002-09-05 20:02:35
|
Hi, On Thu, 5 Sep 2002 hud...@so... wrote: > > SELECT Student-File ASSIGN TO "GPA.DAT". > > SELECT Out-File ASSIGN TO SYS$OUTPUT. > > I think that the problem is the output name to Out-File (SYS$OUTPUT). > Modify this name and it will work. Not really that. The problem is because the file name is not within double quotes. The first SELECT is right. The second must be something like SELECT Out-File ASSIGN TO "SYS$OUTPUT". Anyway, I suspect this is not what the programmer wants. We don't have the standard output as a file name. Instead, we have STD-OUTPUT (and STD-ERROR as well) that may be used for DISPLAY statements. The other form of assignment is with a named variable. Say we declare SELECT OutFile ASSIGN to W-FILENAME. then in the data division we must define this variable: 77 W-FILENAME PIC X(80). or whatever we like. We must of course, move the actual file name to that variable, before executing any OPEN statement, or use a VALUE clause at its declaration. best regards, Rildo ------------------------------------------------------------------ Rildo Pragana FPGA/uControllers * Linux * tcl/tk R.Joaquim Nabuco,92/302 Derby http://www.pragana.net Recife, PE - Brazil 52011-000 +55-81-3223-5694 |