Page 1 of 1
Debugging a Genie Macro
Posted: Tue Jul 09, 2019 3:37 pm
by pjshuey
I have a genie macro in Atrium to run a command line command. It works for everyone for simple things like WRKSPLF, but I have a case where it is calling a CL program and it only works for me. I have put the program in debug and run it while signed on as someone else, but it never gets to my program. Is there any way to debug the macro?
Re: Debugging a Genie Macro
Posted: Tue Jul 09, 2019 4:59 pm
by Scott Klement
No.
Genie macros don't work like executable programs, they aren't in control of the flow of the session, there's nothing to step through in them, etc. The traditional concept of a "debugger" doesn't really apply.
They're really just a list of conditions and the actions to take. When there's no matching conditions, or no more actions to take, the screen is shown to the user. So as soon as the macro stops, you'll see the screen that didn't match -- this makes them easy to manually debug. Just look at where you were when it failed, and what the macro is telling it to do. It's usually very easy to see any problems that come up.
In your example, you say it works fine with commands like WRKSPLF, but not when you do a CALL command to a program. I'm assuming the command to run is just a variable, so everything aside from the value of the command is the same in both circumstances. This implies to me that the problem isn't the macro, its that the user doesn't have the ability to run the program. Maybe the library list isn't right? Or they don't have the right authorities? These should be visible in the user's job log.
Re: Debugging a Genie Macro
Posted: Wed Jul 10, 2019 12:05 pm
by pjshuey
Scott,
The program never gets called. If I am signed on in Atrium, it works fine. If I switch user (top right) to someone else, it works, but if I sign into Atrium as that same user, it never even calls the program. It seems like authority within the macro, not the program. I am at a loss....
Thanks!
Patti
Re: Debugging a Genie Macro
Posted: Wed Jul 10, 2019 12:11 pm
by Scott Klement
You say the program doesn't get called. Well, does happen?
- Do they end up on the screen where the command would normally be run? Are there messages on that screen, or in the job log?
- Are they on a screen with no messages, if so, does the screen have slightly different identifiers than when you run it?
Re: Debugging a Genie Macro
Posted: Wed Jul 10, 2019 12:32 pm
by pjshuey
The screen in Atrium flashes like it is going to call the program. You can see the see the layout of our screen (genie skin), but then it just closes that atrium tab. I have had 3 other people try it, but it only works for me. They get no messages, no job on the IBMi...nothing.
Re: Debugging a Genie Macro
Posted: Wed Jul 10, 2019 1:39 pm
by Scott Klement
Most likely the macro has actions in it to sign the user off, and close the browser window/tab.
I'd suggest removing those actions temporarily to help you debug the macro.
Re: Debugging a Genie Macro
Posted: Wed Jul 10, 2019 3:21 pm
by pjshuey
Thanks Scott! I took your advice and removed the lines from the macro that signed the user off and was able to find my problem.