Home page  
Help >
ddlLoad() - load records into database
Version 7.11
ddlLoad() - load records into database ddlLoad() - load records into database

Prototype:
    void ddlLoad(
      CONTROL *ctl,
      char *OptionString,
      char *ArgString);

Permitted values in OptionString:
   /B  - data in InputFileName is blocked in fixed length records with no CRLF;
   /Cn - load the first n records only;
   /F  - fill null-terminated strings with blanks
   /I  - use tab settings from MODE TABSTOP
   /R  - reverse the byte order of all binary data types [must be used with /B option]

Form of ArgList:
      [<cx>] <TableName> <RDname> <InputFileName> [<skip-count>] [ERROR = <cxE>]

Description:
Loads (imports) the record images from the file given by InputFileName to the specified table.

The <cx> argument is not required. In general, it is more efficient to omit it, especially for very large record counts. It is useful primarily to operate on the loaded data after the ddlLoad() function is complete.

The file <InputFileName> can have one of three possible formats:
1) Fixed column ascii (undelimited): in this case, each column is stored in ascii in fixed columns, as defined in the RD. Each line of ascii text represents a single record; and is terminated by CR-LF.
2) Blocked format: in this case, each column is stored in fixed position in either ascii or binary format, as defined in the RD. Each file record contains a fixed number of characters, and has no terminating character(s). This mode requires the /B option on the ddlLoad() function.
3) Delimited ascii: in this case, each column is stored in variable length ascii fields, with each field being separated by a specified delimiter. The order of the fields is defined by the Delimited RD; that is:
      RD <RdName> Delimited

Refer also to the LOAD command.

Values returned in Control Structure:
Control.Ans1 Number of records loaded
Control.Ans3 Number of records loaded with errors
Control.Ans3str[] Name of input file

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.