run a ‘.bat file’ with an AS400 function key

115 pts.
Tags:
.bat file
AS/400 Function Keys
I am trying to run a windows '.bat file' using an as400 function key. I have no knowledge of how to make the AS400 asign the fuction key ie F2 to the run the '.bat file'. Anyone have an idea. I have searched IBM's database and also quizzed my service providers and have received blank stares. Help would me much appreciated. Thank you in advance.

Software/Hardware used:
IBM AS400 and Windows xp or 95
ASKED: February 16, 2010  11:44 AM
UPDATED: February 17, 2010  8:08 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

One way is to use the RUNRMTCMD command. In your application program test for F2 being used. If it is, then run the RUNRMTCMD command. RUNRMTCMD CMD(‘C:\DOCUME~1\BRUCEV~1\LIST.BAT’) RMTLOCNAME(‘xxx.xxx.xxx.xxx’ *IP) RMTUSER(‘MyUser’) RMTPWD(‘yyyyyyy’) for instance will run the bat file LIST on the PC at IP address xxx.xxx.xxx.xxx using a Windows user id of MyUser and a password of yyyyyyy.

There are several other ways, but this is probably the easiest.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Rajgoaj
    Superbru, F2 can be used from your application only, I dont think there is a way to override the F2 key in OS400...... If it is in the application, then RUNRMTCMD, STRPCO & STRPCCMD will also help. Somebody correct me I am wrong.
    280 pointsBadges:
    report
  • superbru43
    Thanks for your answers guys. I managed to sort my problem. The reason I was doing this excercise was to have cash till pop open with the function key. It would seem you cannot override the F2 key so now I just need to write it to my invoice program and it will open after dunning the CL I have found and manhandled, which works. *************** Beginning of data ******************************** PGM DCL VAR(&URL) TYPE(*CHAR) LEN(123) + VALUE('"C:till.bat"') DCL VAR(&STRCMD) TYPE(*CHAR) LEN(123) STRPCO PCTA(*NO) MONMSG MSGID(IWS4010) CHGVAR VAR(&STRCMD) VALUE('C:TILL.BAT') DMPCLPGM STRPCCMD PCCMD(&STRCMD) PAUSE(*NO) ENDPGM: ENDPGM ****************** End of data *********************************** The CL pops the till neatly when called. Thanks again
    115 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following