Link to home
Start Free TrialLog in
Avatar of moletech
moletechFlag for United States of America

asked on

script to stop/start writers in IBM os from android phone

Been looking for quite some time for an easier way to stop and restart a writer from my Android device.   There might be other things I'd like to do but I want to start with this one.

Currently I use a 5250 client to achieve this but I'd like a script I can run with just one touch.
All I want it to do is
endwtr prt01 *immed
strprtwtr prt01

That's it.  I've been able to achieve this task in windows with a batch file that using ftp command line but I'd like to do this with Android and have an icon on the screen to run the script that restarts the writer.  

any suggestions?
SOLUTION
Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of moletech

ASKER

ok I tried this and it looks very straightforward.  SSHD is started and in listening on port 22,  I checked in system I navigator and it shows the PACE is installed.  when I try   sys 'endwtr prt01 *immed'  script kitty says it completed but when I go to WRKWTR screen, the status is still Started.
Script Kitty probably just sees that the PASE "sys" command completed.  It won't have good visibility to the endwtr command.  Couple of thoughts:

Make sure you used single quotes.  "*" character has special meaning in PASE (wildcard), and if you double quote the wrkwtr command or don't quote it at all, "*" might mess things up.

Test manually.  Log onto green-screen session, CALL QP2TERM to get into PASE, and execute commands manually.  See if you get errors and if so post here.

Also, you may want to putty or other ssh client to remote in manually and execute in ssh shell.  Sometimes things work a little different in ssh session than in QP2TERM session.
Another alternative is to write a CL that contains the commands you want to execute, if you know how to do that, and then just call it:

sys 'CALL MYLIB/MYCLPGM'

Makes it easier to do error handling, complex operations, etc, especially if you aren't familiar with PASE.