home *** CD-ROM | disk | FTP | other *** search
- .Na "dbaltlen"
- .Aa
- .Fu
- Return the maximum length of the data for a particular compute column.
- .Ih "compute column, returning maximum length of data for a"
- .Sy
- .Sf "DBINT dbaltlen(dbproc, computeid, column)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "int" "computeid"
- .Sp "int" "column"
- .Co
- .Bl
- This routine returns the maximum length for a
- column in a compute row.
- In the case of variable length data,
- this is not necessarily the actual length of the data, but rather the
- maximum length. For the actual data length, use
- .I "dbadlen()."
- .sp
- For example, given the SQL statement:
- .SD
- .in +5n
- .ne 3
- select dept, name from employee
- order by dept, name
- compute count(name) by dept
- .in -5n
- .ED
- the call
- .I "dbaltlen(dbproc, 1, 1)"
- returns 4 because counts
- are of SYBINT4 type, which is 4 bytes long.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi computeid
- The id that identifies the particular compute row of interest.
- A SQL SELECT statement may have multiple COMPUTE clauses,
- each of which returns a separate compute row.
- The \f2computeid\f1 corresponding to the
- first COMPUTE clause in a SELECT is 1.
- The \f2computeid\f1 is returned by \f2dbnextrow()\f1
- or \f2dbgetrow().\f1
- .Pi column
- The number of the column of interest. The first column is number 1.
- .in -.375i
- .Re
- .br
- The maximum length, in bytes, possible for the data in a
- particular compute column. -1 is returned if there
- is no such column or COMPUTE clause.
- .Sa
- dbadata,
- dbadlen,
- dbalttype,
- dbgetrow,
- dbnextrow,
- dbnumalts
-