Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send system todays date to client CORE02 - "PC iSeries Accsess for Windows version 5.9 for Win

Status
Not open for further replies.

danusko

Technical User
May 25, 2015
10
DE
Hi, i tried to googled it, i tried to find it here in forum. I am absolute newbie so sorry if it is stup... question.
I use CORE02 client. In about is this info
"PC iSeries Accsess for Windows version 5.9 for Win"

I use some of macros, which i recorded but now i try to customize keyboard. I want to use keyboard shortcut, wich send to my client window today date in some format.
Is it possible?
E.g.
I press Ctrl+m and it immediately send now 20150515.

I tried infos from this thread
Link
, but it didnt worked for me.

Thx a lot for any suggestions.
 
i tried this, but it doesnt works :(

Code:
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine

REM sub subSub1_(date_mmddyy)
sub subSub1_()
dim DATUM 
DATUM = CDec(Format(Now(), "yyyymmdd"))

   autECLSession.autECLOIA.WaitForAppAvailable
   
   autECLSession.autECLOIA.WaitForInputReady
   autECLSession.autECLPS.SendKeys DATUM 
end sub
 
Although your script may say it is using VBScript, this does not appear to be a VBScript Question.
 
What exactly isn't working? Does anything happen? Do you get an error?
 
It's only seems, that it something did, but no error, no results,no info. Sorry maybe I am in wrong threat. I use core02 and I don't understand this system very well. I am better in vba. I want this because we use it everyday and we have to manualy write something stup.. like today(). I don't believe, that there is not any easy solution to make shortcut for today. Maybe the main problem is, that I don't know, what for language is used in CORE02.😕 Sorry for that.
 
Assuming your problem is in the small amount of vbscript you have, Format is not a VBScript function, so you would need something like below:
Code:
DATUM = _
   Right(Year(Date()), 4) & _
   Right("0" & Month(Date()), 2) & _
   Right("0" & Day(Date()), 2)

The rest of the code is not VBScript, so you may need to look elsewhere for help with that part. Maybe you can find a CORE2 or AS/400 etc user group to help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top