DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦aae93d479⟧ TextFile

    Length: 3813 (0xee5)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─⟦129cab021⟧ »DATA« 
        └─⟦a7d6dfecb⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─⟦d65440be7⟧ »DATA« 
        └─⟦a7d6dfecb⟧ 
            └─⟦this⟧ 

TextFile

with Ftp;
with Ftp_Defs;
with Ftp_Profile;
with Io;
with Profile;
with Remote_Operations;
with System_Utilities;
with Time_Utilities;
package body Rs6000_Remote_Exec 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";
    Rs6000 : constant String := "aconit";

    The_Context : Ro.Context;  
    The_Status : Ro.Error_Status;

    procedure Initialize is
    begin
        Ro.Acquire (A_Context => The_Context,
                    Status => The_Status,
                    Machine => Rs6000,
                    User => Printer_User,
                    Password => Printer_User_Password,
                    Session => "",
                    Instance => "");
    end Initialize;


    procedure Execute (Command : String := "") is
    begin
        Ro.Execute (Command => Command,
                    In_Context => The_Context,
                    Status => The_Status,
                    Timeout => Remote_Operations.Wait_Forever);
    end Execute;


    procedure Put (File : String := "") is
    begin
        [statement]
    end Put;

    procedure Finalize is
    begin
        Ro.Release (A_Context => The_Context,
                    Status => The_Status,
                    Idle_Timeout => Remote_Operations.Default);
    end Finalize;

    procedure Spool (File : String := "") is
        The_Context : Ro.Context;
        The_Status : Ro.Error_Status;

        Temp_Name : constant String :=
           "/tmp/" & Su.User_Name &
              Tu.Image (Date => Tu.Get_Time,
                        Date_Style => Time_Utilities.Expanded,
                        Time_Style => Time_Utilities.Ada,
                        Contents => Time_Utilities.Time_Only);
    begin
        Io.Echo_Line (File & " spooled to Aconit");
        Ro.Acquire (A_Context => The_Context,
                    Status => The_Status,
                    Machine => Rs6000,
                    User => Printer_User,
                    Password => Printer_User_Password,
                    Session => "",  
                    Instance => "");
        -- Ro.Put (From_File => File,
        --         To_File => Temp_Name,
        --         In_Context => The_Context,
        --         Status => The_Status,
        --         Append => False,
        --         Options => "");

        Profile.Set (Profile => "<QUIET>", Status => The_Status);

        Ftp.Put (From_Local_File => File,
                 To_Remote_File => Temp_Name,
                 Remote_Machine => Rs6000,
                 Username => Printer_User,
                 Password => Printer_User_Password,
                 Account => Ftp_Profile.Account,
                 Remote_Directory => Ftp_Profile.Remote_Directory,
                 Remote_Type => "unix",
                 Append_To_File => False,
                 Transfer_Type => Ftp_Defs.Image,
                 Transfer_Mode => Ftp_Profile.Transfer_Mode,
                 Transfer_Structure => Ftp_Profile.Transfer_Structure,
                 Send_Port => Ftp_Profile.Send_Port_Enabled,
                 Response => Profile.Get);
        Ro.Execute (Command => "lpr -Plp " & Temp_Name,
                    In_Context => The_Context,
                    Status => The_Status,
                    Timeout => Remote_Operations.Wait_Forever);
        Ro.Delete_File (In_Context => The_Context,
                        With_Name => Temp_Name,
                        Status => The_Status,
                        Options => "");
        Ro.Release (A_Context => The_Context,
                    Status => The_Status,
                    Idle_Timeout => Remote_Operations.Default);
    end Spool;

end Rs6000_Remote_Exec;