Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Arev Form command

Hello All,

Is there a way to run an Arev(32) command from within OI? I have gone the other way and run OI commands from Arev32 before.

My client has a Bunch of old Arev form reports defined, which they would run using the TCL FORM command. I would like to be able to still use those if possible. Eventually I know they will need to be renovated, but for this pass it would be very helpful.

Gracias in advance!

Michael

Comments

  • Yes. You need to pass your Arev32 command line as the CreateParam argument into the Start_Window or Start_MDIChild function that calls your AREV32 form.
  • So if I was running from Arev32, the TCL command would be "FORM formtable recordid datatable". I just call Start_Window with the TCL command as the CreateParam?
  • That's my understanding. I haven't actually tested this, but that's what the CTO docs suggest.
  • Tried it.. I got a message that the command can only be run from Arev32.

    FORM calls V115. Any way I can call that directly from OI?
  • You can't call anything directly from OI that is in Arev32. ARev32 must always be the environment from which an ARev32 command is called.
  • Interesting.. I know how to call OI functions from within Arev32, and Arev32 does run on top of OI, but I can't call Arev stuff from within OI.

    Is there a good way around this? My client has Hundreds of these Rev form reports.

    I guess one option is to have them run from Arev32 and call all the OI windows and processes from there, but I Really don't want to do that.

    Thanks again!
  • I think it is important to remember that ARev32 is an emulator. The R/BASIC code is precompiled so that it will run within OI, but it still requires an AREV environment to run. This is why you can't expect AREV stuff to simply run within OI. The best you can do is get OI to call AREV so that it will launch specific forms, reports, etc., immediately...which was the original suggestion I provided you.
  • Thanks Don.. I have a workaround now. Within OI, I create a LOGON VOC item that will run the FORM processor and log out. Lo and behold, Arev32 can use the old RevG forms!

    When I call Arev_Standalone_Form, it calls the VOC item, prints the form letters and logs out. Previously, when I tried to pass the command via Start_Window, I got the error msg that FORM could only be run from Arev32. This way is kinda kludgey but it works.

    Thanks for your help!

    Michael
  • It might help if you posted a screen shot of your Start_Window syntax if you were at all interested in trying to get the original design intent to work. Otherwise, seems like you have a reasonably good solution and now you can move on to other things.
  • I had built a VOC in Arev32 named FORMTEST that was like this:

    TCL

    PDISK dosfile
    GETLIST listname
    FORM formtable formid datatable
    PDISK PRN

    In OI, I called Start_Window('AREV32_STANDALONE_FORM', 'FORMLIST', @window,'','') . It did indeed call the Arev32 form; but when it executed the command, I got an error message saying that it could only be run in Arev32.

    I posted my workaround. I would have loved to have it work as you specified, but I'm just glad to get the FORM process to work at all, especially using the old RevG forms.

    Thanks for all your help.

    Michael






  • Your Start_Window syntax doesn't look right to me. Where you have 'FORMLIST' is the ParentID argument. Thus, this is where @Window should go. Where you have @Window is the CreateParam argument. Thus, this is where your VOC or TCL command should go. Did you enter it here as a typo or is this the way you actually attempted to call it from within your code?
  • Typo.. I had the 2 parameters reversed.

    Lo siento!
Sign In or Register to comment.