PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Providex Plus Button return to Nomads panel after CALL directive.  (Read 2005 times)

bmohrhardt

  • Silver Member
  • ***
  • Posts: 23
    • View Profile
Hello Forum :

      We have a Nomads panel with several buttons. As shown in the attached Button Properties, the button makes a CALL to a program that generates a .pdf of a Packing Slip. When we click on the button, the pdf does get created, but when the program hits the EXIT directive, it does not return to the original panel. Is there a better method to execute a program, and return focus to the original panel?

       Thanks,
       Bill.

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Providex Plus Button return to Nomads panel after CALL directive.
« Reply #1 on: July 29, 2019, 04:29:11 PM »
Bill

Where does it return to after the CALL is executed?
How does the CALLed program exit when done (EXIT, END, QUIT, ...)?

Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

bmohrhardt

  • Silver Member
  • ***
  • Posts: 23
    • View Profile
Re: Providex Plus Button return to Nomads panel after CALL directive.
« Reply #2 on: July 29, 2019, 04:45:03 PM »
Hello Mike :

      It does return to the main window, where the PROCESS "CST-MAINT","SUCU.en" command was executed, from a Windx prompt 1}. If we Ctrl-C out at that point, it is at a TCB(13)=2, in program /0/pxp15/lib/_winproc. We are on PxPlus 15.10 running on CentOS Linux, and the client stations are Ubuntu 14.04 & Ubuntu 16.04 running Windx via Wine.

      The other buttons on the panel return to the panel after closing them out.

       Bill.

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Providex Plus Button return to Nomads panel after CALL directive.
« Reply #3 on: July 29, 2019, 04:54:47 PM »
Is it possible the program issues a BEGIN or CLEAR which would close the current session work files (ones opened by Nomads)?
Also these may (depending on your settings) close the current window.

Basically, what does the call program do?
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

bmohrhardt

  • Silver Member
  • ***
  • Posts: 23
    • View Profile
Re: Providex Plus Button return to Nomads panel after CALL directive.
« Reply #4 on: July 29, 2019, 05:10:52 PM »
Hello again Mike :

      The program is passed a Sales Order #, and it reads several files, all of which are OPENed with UNT, and closed before EXIT. The CALLed program does not have any BEGIN or CLEAR statements. There are other CALLs that are made, each having their own EXIT. Ultimately, the program generates a pdf file of a Packing Slip. We put several ESCAPE statements in, to prove that it was executing each of the programs. One other button on the same panel calls a character-based program, the old _mwin.utl, and prompts for <Enter> to exit window. Pressing <Enter> clears the window, and returns focus to the
original panel, as shown in the attachment.

        BTW, we are really starting to get pumped up about moving our character-based programs over to Nomads!

        Bill.

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Providex Plus Button return to Nomads panel after CALL directive.
« Reply #5 on: July 29, 2019, 05:24:15 PM »
Okay -- so going back to the original posting, you said

Quote
When the program hits the EXIT directive, it does not return to the original panel

So what exactly does it do when it hits the EXIT?  Does the session end? Does it break to command mode?

I might try replacing the Nomads button logic from a direct CALL to an Execute of a Call and append a MSGBOX to see if it comes back:

In other words:

Current
Function: CALL     
Parameter: "/0/NARCOA/CLIPPGM/GUI_PACKSLIP","","P34408","",""

Change to:
  Function: EXECUTE
  Parameter: CALL "/0/NARCOA/CLIPPGM/GUI_PACKSLIP","","P34408","","" ; MSGBOX "Call came back"

This will confirm that the call exited properly.

BTW: Glad to hear you are getting 'pumped' about moving to Nomads.  There are a lot of things you can do with Nomads that will make your on going development a lot easier.
By any chance are you joining us at our conference this Fall?  Registration closes this Wednesday.

 
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

bmohrhardt

  • Silver Member
  • ***
  • Posts: 23
    • View Profile
Re: Providex Plus Button return to Nomads panel after CALL directive.
« Reply #6 on: July 30, 2019, 11:32:11 AM »
So, we modified the command to an EXECUTE, and appended the MSGBOX at the end.
The MSGBOX does appear, so it is getting that far, but once we click OK on the MSGBOX, the program appears "hung" rather than returning to the original panel.
When we CTRL-C out, we are at a 2} prompt, and a DUMP shows that we are at line 1120 in /0/pxp15/lib/_winproc. The pdf file is created, and it prints, once we
modified a flag to ask it to be printed.

Thanks,
Bill.

bmohrhardt

  • Silver Member
  • ***
  • Posts: 23
    • View Profile
Hello again Mike :

        We found the culprit, and it was code in one of our CLOSE_FILES routine.

        We had a PRINT (0,ERR=*NEXT)'POP', that was unconditional. In our character-based programs, that never created a problem, BUT, that command closed our original panel.

        On the plus side though, all of our buttons work as expected!

        Our apologies for any inconvenience caused........

        Bill.

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Providex Plus Button return to Nomads panel after CALL directive.
« Reply #8 on: July 30, 2019, 02:52:56 PM »
Bill

Glad you found the issue.  That 'POP' probably closed the Nomads panel and if you didn't have a windows open the ERR=*NEXT would just ignore the error.

Best of luck on your continued development.

Perhaps you can join us at our conference this fall where we can show you some of the other new things you can with Nomads and PxPlus.

Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com