CALL FMSOV (NUMEQ, IDTYPE, NUMVEC, NAME, LUX)
| Parameter | Description |
|---|---|
| INCORE | File location |
| IEXIST | Use existing file |
| NOOPEN | Do not physically open the file. |
The FMS Parameter IEXIST determines if FMS creates a new file or uses an existing file. If you know your are using an existing file (IEXIST=1), the parameters NUMEQ, IDTYPE and NUMVEC are not used and you can specify dummy arguments. If you might use an existing file or create a new one (IEXIST=2), the values specified for NUMEQ, IDTYPE and NUMVEC must match the existing file described by LUX(25). In both cases (IEXIST > 0), you must supply the file attribute list LUX(25) that was used to initially create the file.
If you are only processing one vector, it is probably better to allocate it in memory (unless you need to save it between jobs). You can create a vector file in memory by setting the INCORE parameter before calling this subroutine or by calling FMSOV2.
The vector values can be written to the opened file by using the FMSWRT subroutine.
CALL FMSOV (NUMEQ, 1, NUMVEC, 'RHS', LUX)
LOCD = 1
DO NV=1, NUMVEC
CALL FMSWRT (LUX(1), LOCD, RHS(1,NV), NUMEQ)
LOCD = LOCD + LUX(4)
END DO
Note that LUX(4) contains the record length for the file as
computed by FMS. This value may be greater
than IDTYPE*NUMEQ to align records on sector boundaries. You
should always use LUX(4) to address the vector file.