![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
alangrus
Moderator Group
Moderator Joined: December 30 2003 Location: United States Status: Offline Points: 11 |
Post Options
Thanks(0)
Quote Reply
Topic: HowTo copy a Linux File to PCPosted: April 08 2007 at 7:28am |
|
Having need to grab a file on the Linux system that hosts the MV database AccuTerm connects to, I took advantage of the default Kermit protocol built into AccuTerm. Red Hat Linux comes with Kermit, SuSE 10.2 did not, its easily found and installed.
The code below expects the developer to supply some parameters and then starts a Receive on the PC side and a Send on the Linux side via AccuTerm. SUBROUTINE LINUX.TO.PC(LINUX.PATH, DOS.PATH, FILENAME, RESULT) ** file transfer from Linux filesystem, thru AccuTerm, via Kermit on both ends. ** Alan Gruskoff, Performant Systems 2007 ** ESC = CHAR(27); STX = CHAR(2); EM = CHAR(25); CSI = CHAR(155);** used by AccuTerm RESULT = "" IF LINUX.PATH = "" THEN RESULT = "NO LINUX.PATH SUPPLIED."; RETURN IF DOS.PATH = "" THEN RESULT = "NO DOS.PATH SUPPLIED."; RETURN IF FILENAME = "" THEN RESULT = "NO FILENAME SUPPLIED."; RETURN ** ** first, tell AccuTerm to start a Kermit file Download (receive mode) ** CRT ESC:STX:"DKOB;": DOS.PATH :CHAR(13) ** ** then, initiate a Kermit Send on the Linux side, (-s Send) ** (-i Force binary (Image) mode) ** CMD = "!kermit -i -s ":LINUX.PATH:FILENAME EXECUTE CMD CAPTURING RESULT ** RETURN END |
|
|
Multivalue Database, AccuTerm GUI Developer and Instructor.
Pasadena CA (626) 768-2648 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |