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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ZOC Rexx DDE help

Status
Not open for further replies.

Ozzietech

Technical User
Jun 1, 2005
29
AU
Hi All,
Im going through the process of using ZOC to do my programming on the CS1k instead of procomm plus (due to my new PC is windows 7 and cant get UWIN working on it for SSH and RLOGIN sessions).
So far so good. Very similar to aspect on the scripting side. However on Aspect i used to be able to connect to an excel spreadsheet to pull and poke data (using DDE) into individual cells on that sheet.

Has anyone been able to do the same on the rexx scripting for Zoc?
There is a bit of documentation on the web but all seems very complex.
If anyone has the code which i can modify to do what i need that would be great!
Cheers
Andrew
 
I've been working with REXX for nigh-on 25 years and I barely understood half the words in that post.

Frank Clarke
--America's source for adverse opinions since 1943.
 
Don't know what version of rexx you are using but OORexx can meddle with excel - maybe you can call OORexx to process a routine. Check out Lee Peedin or Rexx LA.


Nic
 
Im Using a terminal program called ZOC to interface to PABX systems.
It uses REXX for its macro's with some extra code to send data/commands to the terminal etc.
Basically all i need is a code so that a variable that's been specified in zoc with a value i want to be able to poke that value into a cell on an excel spreadsheet and vice versa. I want to also be able to pull data out of a specified cell in Excel to store in a variable in the REXX script.

I can do this all ok in procomm (uses aspect for its macro/scripts) and know that zoc can do the same, just dont know how!

Here is a sample of a script i just wrote.

Code:
/* REXX (CREATED BY ZOC REXX RECORDER) */



CALL ZocTimeout 60
CALL ZocWaitForSeq 1


dn = ZocAsk("What's the DN you are programming?")
CALL ZocSend "****^M"
CALL ZocWait ">"
CALL ZocSend "ld 20^M"

CALL ZocWait "REQ:"
CALL ZocSend "prt^M"

CALL ZocWait "TYPE:"
CALL ZocSend "dnb^M"

CALL ZocWait "CUST"
CALL ZocSend "^M"

CALL ZocWait "DN"
CALL ZocSend dn
CALL ZocSend "^M"
CALL ZocWait "DATE"
CALL ZocSend "^M"

CALL ZocWait "PAGE"
CALL ZocSend "^M"

CALL ZocWait "DES"
CALL ZocSend "^M"



CALL ZocReceiveBuf 256

CALL ZocWait "NACT"
CALL ZocSend "^M"

CALL ZocWait "REQ:"

TNdata = ZocReceiveBuf(0)

TNstrip = POS("TN",TNdata)
TNpos = TNstrip + 4
TN = SUBSTR(TNdata,TNpos,12)
/* Call ZocMsgBox "Your TN INFO IS" TN */
/* Call ZocMsgBox "Your DN IS" DN */
CALL ZocSend "OUT^M"
CALL ZocWait "TYPE:"

CALL ZocSend "1140^M"


CALL ZocWait "TN"

Call ZocSend TN
CALL ZocSend "^M"

CALL ZocWait "REQ:"
CALL ZocSend "new^M"

CALL ZocWait "TYPE:"
CALL ZocSend "uext^M"

CALL ZocWait "TN"
Call ZocSend TN
CALL ZocSend "^M"

CALL ZocWait "DES"
CALL ZocSend "qta500^M"

CALL ZocWait "CUST"
CALL ZocSend "0^M"

CALL ZocWait "UXTY"
CALL ZocSend "sipl^M"

CALL ZocWait "MCCL"
CALL ZocSend "yes^M"

CALL ZocWait "SIPN"
CALL ZocSend "0^M"

CALL ZocWait "SIP3"
CALL ZocSend "1^M"

CALL ZocWait "FMCL"
CALL ZocSend "^M"

CALL ZocWait "TLSV"
CALL ZocSend "^M"

CALL ZocWait "SIPU"
Call ZocSend dn
CALL ZocSend "^M"

CALL ZocWait "NDID"
CALL ZocSend "200^M"

CALL ZocWait "SUPR"
CALL ZocSend "no^M"

CALL ZocWait "UXID"
CALL ZocSend "^M"

CALL ZocWait "NUID"
CALL ZocSend "^M"

CALL ZocWait "NHTN"
CALL ZocSend "^M"

CALL ZocWait "ZONE"
CALL ZocSend "5^M"

CALL ZocWait "MRT"
CALL ZocSend "95^M"

CALL ZocWait "ERL"
CALL ZocSend "^M"

CALL ZocWait "ECL"
CALL ZocSend "^M"

CALL ZocWait "VSIT"
CALL ZocSend "^M"

CALL ZocWait "FDN"
Call ZocSend dn
CALL ZocSend "^M"


CALL ZocWait "TGAR"
CALL ZocSend "1^M"

CALL ZocWait "LDN"
CALL ZocSend "no^M"

CALL ZocWait "NCOS"
CALL ZocSend "1^M"

CALL ZocWait "RNPG"
CALL ZocSend "^M"

CALL ZocWait "SSU"
CALL ZocSend "11^M"

CALL ZocWait "SCPW"
Call ZocSend dn
CALL ZocSend "^M"


CALL ZocWait "SGRP"
CALL ZocSend "^M"

CALL ZocWait "SFLT"
CALL ZocSend "^M"

CALL ZocWait "CAC_MFC"
CALL ZocSend "^M"

CALL ZocWait "CLS"
CALL ZocSend "tld fna hta cfta sfa gpud^M"

CALL ZocWait "RCO"
CALL ZocSend "0^M"

CALL ZocWait "EFD"
Call ZocSend dn
CALL ZocSend "^M"

CALL ZocWait "HUNT"
Call ZocSend dn
CALL ZocSend "^M"

CALL ZocWait "EHT"
Call ZocSend dn
CALL ZocSend "^M"

CALL ZocWait "LHK"
CALL ZocSend "0^M"

CALL ZocWait "SCI"
CALL ZocSend "^M"

CALL ZocWait "PLEV"
CALL ZocSend "^M"

CALL ZocWait "DANI"
CALL ZocSend "^M"

CALL ZocWait "AST"
CALL ZocSend "^M"

CALL ZocWait "IAPG"
CALL ZocSend "^M"

CALL ZocWait "MLWU_LANG"
CALL ZocSend "^M"

CALL ZocWait "MLNG"
CALL ZocSend "^M"

CALL ZocWait "DNDR"
CALL ZocSend "^M"

CALL ZocWait "KEY"
CALL ZocSend "0 scr "
Call ZocSend dn
CALL ZocSend "^M"

CALL ZocWait "CPND"
CALL ZocSend "^M"

CALL ZocWait "KEY"
CALL ZocSend "1 hot u 88"
Call ZocSend dn
CALL ZocSend "^M"

CALL ZocWait "KEY"
CALL ZocSend "^M"

CALL ZocWait "REQ:"
CALL ZocSend "end^M"

In the above script id love to get the variable's DN and TN to be entered into a spreadsheet on Sheet1 cells A and B respectively.

 
It looks like you have DN and TN immediately available so the problem boils down to "Excel". Nic got it right: Lee Peedin of REXXLA, and Les Koehler if Lee is out at an archery contest.
Frank Clarke
--America's source for adverse opinions since 1943.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top