Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > File Transfer
  New Posts New Posts RSS Feed - HowTo copy a Linux File to PC
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedHowTo copy a Linux File to PC

 Post Reply Post Reply
Author
Message
alangrus View Drop Down
Moderator Group
Moderator Group

Moderator

Joined: December 30 2003
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote alangrus Quote  Post ReplyReply Direct Link To This Post Topic: HowTo copy a Linux File to PC
    Posted: 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.