Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > C Language Library Reference > Clib File Input and Output Methods > Clib Read From File MethodThe Clib Read From File method reads data from an open file that you specify in the filePointer argument. It then stores this data in an argument, buffer, or BLOB that you specify. If this argument, buffer, or BLOB does not exist, then this method creates it. It returns one of the following values:
Format AClib.fread(destBuffer, bytelength, filePointer) Format BClib.fread(destVar, varDescription, filePointer) Format CClib.fread(blobVar, blobDescriptor, filePointer) ArgumentsTable 141 describes the arguments for the Clib Read From File method.
Format of the Data That the Clib Read From File Method ReadsTable 142 describes the format of the data that the Clib Read From File method reads. You specify this format in the varDescription argument. If the destVar argument must hold a single datum, then you must set the varDescription argument to one of these formats. If the destVar contains blob data, then you must specify a blobdescriptor argument. A blobdescriptor can also consist of varDescriptions for the individual elements of the blobdescriptor. The following code includes example formats: ClientDef = new blobDescriptor(); Usage for the Clib Read From File MethodThe Siebel eScript usage of fread differs from the standard C library usage in that the C library reads an array of numeric values or structures into consecutive bytes in memory. The Clib Read From File method reads data in the byte-order that the current value of the BigEndianMode global variable describes. ExampleThe following example reads the following items from the fp file: |
Siebel eScript Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |