IsNewFileId property: File class

Description

This property is a file layout property. It returns a Boolean value indicating whether a FileId file record has been encountered. When the ReadRowset method reads a transaction from an input file, it examines the current file record following the transaction. If that file record is a FileId file record, IsNewFileId returns True; if not, IsNewFileId returns False.

IsNewFileId is used in combination with the SetFileId method and CurrentRecord property when reading files that require multiple file layouts.

Note:

SetFileId, CurrentRecord, and IsNewFileId don’t apply to CSV and XML format input files. You can use only fixed format files to implement multiple file layouts.

This property is read-only.

Example

&MYFILE.SetFileLayout(FILELAYOUT.SOMELAYOUT) then  /* Set the first layout */
&MYFILE.SetFileId("999", 1);  /* Set the FileId */
&SOMEROWSET = &MYFILE.ReadRowset();  /* Read the first rowset */
While &SOMEROWSET <> NULL
   If &MYFILE.IsNewFileId Then
      /* Examine &MYFILE.CurrentRecord for the next layout */
      /* Set the next layout */
      &MYFILE.SetFileId("999", 1);  /* Set the FileId */
   End-If;
   /* Process the current &SOMEROWSET */
   &SOMEROWSET = &MYFILE.ReadRowset();  /* Read the next rowset */
End-While;