Measure Reference Manual
Example
These are simplified examples in pTAL pseudo code of how LISTGNAME could handle ANSI SQL
names:
Example of iterative calls:
index := -1f;
do
begin
if (error := measlistgname(dfnum,
ansi_name,
ansi_name_len,
guardianname,
sys,
!pathid!,
!crvsn!,
!partname!,
!partname_max!,
!partname_len!,
index,
MEAS_ANSI_SQL_NAME )) then
! handle error
else if guardianname <> " " then
begin
! display guardian filename
if partname_len then
! display the partition name
end
else
! display the TABLE or INDEX name
end
until (index < 0f);
Example of non-iterative calls:
! get the Guardian file name and crvsn for an ANSI SQL name
! with partition
if ( error := measlistgname(-1,
ansi_names,
ansi_name_len,
guardianname,
!sysname!,
!pathid!,
crvsn,
!extname!,
!extname_max!,
!extname_len!,
!index!,
MEAS_ANSI_SQL_NAME,
connectionInfo)) then
return error;
MEASLISTGNAME 407