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

Printing Bank Totals 1

Status
Not open for further replies.

Funkymatt

Programmer
Aug 27, 2002
101
US
Hello all,

I'm brand spaking new to all this but it looks like I may be learning more and more as we phase out this older system.

I've used the Script Recorder to create the script below:

proc main
waitfor "rocomm Plus Ready!^M^J"
transmit "@D^M"
waitfor "TERMINAL="
transmit "^M"
waitfor "@"
transmit "404161^M"
waitfor "04 161 CONNECTED^M^J"
transmit "$$SON XXXXXX^M"
waitfor "^@^@^@"
transmit "SI;XXXXX/XXXXXJ^M"
waitfor "^@^@^@"
transmit "CCS;XXXX/XXXXX^M"
waitfor "^@^@^@"
transmit "LIS REP TOT^M"
waitfor "^@^@^@"
transmit "99^M"
waitfor "^@^@^@"
transmit "01^M"
waitfor "^@^@^@"
transmit "ALL^M"
waitfor "^@^@^@"
transmit "01^M"
waitfor "^@^@^@"

printcapture ON ; Turn on the print device.
transmit "TOT^M"
waitfor "^@^@^@"
printcapture OFF ; Turn on the print device.

transmit "99^M"
waitfor "^@^@^@"
transmit "02^M"
waitfor "^@^@^@"
transmit "ALL^M"
waitfor "^@^@^@"
transmit "01^M"
waitfor "^@^@^@"

printcapture ON ; Turn on the print device.
transmit "TOT^M"
waitfor "^@^@^@"
printcapture OFF ; Turn on the print device.

transmit "99^M"
waitfor "^@^@^@"
transmit "02^M"
waitfor "^@^@^@"
transmit "ALL^M"
waitfor "^@^@^@"
transmit "01^M"
waitfor "^@^@^@"

printcapture ON ; Turn on the print device.
transmit "TOT^M"
waitfor "^@^@^@"
printcapture OFF ; Turn on the print device.

transmit "99^M"
waitfor "^@^@^@"
transmit "03^M"
waitfor "^@^@^@"
transmit "ALL^M"
waitfor "^@^@^@"
transmit "01^M"
waitfor "^@^@^@"
transmit "CCS^M"
waitfor "^@^@^@"
transmit "STOP^M"
waitfor "^@^@^@"
transmit "$$SOFF^M"
endproc

I the script worked like a charm BUT not the boldfaced lines. I was taking a stab at how to get just the totals sent to the printer. The totals are printed to the screen right before the transmit "TOT^M" command.

Ideally I would like to omit the commands in between each of the totals for maximum readibility.

Any help would be great...the help file is a bit overwhelming being new.

Best,
Matt
 
First, take the script out of the picture and see if you can do a manual print capture successfully by selecting the File | Print Capture menu item once to turn on print capture and then selecting it a second time to end the print capture. Also make sure that the correct printer is displayed in the File | Print Setup dialog. If everything works well there, then we need to take a closer look at your script.
aspect@aspectscripting.com
 
Knob,

First and foremost, thank you for your timely response. I checked the setup of the printer first and that was correct. Second, I was able to capture and print successfully using the File|Print Capture menu item. I am going to dig deeper this morning and see what I can come up with.

Best,
Funky
 
I'm using the following lines:
transmit "SI;XXXXX/XXXXXX^M^J"
waitfor "OFFICE ATL4^M^J"
transmit "CCS;XXXX/XXXXX^M"

somewhere in between those lines I get an error
NO FUNCTION CODE FOUND IN MESSAGE

Part of what I think the problem is would be the ^J following the carriage return. What is its significance? Should the lines just transmit a carriage return? When is a ^J needed?

Best,
Matt
 
The ^J is a linefeed - some systems require its use instead of a ^M, while others do not, while some systems will accept either control character. Since you used the Script Recorder, the ^J was actually sent by Procomm, presumably with the ^M character if you modified your keyboard mapping for the Enter key. Try running your script again without the ^J present and see if that eliminates the error message.
aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top