Announcement

Collapse
No announcement yet.

CLEANING MEMORY

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CLEANING MEMORY

    Dear friends:

    I am making a program that it manages information of several HOST computers and that then (through a script) can call and to recover files with PC/Anywhere.

    When I want to execute the SCRIPT with a SHELL command, the operating system tells me that it doesn't have enough memory. That is quite logical, since the program is quite extensive (with many options) and I also use PB/Vision library that consume additional memory.

    If I only execute the following lines (a clean executable file), it works:

    $COMPILE EXE
    CLS
    MEMPACK
    SHELL C:\AW\AW.EXE /O:S /M:S /N:C:\SCRIPTS\TRANSFER.SCR"
    END

    But, if I execute it inside the program, it doesn't work.

    Is there some way to clean the memory totally, to execute my SCRIPT and then to recover it?

    Thank



    ------------------
    Gustavo Asplanatti
    [email protected]
    Gustavo Asplanatti
    gustavoa at computecsrl.com.ar

  • #2
    You might want to look at the PB/DOS SETMEM function. I've only
    used it once, in the PBU I wrote (the PBU does the same thing as
    QPP's LoadExec%(), but with less overhead), so, I might be
    leading you nowhere, but it might bear looking into.

    Hope this helps!

    Regards,

    P.S. I found the code that I use in my PBU, with some modifications
    by myself, in a posting that Lance made a LONG time ago. I simply
    duplicated the sample code's use of SETMEM - that's why I can't
    actually give you any real information about it. Sorry.


    ------------------
    Clay C. Clear

    mailto:[email protected][email protected]</A>

    Clay Clear's Software

    [This message has been edited by Clay Clear (edited September 07, 2001).]

    Comment


    • #3
      But, if I execute it inside the program, it doesn't work.
      Can you be more specific about 'doesn't work?'

      What is it, insufficient memory error? Bad results but no error code?

      The cure depends on the diagnosis; the diagnosis depends on a complete statement of the symptoms.

      MCM

      Michael Mattias
      Tal Systems Inc. (retired)
      Racine WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Thanks to all to respond!!!

        Clay:

        I proved to use SETMEM(x) with several values. If x is bigger then -350000, the program gives an error (Error 7 at pgm-ctr: 134463), when looking for this address appears the following message: Can't find PBVUTILS.BAS. New name (including path). This file simply doesn't EXIST.
        If I use a smaller value or equal to -350000, I cannot execute the SCRIPT by ... (Not enough memory!).

        Michael... Oh sorry... Dr. Mattias:

        I believe that what I have is a hereditary illness of our dear D.O.S....
        Well, seriously... Michael, I think that with that explained to Clay I also respond your question. I believe that the PCAnywhere needs more than 350 kb to be executed and me, up to now, doesn't know how to liberate more memory. Remember you that I use the command SHELL and this loads to second copy of the command processor (COMMAND.COM) while retaining the program in memory. I could use a EXECUTE command, but once finished the execution returns to the D.O.S. prompt, and I need load some data again and execute another SCRIPT again (So many times like HOST have defined).

        I want to apologize to you for my English. In fact, I don't have the intention of being brief in my explanations, but rather it is difficult to me to translate the problems.

        Thank you again!!!



        ------------------
        Gustavo Asplanatti
        [email protected]
        Gustavo Asplanatti
        gustavoa at computecsrl.com.ar

        Comment


        • #5
          Well, now we know the problem: insufficient memory to SHELL.

          Doesn't/Didn't someone (IMS?) market some kind of software to compact memory before SHELL'ing?

          MCM

          Michael Mattias
          Tal Systems Inc. (retired)
          Racine WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            See ULTRASHELL. Very good product.
            http://www.infoms.com/ultrashl.htm

            ------------------

            Comment


            • #7
              I have used Ultrashl for years ... Alan Earnshaw sells
              it or use to .. I think his web site is www.infoms.com ... he is
              listed as an add-on vendor.

              Ultrashl free up memory when you shell ..

              Mike


              ------------------

              Comment


              • #8
                Gustavo,

                I highly doubt that this would help (comments, ideas, anybody?),
                but if you want, I can post the source code for my SHELL
                replacement PBU. I don't know if it's true, don't know why it
                wouldn't be, but the postings that I combined to come up with it
                on this BBS were both posted by Lance, both in the same topic,
                and they supposedly enable a program to run a second program
                WITHOUT loading a 2nd copy of the command processor. The code
                is in PB/DOS inline assembler, and my version of it involves
                very little coding. MOST of the coding that *I* added can be left
                out, as it pretty much only deals with how the return exit code
                is returned by the FUNCTION. The code uses a DOS &H21 interrupt
                call to load/run the 2nd program.

                Like I said, I doubt that this would make a difference in your
                situation, but I can post the source code, if you're interested.

                Regards,

                P.S. I think I'd better add this qualifier to this posting: I didn't
                mean to impugn Lance when I said "...I don't know if it's true,
                I don't know why it wouldn't be..."...Lance POSTED the code, but he
                didn't AUTHOR it. Rather he had the code snippets in his archives,
                and he posted them for the benefit of another BBS member who needed
                them. I trust Lance's programming capabilities IMPLICITLY. ::

                ------------------
                Clay C. Clear

                mailto:[email protected][email protected]</A>

                Clay Clear's Software

                [This message has been edited by Clay Clear (edited September 07, 2001).]

                Comment


                • #9
                  Mike y José:

                  Gracias.. Evidentemente Ultrashell sería la solución de mi problema.
                  Es una lástima que siempre halla que pagar para todo.

                  Clay:

                  Yes, sure... I would like to see it...

                  ------------------
                  Gustavo Asplanatti
                  [email protected]
                  Gustavo Asplanatti
                  gustavoa at computecsrl.com.ar

                  Comment


                  • #10
                    Gustavo,

                    If you want free software you can try PBSWAP.
                    http://personal.redestb.es/jmejuto/software.html



                    ------------------

                    Comment


                    • #11
                      Gracias José !!!
                      Es justo lo que estaba buscando. Funciona OK... y además tiene el código fuente... Perfecto !!!


                      ------------------
                      Gustavo Asplanatti
                      [email protected]
                      Gustavo Asplanatti
                      gustavoa at computecsrl.com.ar

                      Comment

                      Working...
                      X