.TH IOINIT 3F .UC .SH NAME ioinit \- change f77 I/O initialization .SH SYNOPSIS \fBlogical function ioinit (cctl, bzro, apnd, prefix, vrbose)\fP .br .B logical cctl, bzro, apnd, vrbose .br .B character*(*) prefix .SH DESCRIPTION This routine will initialize several global parameters in the f77 I/O system, and attach externally defined files to logical units at run time. The effect of the flag arguments applies to logical units opened after .I ioinit is called. The exception is the preassigned units, 5 and 6, to which .I cctl and .I bzro will apply at any time. .I Ioinit is written in Fortran-77. .PP By default, carriage control is not recognized on any logical unit. If .I cctl is .B .true. then carriage control will be recognized on formatted output to all logical units except unit 0, the diagnostic channel. Otherwise the default will be restored. .PP By default, trailing and embedded blanks in input data fields are ignored. If .I bzro is .B .true. then such blanks will be treated as zero's. Otherwise the default will be restored. .PP By default, all files opened for sequential access are positioned at their beginning. It is sometimes necessary or convenient to open at the END-OF-FILE so that a write will append to the existing data. If .I apnd is .B .true. then files opened subsequently on any logical unit will be positioned at their end upon opening. A value of .B .false. will restore the default behavior. .PP Many systems provide an automatic association of global names with fortran logical units when a program is run. There is no such automatic association in .UX f77. However, if the argument .I prefix is a non-blank string, then names of the form .BR prefix NN will be sought in the program environment. The value associated with each such name found will be used to open logical unit NN for formatted sequential access. For example, if f77 program .I myprogram included the call .nf call ioinit (.true., .false., .false., \(fmFORT\(fm, .false.) .fi then when the following sequence .nf % setenv FORT01 mydata % setenv FORT12 myresults % myprogram .fi would result in logical unit 1 opened to file .I mydata and logical unit 12 opened to file .IR myresults . Both files would be positioned at their beginning. Any formatted output would have column 1 removed and interpreted as carriage control. Embedded and trailing blanks would be ignored on input. .PP If the argument .I vrbose is .B .true. then .I ioinit will report on its activity. .PP The effect of .nf call ioinit (.true., .true., .false., \(fm\(fm, .false.) .fi can be achieved without the actual call by including ``\-lI66'' on the .I f77 command line. This gives carriage control on all logical units except 0, causes files to be opened at their beginning, and causes blanks to be interpreted as zero's. .PP The internal flags are stored in a labeled common block with the following definition: .nf integer*2 ieof, ictl, ibzr common /ioiflg/ ieof, ictl, ibzr .fi .SH FILES .ta \w'/usr/ucb/lib/libI77.a 'u .ie \nM /usr/ucb/lib/libI77.a f77 I/O library .el /usr/lib/libI77.a f77 I/O library .br .ie \nM /usr/ucb/lib/libI66.a sets older fortran I/O modes .el /usr/lib/libI66.a sets older fortran I/O modes .SH "SEE ALSO" getarg(3F), getenv(3F), ``Introduction to the f77 I/O Library'' .SH BUGS .I Prefix can be no longer than 30 characters. A pathname associated with an environment name can be no longer than 255 characters. .PP The ``+'' carriage control does not work.