Beispiel #1
0
zOPER_EXPORT zSHORT OPERATION
VML_StartHelp( zVIEW vSubtask )
{

   zCHAR  szBuffer[60];
   zPCHAR pszText;

   zSHORT nRC;
   zSHORT i;
   zSHORT j;

   zVIEW  vProfileXFER;


   // GET ADDRESS OF THE STRING FOR THE TEXT IN THE LIST BOX
   GetProfileView( &vProfileXFER );
   GetAddrForAttribute( &pszText,       /* Return Address */
                        vProfileXFER,  /* View Id */
                        "VML_Text",    /* Entity name */
                        "Text" /* Attribute Name */ );

   // EXTRACT FIRST ALL CAP WORD FROM pszText
   i = 0;
   j = 0;

   // look for first cap
   while ( !isupper( pszText[ i ] ) &&  /* not upper case */
           pszText[ i ] != 0 )          /* not null terminator */
   {
      i++;
   }

   // if no cap is found, no help is available. get out now.
   if ( pszText[ i ] == 0)
   {
      MB_SetMessage( vSubtask, 0, "Help for this operation is not currently available." );
      return( 0 );
   }

   // copy first all cap word into the buffer
   while ( isupper( pszText[ i ] )  &&      /* upper case */
           pszText[ i ] != 0 &&             /* not null terminator */
           j < 59 )                         /* room left in buffer */
   {
      szBuffer[ j++ ] = pszText[ i++ ];
   }
   szBuffer[j] = 0;

   // CALL HELP
   nRC = StartZeidonHelp( vSubtask, szBuffer );

   // IF HELP WAS NOT FOUND, NOTIFY THE USER.
   if ( nRC == zCALL_ERROR )
   {
      MB_SetMessage( vSubtask, 0, "Help for this item is not available." );
   }

   return( 0 );
}
Beispiel #2
0
/////////////////////////////////////////////////////////////////////////////
//
// OPERATION:    zwTZZMAIND_Postbuild
//
// PURPOSE:
//
/////////////////////////////////////////////////////////////////////////////
zOPER_EXPORT zSHORT OPERATION
zwTZZMAIND_PostBuild( zVIEW vSubtask )
{
   zSHORT nRC;
   zCHAR  szLPL_Name[ 34 ];
   zVIEW  vLPL;
   zVIEW  vMetaList;

   InitializeLPLR( vSubtask, "" );
   nRC = GetViewByName( &vLPL, "TaskLPLR", vSubtask, zLEVEL_TASK );
   if ( nRC > 0 )
   {
      GetStringFromAttribute( szLPL_Name, vLPL, "LPLR", "Name" );
      SetWindowCaptionTitle( vSubtask, 0, szLPL_Name );
   }

   // Get view to all list types
   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_SA_META );
   SetNameForView( vMetaList, "TZERDS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_SA_META );
   SetNameForView( vMetaList, "TZERDR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DOMAIN_META );
   SetNameForView( vMetaList, "TZDMNS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DOMAIN_META );
   SetNameForView( vMetaList, "TZDMNR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DTE_META );
   SetNameForView( vMetaList, "TZDBMS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DTE_META );
   SetNameForView( vMetaList, "TZDBMR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_LOD_META );
   SetNameForView( vMetaList, "TZLODS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_LOD_META );
   SetNameForView( vMetaList, "TZLODR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DIALOG_META );
   SetNameForView( vMetaList, "TZDLGS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DIALOG_META );
   SetNameForView( vMetaList, "TZDLGR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_PENV_META );
   SetNameForView( vMetaList, "TZPENS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_PENV_META );
   SetNameForView( vMetaList, "TZPENR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_GO_META );
   SetNameForView( vMetaList, "TZOPRS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_GO_META );
   SetNameForView( vMetaList, "TZOPRR", vSubtask, zLEVEL_TASK );

   MB_SetMessage( vSubtask, 1, "?" );
   MB_SetMessage( vSubtask, 2, "*" );
   return( 0 );
}
Beispiel #3
0
zOPER_EXPORT zSHORT OPERATION
VML_SelectItem( zVIEW vSubtask )
{
   MB_SetMessage( vSubtask, 0, "Press F1 for Help on this item." );

   return( 0 );
}
Beispiel #4
0
zOPER_EXPORT zSHORT OPERATION
OpIns_StartOperationHelp( zVIEW vSubtask )
{

   zVIEW  vEdWrk;
   zCHAR  szOperName[40];
   zCHAR  szOperType[ 5 ];
   zSHORT nRC;

   // FIND OUT WHAT TYPE OF OPERATION LIST IS CURRENTLY DISPLAYED.
   GetWorkView( &vEdWrk );
   GetStringFromAttribute( szOperType, vEdWrk, "OperListType", "Type" );

   // IF IT'S NOT A ZEIDON OPER LIST, GET OUT. NO HELP IS AVAILABLE.
   if ( szOperType[ 0 ] != 'Z' )
   {
      return( 0 );
   }

   // GET THE OPERATION TAG FOR THE CURRENT CURSOR POSITION.
   GetStringFromAttribute( szOperName, vEdWrk, "Oper", "Name" );

   // CALL HELP
   nRC = StartZeidonHelp( vSubtask, szOperName );

   // IF HELP WAS NOT FOUND, NOTIFY THE USER.
   if ( nRC == zCALL_ERROR )
   {
      MB_SetMessage( vSubtask, 0, "Help for this operation is not currently available." );
   }

   return( 0 );
}
Beispiel #5
0
zOPER_EXPORT zSHORT OPERATION
OpIns_RefreshSelectButton( zVIEW vSubtask )
{
   zVIEW  vEdWrk;
   zCHAR  szCurrentType[ 5 ];

   GetWorkView( &vEdWrk );
   GetStringFromAttribute( szCurrentType /* Returned String */,
                           vEdWrk /* View Id */,
                           "OperListType" /* Entity Name */,
                           "Type" /* Attribute Name */ );
   if ( zstrcmp( szCurrentType, "Z" ) == 0 )
   {
      MB_SetMessage( vSubtask, 0, "Press F1 for Help on the operation." );
   }

   RefreshCtrl( vSubtask, "SelectButton" );
   return( 0 );
}
Beispiel #6
0
///////////////////////////////////////////////////////////////////////////////
//
// OPERATION:  TZZAPPSD_SendServerExecs
//
// PURPOSE:    This Entry takes the zeidon.xdm and all xod object instances
//       and sends them to the Server for running the application on
//       the server.
//
////////////////////////////////////////////////////////////////////////
zOPER_EXPORT zSHORT OPERATION
TZZAPP2D_SendServerExecs( zVIEW vSubtask )
{
   zVIEW  vZApp;
   zVIEW  vLPLR;
   zVIEW  vMeta;
   zSHORT nRC;
   zCHAR  szFileName[ zMAX_FILESPEC_LTH + 1 ];
   zCHAR  szMetaName[ 13 ];
   zCHAR  szAppName[ 32 ];
   zCHAR  szServerSubDir[ 33 ];
   zCHAR  szLPLR_Path[ zMAX_FILESPEC_LTH + 1 ];
   zCHAR  szMsg[ zSHORT_MESSAGE_LTH + 1 ];
   zVIEW  vApplSubtask;
   zCHAR  szServer[ 33 ];

   // get XLP for selceted application
   GetViewByName( &vZApp, "KZAPPLOO", vSubtask, zLEVEL_TASK );
   GetStringFromAttribute( szAppName, vZApp, "APPLICATION", "APP_NAME" );
   GetStringFromAttribute( szLPLR_Path, vZApp, "APPLICATION", "APP_ADOBIN" );
   SysAppendcDirSep( szLPLR_Path );
   zstrcpy( szFileName, szLPLR_Path );
   zstrcat( szFileName, szAppName );
   zstrcat( szFileName, ".XLP" );

   // open Task LPLR
   nRC = ActivateOI_FromFile( &vLPLR, "TZCMLPLO", vSubtask, szFileName,
                              zMULTIPLE );
   if ( nRC )
   {
      MessageSend( vSubtask, "CM00285", "Configuration Management",
                   "Can't activate XLP for task.",
                   zMSGQ_OBJECT_CONSTRAINT_ERROR, zBEEP );
      return( -1 );
   }

   SetNameForView( vLPLR, "TaskLPLR", vSubtask, zLEVEL_TASK);

   zmemset (szServer,0,sizeof(szServer));
// GetViewByName( &vLPLR, "TaskLPLR", vSubtask, zLEVEL_TASK );

   // Start the network if necessary.  Use zeidon and hzkzoe as constants for now.
   nRC = NetStatus( "zeidon" );
   if ( nRC == 0 )
   {
      nRC = NetStartup( "zeidon", "hzkzoe" );
      if ( nRC )
      {
         MessageSend( vSubtask, "CM00285", "Configuration Management",
                      "Network cannot be started.",
                      zMSGQ_OBJECT_CONSTRAINT_ERROR, zBEEP );
         return( 0 );
      }
   }

   // First get the application name and make sure it exists in the
   // zeidon.app object on the server.  If it isn't there, add it.
   GetStringFromAttribute( szAppName, vLPLR, "LPLR", "Name" );
   zstrcpy( szFileName, "zeidon.app" );
   SfCreateSubtask( &vApplSubtask, vSubtask, "Zeidon System" );
   nRC = NetActivateOI_FromFile( 0, szServer, &vMeta, "KZAPPLOO",
                                 vApplSubtask, szFileName, zSINGLE );
   if ( nRC >= 0 )
   {
      nRC = SetCursorFirstEntityByString( vMeta, "APPLICATION",
                                          "APP_NAME", szAppName, 0 );
      if ( nRC >= zCURSOR_SET )
         DropObjectInstance( vMeta );
      else
      {
         CreateEntity( vMeta, "APPLICATION", zPOS_LAST );
         SetAttributeFromString( vMeta, "APPLICATION", "APP_NAME", szAppName );
         zstrcpy( szServerSubDir, szAppName );
         zstrcat( szServerSubDir, "/" );
         SetAttributeFromString( vMeta, "APPLICATION",
                                 "APP_DLL", szServerSubDir );
         SetAttributeFromString( vMeta, "APPLICATION",
                                 "APP_ADOBIN", szServerSubDir );
         SetAttributeFromString( vMeta, "APPLICATION",
                                 "APP_LOCAL", szServerSubDir );
         TraceLineS( "*** Committing server file: ", szFileName );
         zstrcpy( szMsg, "Sending ZEIDON.APP: " );
         MB_SetMessage( vSubtask, 1, szMsg );

         // Send OI to server.
         NetCommitOI_ToFile( 0, szServer, vMeta, szFileName, zASCII );

         DropObjectInstance( vMeta );
      }
   }
   else
   {
      SfDropSubtask( vApplSubtask, 0 );
      MessageSend( vSubtask, "CM00286", "Configuration Management",
                   "ZEIDON.APP cannot be activated.",
                   zMSGQ_OBJECT_CONSTRAINT_ERROR, zBEEP );
      return( 0 );
   }

   SfDropSubtask( vApplSubtask, 0 );

   // Send the XDM before all the xods.
   // First format the file name for activation on the client and then
   // format it for commit on the server.
// GetStringFromAttribute( szFileName, vLPLR, "LPLR", "ExecDir" );
   zstrcpy( szFileName, szLPLR_Path );
   zstrcpy( szMetaName, "ZEIDON.XDM" );
   zstrcat( szFileName, szMetaName );
   TraceLineS( "*** Activating client file: ", szFileName );
   nRC = ActivateOI_FromFile( &vMeta, "TZDMXGPO", vSubtask,
                              szFileName, zSINGLE );

   if ( nRC >= 0 )
   {
      // Filename includes Directory-prefix **HH**
      GetStringFromAttribute( szFileName, vLPLR, "LPLR", "Name" );
      zstrcat( szFileName, "/" );
      zstrcat( szFileName, szMetaName );
      TraceLineS( "*** Committing server file: ", szFileName );
      MB_SetMessage( vSubtask, 1, "Sending XDM" );

      // Send OI to server.
      NetCommitOI_ToFile( 0, szServer, vMeta, szFileName, zASCII );
   }

   // Next loop through all the LODs, activating each XOD and sending
   // it to the server.
   SetCursorFirstEntityByInteger( vLPLR, "W_MetaType", "Type",
                                  zREFER_LOD_META, 0 );
   nRC = SetCursorFirstEntity( vLPLR, "W_MetaDef", 0 );
   while ( nRC >= zCURSOR_SET )
   {
      zstrcpy( szFileName, szLPLR_Path );
      GetStringFromAttribute( szMetaName, vLPLR, "W_MetaDef", "Name" );
      zstrcat( szFileName, szMetaName );
      zstrcat( szFileName, ".XOD" );
      TraceLineS( "*** Activating client file: ", szFileName );
      nRC = ActivateOI_FromFile( &vMeta, "TZZOXODO", vSubtask,
                                 szFileName, zSINGLE );
      if ( nRC >= 0 )
      {
        // Filename includes Directory-prefix **HH**
        GetStringFromAttribute( szFileName, vLPLR, "LPLR", "Name" );
        zstrcat( szFileName, "/" );
        zstrcat( szFileName, szMetaName );
        zstrcat( szFileName, ".XOD" );
        TraceLineS( "*** Committing server file: ", szFileName );
        zstrcpy( szMsg, "Sending XOD: " );
        zstrcat( szMsg, szMetaName );
        MB_SetMessage( vSubtask, 1, szMsg );

        // Send OI to server.
        NetCommitOI_ToFile( 0, szServer, vMeta, szFileName, zASCII );
      }

      nRC = SetCursorNextEntity( vLPLR, "W_MetaDef", 0 );
   }

   MB_SetMessage( vSubtask, 1, "Transmission Complete" );

   return( 0 );
}
Beispiel #7
0
zOPER_EXPORT zSHORT OPERATION
BuildXODsOnLPLR( zVIEW vSubtask )
{
   // This routine does not actually save LODs, but only builds the XODs
   // on the LPLR.

   zVIEW  vDTE;
   zVIEW  vLPLR;
   zVIEW  vLOD_List;
   zVIEW  vLOD;
   zVIEW  vXOD;
   zSHORT nRC;
   zCHAR  szMsg[ zSHORT_MESSAGE_LTH + 1 ];
   zCHAR  szLOD_Name[ 33 ];
   zCHAR  szFileName[ zMAX_FILESPEC_LTH + 1 ];

   GetViewByName( &vDTE, "TE_DB_Environ", vSubtask, zLEVEL_TASK );
   GetViewByName( &vLOD_List, "TZZOLFLO", vSubtask, zLEVEL_TASK );
   GetViewByName( &vLPLR, "TaskLPLR", vSubtask, zLEVEL_TASK );

   // Save Subtask for use by XOD build routine.
   SetNameForView( vSubtask, "TE_Window", vSubtask, zLEVEL_TASK );

   // For each selected LOD, build the XOD using the current DBMS and
   // commit as file to LPLR, unless the LOD does not have a POD.
   // Note that we are not looking to see if the DBMS identified
   // in the POD.TE_SourceZKey matches the current DBMS. We will save
   // selected LODs with the current DBMS no matter how they were saved
   // last time.

   for ( nRC = SetCursorFirstSelectedEntity( vLOD_List, "W_MetaDef", "" );
         nRC >= zCURSOR_SET;
         nRC = SetCursorNextSelectedEntity( vLOD_List, "W_MetaDef", "" ) )
   {
      GetStringFromAttribute( szLOD_Name, vLOD_List, "W_MetaDef", "Name" );

      nRC = ActivateMetaOI( vSubtask, &vLOD, vLOD_List, zREFER_LOD_META, zCURRENT_OI );
      if ( nRC < 0 )
      {
         zstrcpy( szMsg, "Could not Activate LOD: " );
         zstrcat( szMsg, szLOD_Name );
         zstrcat( szMsg, ".\nAborting Build" );
         MessageSend( vSubtask, "TE00426", "Physical Data Model",
                      szMsg,
                      zMSGQ_OBJECT_CONSTRAINT_ERROR, zBEEP );
         return( 0 );
      }
      else
      {
         // Send message that we are building the LOD.
         zstrcpy( szMsg, "Building executable for LOD: " );
         zstrcat( szMsg, szLOD_Name );
         zstrcat( szMsg, "." );
         MB_SetMessage( vSubtask, 1, szMsg );

         // Make sure the TE_SourceZKey attribute is set because it determines
         // what DBMS_Source is used in building the XOD.
         if ( CheckExistenceOfEntity( vLOD, "POD" ) >= zCURSOR_SET )
            SetAttributeFromAttribute( vLOD, "POD", "TE_SourceZKey",
                                       vDTE, "TE_DBMS_Source", "ZKey" );

         // Build the XOD in memory.
         oTZZOXODO_SaveXOD( vSubtask, vLOD );
         SetNameForView( vLOD, "TZZOLODO", vSubtask, zLEVEL_TASK );
         GetViewByName( &vXOD, "TZZOXODO", vSubtask, zLEVEL_TASK );
         DropMetaOI( vSubtask, vLOD );

         // Commit the XOD to LPLR file.
         GetStringFromAttribute( szFileName, vLPLR, "LPLR", "ExecDir" );
         ofnTZCMWKSO_AppendSlash( szFileName );
         zstrcat( szFileName, szLOD_Name );
         zstrcat( szFileName, ".XOD" );
         TraceLineS( "*** Committing workstation file: ", szFileName );
         CommitOI_ToFile( vXOD, szFileName, zSINGLE );
      }
   }

   MB_SetMessage( vSubtask, 1, "Build of XODs complete." );
   return( 0 );
}
Beispiel #8
0
/*

   This operation builds the operation list for the OperationList window.
   Depending on what the value is for vProfileXFER.ED.OpIns_CurrentType
   we build different operations lists.

*/
zOPER_EXPORT zSHORT OPERATION
OpIns_BuildOperList( zVIEW vSubtask )
{
#define DISP_SELECT_SET    1
#define SEL_SELECT_SET     2

   zCHAR  szCurrentType[ 5 ];
   zVIEW  vProfileXFER;
   zVIEW  vEdWrk;
   zSHORT nRC;
   zCHAR  szKeyword[ 255 ];
   zLONG  lSelectCount = 0;

   GetWorkView( &vEdWrk );
   GetProfileView( &vProfileXFER );
   GetStringFromAttribute( szCurrentType, vProfileXFER, "ED",
                           "OpIns_CurrentType" );

   // Default of CurrentType is 'Z'...
   if ( *szCurrentType == 0 )
   {
      zstrcpy( szCurrentType, "Z" );
      SetAttributeFromString( vProfileXFER, "ED", "OpIns_CurrentType",
                              szCurrentType );
   }

   // Check to see if the operations for the current type are already
   // loaded. If they are, then we obviously don't need to load them again.
   if ( SetCursorFirstEntityByString( vEdWrk, "OperListType", "Type",
                                      szCurrentType, 0 ) != zCURSOR_SET )
   {
      // Operations haven't been loaded yet, so load 'em up.

      CreateEntity( vEdWrk, "OperListType", zPOS_LAST );
      SetAttributeFromString( vEdWrk, "OperListType", "Type", szCurrentType );

      switch ( *szCurrentType )
      {
         case 'Z':
         {
            zVIEW vTZOPSIGK;

            // Get list of Zeidon operations.

            // Check to see if we've already activated the Zeidon opers list.
            // If not, activate it and save the view.
            GetViewByName( &vTZOPSIGK, "TZOPSIGK", vSubtask, zLEVEL_TASK );
            if ( !vTZOPSIGK )
            {
               oTZOPGRPO_GetViewForXGO( vSubtask, &vTZOPSIGK, zSYS_CURRENT_OI );
               SetNameForView( vTZOPSIGK, "TZOPSIGK", vSubtask, zLEVEL_TASK );
            }

            // Now copy each of the operations to the editor work object.
            for ( nRC = SetCursorFirstEntity( vTZOPSIGK, "Operation", 0 );
                  nRC == zCURSOR_SET;
                  nRC = SetCursorNextEntity( vTZOPSIGK, "Operation", 0 ) )
            {
               CreateEntity( vEdWrk, "Oper", zPOS_LAST );
               SetMatchingAttributesByName( vEdWrk, "Oper",
                                            vTZOPSIGK, "Operation", zSET_ALL );
            }

            break;
         } // Case 'Z'...

         case 'G':
         {
            zVIEW vOp;

            // Get list of Global operations.

            RetrieveViewForMetaList( vSubtask, &vOp, zREFER_GO_META );

            // Now copy each of the operations to the editor work object.
            for ( nRC = SetCursorFirstEntity( vOp, "W_MetaDef", 0 );
                  nRC == zCURSOR_SET;
                  nRC = SetCursorNextEntity( vOp, "W_MetaDef", 0 ) )
            {
               CreateEntity( vEdWrk, "Oper", zPOS_LAST );
               SetMatchingAttributesByName( vEdWrk, "Oper",
                                            vOp, "W_MetaDef", zSET_ALL );
            }

            DropView( vOp );

            break;
         } // Case 'G'...

         case 'L':
         {
            zVIEW vMeta;
            zLONG lMetaType;

            // Get list of "Local" operations.  "Local" operations in this
            // case mean all operations that are for the current meta.
            // For example, if the current meta is a Dialog, then the "Local"
            // operations include local and Dialog operations.

            // Get the source view and the meta type.
            GetIntegerFromAttribute( (zPLONG) &vMeta, vEdWrk, "Buffer",
                                     "SourceViewID" );
            GetIntegerFromAttribute( &lMetaType, vEdWrk, "Buffer",
                                     "MetaType" );

            // Create a new, temp view of the meta so that we can muck around
            // with the cursors.
            CreateViewFromViewForTask( &vMeta, vMeta, 0 );

            //
            // Now copy the "Local" meta operations to vEdWrk.
            //

            if ( lMetaType == zREFER_DIALOG_META ||
                 lMetaType == zREFER_LOD_META )
            {
               // Make sure we are reading the "Local" operations for
               // the current source file.
               SetCursorFirstEntityByAttr( vMeta, "SourceFile", "Name",
                                           vEdWrk, "Buffer",
                                           "SourceFileName", 0 );
            }

            // Copy all the operations to vEdWrk
            for ( nRC = SetCursorFirstEntity( vMeta, "Operation", 0 );
                  nRC == zCURSOR_SET;
                  nRC = SetCursorNextEntity( vMeta, "Operation", 0 ) )
            {
               CreateEntity( vEdWrk, "Oper", zPOS_LAST );
               SetMatchingAttributesByName( vEdWrk, "Oper",
                                            vMeta, "Operation",
                                            zSET_ALL );
            }

            DropView( vMeta );

            break;

         } // Case 'L'...

         case 'O':
         {
            // Since we load the object operations by object, we don't have
            // to do anything here.
            break;

         } // Case 'O'...

         default:
            SysMessageBox( "Zeidon Internal",
                           "This operation type not yet supported", 0 );
            break;

      } // switch ( *szCurrentType )...

      // Now that we've loaded the operations, sort them.
      OrderEntityForView( vEdWrk, "Oper", "Name A" );

   } // if ( SetCursor...)...

   // Disable the "Objects" button unless we are showing object operations.
   if ( *szCurrentType == 'O' )
      SetCtrlState( vSubtask, "ListObjects", zCONTROL_STATUS_ENABLED, TRUE );
   else
      SetCtrlState( vSubtask, "ListObjects", zCONTROL_STATUS_ENABLED, FALSE );

   // Now set the select states depending on the keyword values.
   GetStringFromAttribute( szKeyword, vProfileXFER, "ED", "OpIns_Keyword" );
   if ( *szKeyword &&
        CompareAttributeToString( vProfileXFER,
                                  "ED", "OpIns_UseKeyword", "Y" ) == 0 )
   {
      zCHAR  szIgnoreCase[ 5 ];
      zPCHAR pszKeyword;
      zBOOL  bStartColOne;
      zSHORT nKeywordLth;

      // De-select all operations.
      SetAllSelectStatesForEntity( vEdWrk, "Oper", FALSE, 0 );

      GetStringFromAttribute( szIgnoreCase, vProfileXFER, "ED",
                              "OpIns_KeywordIgnoreCase" );
      if ( *szIgnoreCase == 'Y' )
      {
         for ( pszKeyword = szKeyWord; *pszKeyword; pszKeyword++ )
            *pszKeyword = ztoupper( *pszKeyword );
      }

      // If the keyword starts with a "/", then the keyword search starts
      // with the first zCHAR (e.g. column) ONLY.
      pszKeyword = szKeyword;
      if ( *pszKeyword == '/' )
      {
         pszKeyword++;
         bStartColOne = TRUE;
         nKeywordLth = zstrlen( pszKeyword );
      }
      else
         bStartColOne = FALSE;

      for ( nRC = SetCursorFirstEntity( vEdWrk, "Oper", 0 );
            nRC == zCURSOR_SET;
            nRC = SetCursorNextEntity( vEdWrk, "Oper", 0 ) )
      {
         zCHAR  szOperName[ 255 ];

         GetStringFromAttribute( szOperName, vEdWrk, "Oper", "Name" );
         if ( *szIgnoreCase == 'Y' )
            strupr( szOperName );

         if ( bStartColOne )
         {
            if ( zstrncmp( szOperName, pszKeyword, nKeywordLth ) == 0 )
            {
               SetSelectStateOfEntity( vEdWrk, "Oper", TRUE );
               lSelectCount++;
            }
         }
         else
         {
            if ( strstr( szOperName, pszKeyword ) )
            {
               SetSelectStateOfEntity( vEdWrk, "Oper", TRUE );
               lSelectCount++;
            }
         }
      } // for...
   }
   else
   {
      // Select all operations.
      SetAllSelectStatesForEntity( vEdWrk, "Oper", TRUE, 0 );
      lSelectCount = CountEntitiesForView( vEdWrk, "Oper" );
   }

   //SetSelectSetForView( vEdWrk, nOldSelectSet );
   SetCursorFirstSelectedEntity( vEdWrk, "Oper", 0 );
   LB_SetDisplaySelectSet( vSubtask, "OperationList", DISP_SELECT_SET );
   LB_SetSelectSelectSet( vSubtask, "OperationList", SEL_SELECT_SET );

   // Re-use szKeyword to set the message...
   sprintf( szKeyword, "%d Operations listed", lSelectCount );
   MB_SetMessage( vSubtask, 0, szKeyword );

   RefreshWindow( vSubtask );

   return( 0 );

} // OpIns_BuildOperList