|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Diskette, seg_03d20f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Ftp; with Ftp_Defs; with Ftp_Profile; with Io; with Profile; with Remote_Operations; with System_Utilities; with Time_Utilities; package body Diskette is package Ro renames Remote_Operations; package Su renames System_Utilities; package Tu renames Time_Utilities; Printer_User : constant String := "r1000"; Printer_User_Password : constant String := "Rational"; The_Context : Ro.Context; The_Status : Ro.Error_Status; procedure Read_File (Source : String := ""; Destination : String := ""; Machine : String := "belladone"; Drive : String := "fd0") is begin Io.Put_Line ("--- acquiring connection to " & Machine); Ro.Acquire (A_Context => The_Context, Status => The_Status, Machine => Machine, User => Ftp_Profile.Username, Password => Ftp_Profile.Password, Session => "", Instance => ""); if Ro."=" (The_Context, Ro.Nil_Context) then Io.Put_Line ("*** Can't obtain context, check Dtia server"); end if; Io.Put_Line ("--- extracting file from diskette"); Ro.Execute (Command => "dosread " & Source & " /tmp/" & Source, In_Context => The_Context, Status => The_Status, Timeout => Remote_Operations.Wait_Forever); Io.Put_Line ("--- transferring file to destination library"); Ftp.Get (From_Remote_File => "/tmp/" & Source, To_Local_File => Destination, Remote_Machine => Machine, Username => Ftp_Profile.Username, Password => Ftp_Profile.Password, Account => Ftp_Profile.Account, Remote_Directory => Ftp_Profile.Remote_Directory, Remote_Type => Ftp_Profile.Remote_Type, Append_To_File => False, Transfer_Type => Ftp_Profile.Transfer_Type, Transfer_Mode => Ftp_Profile.Transfer_Mode, Transfer_Structure => Ftp_Profile.Transfer_Structure, Send_Port => Ftp_Profile.Send_Port_Enabled, Response => Ftp.Profile_Get); Io.Put_Line ("--- deleting temporary file"); Ro.Execute (Command => "rm /tmp/" & Source, In_Context => The_Context, Status => The_Status, Timeout => Remote_Operations.Wait_Forever); Ro.Release (A_Context => The_Context, Status => The_Status, Idle_Timeout => Remote_Operations.Default); end Read_File; procedure Write_File (Source : String := ""; Destination : String := ""; Machine : String := "belladone"; Drive : String := "fd0") is begin Io.Put_Line ("--- acquiring connection to " & Machine); Ro.Acquire (A_Context => The_Context, Status => The_Status, Machine => Machine, User => Printer_User, Password => Printer_User_Password, Session => "", Instance => ""); if Ro."=" (The_Context, Ro.Nil_Context) then Io.Put_Line ("*** Can't obtain context, check Dtia server"); end if; Io.Put_Line ("--- transfering file to destination library"); Ftp.Put (From_Local_File => Source, To_Remote_File => "/tmp/" & Source, Remote_Machine => Machine); Io.Echo_Line ("--- writing file to diskette "); Ro.Execute (Command => "cd /tmp; doswrite " & Source & " " & Destination, In_Context => The_Context, Status => The_Status, Timeout => Remote_Operations.Wait_Forever); Io.Echo_Line ("--- deleting temporary file"); Ro.Delete_File (In_Context => The_Context, With_Name => "/tmp/" & Source, Status => The_Status, Options => ""); Ro.Release (A_Context => The_Context, Status => The_Status, Idle_Timeout => Remote_Operations.Default); end Write_File; procedure Dir (Machine : String := "belladone"; Drive : String := "fd0") is begin Io.Put_Line ("--- reading diskette"); Ro.Acquire (A_Context => The_Context, Status => The_Status, Machine => Machine, User => Ftp_Profile.Username, Password => Ftp_Profile.Password, Session => "", Instance => ""); Ro.Execute (Command => "dosdir", In_Context => The_Context, Status => The_Status, Timeout => Remote_Operations.Wait_Forever); Ro.Release (A_Context => The_Context, Status => The_Status, Idle_Timeout => Remote_Operations.Default); end Dir; end Diskette;
nblk1=7 nid=2 hdr6=c [0x00] rec0=21 rec1=00 rec2=01 rec3=040 [0x01] rec0=16 rec1=00 rec2=07 rec3=020 [0x02] rec0=19 rec1=00 rec2=04 rec3=058 [0x03] rec0=1a rec1=00 rec2=03 rec3=00c [0x04] rec0=1d rec1=00 rec2=05 rec3=022 [0x05] rec0=0f rec1=00 rec2=06 rec3=000 [0x06] rec0=10 rec1=00 rec2=06 rec3=000 tail 0x2173ba1b285f684bce136 0x42a00088462060003 Free Block Chain: 0x2: 0000 00 00 00 04 80 01 74 01 22 62 65 6c 6c 61 64 6f ┆ t "bellado┆