Menu

MSM to GT.M

2005-05-13
2012-12-29
  • Xavier Guardiola

    Dear all,
    We are currently evaluating the viability of migrating an existing application from MSM to GTM.
    However we are facing some --you may say naive-- questions that, although we have read the Admin + Programming Manuals, we have not been able to get through. Namely:

    1. In MSM we have a hierachical data structure: *Volume* which may include several *UCI* which may, on their turn, include *globals*. Which is the equivalent structure in GTM? We've been playing with regions->segments->name but have not been able to understand the idea.
    What does name stand for?
    Which is the role of the segment?
    Is there any correspondece between volume>UCI>globals and region>segment>name?

    2. Could anyone give us a simple example of how to set the value of a new variable IN some specific region/name? In MSM you can set a variable to some UCI (data folder), how could yo do that with GTM?

    3. How do you list globals in GTM? Is there any command similiar to 'List Globals' LGB in GTM?

    Thanks in advance!

    Xavier.

     
    • K.S. Bhaskar

      K.S. Bhaskar - 2005-05-13

      Xavier --

      Although the M dialects of MSM and GT.M are close (except for anything beginning with Z), the environments are very different.  GT.M doesn't use UCI and Volume, but instead uses $ZGbldir and $ZROutines (which I think are more powerful).  Many of your questions are answered in the GT.M Acculturation live CD.  Download it from the GT.M project page at Source Forge, burn it, boot it, and work through the exercises, and much will be clear.  If your questions are not answered after working through it, please ask again.

      You can use GT.M global directories to specify which variables map to which regions - and you can change $ZG on the fly.

      Look at ZWR for listing globals.

      Regards
      -- Bhaskar

       
      • Xavier Guardiola

        OK,
        I'll do it.
        Thanks!

        Xavi.

         
    • Xavier Guardiola

      Bhaskar,
      Having worked through the Acculturation CD has indeed improved my global vision of how GT.M works. I see now that it relies heavily on Linux OS to manage users, acces and permissions. Regarding the database, I understand that globals are logically stored in regions which, finally, are linked to physical file. However there something still not clear to me, that is: if I want to store a global in a certain region, how can I do it? only via GDE? or is it posible, from the GTM prompt, to specify to the SET command in wich region the global must be stored?
      Finally, how can I define a range of variables for a region?
      Thanks in advance and congratulations for the Acculturation CD!

      Xavi.

       
      • K.S. Bhaskar

        K.S. Bhaskar - 2005-05-18

        You will need to set up a global directory and use extended references.

        Of course, it is possible to create global directories on the fly for ad-hoc mapping (create an input script for GDE to create a new global directory and run it from within GT.M then use that global directory in an extended reference).

        Use the GDE add -name command to create a new range of names and to map it to a region.

        -- Bhaskar

         
        • Xavier Guardiola

          What is an extended reference?

          Thanks for your patience!

          Xavi.

           
          • K.S. Bhaskar

            K.S. Bhaskar - 2005-05-18

            Look in the section on Global Variable Name Environments in Chapter 5 of the Programmers Guide.

            -- Bhaskar

             
    • Xavier Guardiola

      OK thanks,
      BTW, the command ZWR lists locals not globals, what we were looking for was the equivalent to the MSM GL (Global List). Is there any similar command?
      Thanks!

      Xavi.

       
      • K.S. Bhaskar

        K.S. Bhaskar - 2005-05-19

        ZWRite does globals too.  Check out the ZWR examples in the Programmers Guide.

        You may also find the utility ^%G helpful.  Again refer to the PG for details.

        -- Bhaskar

         
    • Xavier Guardiola

      Thanks a lot.
      The PG explains it all.

      Xavi.

       

Log in to post a comment.