Skip to main content

Compiled

Struct Compiled 

Source
pub struct Compiled {
    pub program: Program,
    pub when_compiled: CompileTime,
    pub layout: Layout,
    pub options: Options,
    pub ssrange: bool,
    pub report_writer: Writer<Expr, Ref, Literal, (usize, usize)>,
    pub collating: Sequence,
    pub carriage: Vec<Option<Carriage>>,
    pub diagnostics: Vec<Error>,
    pub entries: Vec<EntryPoint>,
    pub declaratives: Table,
    pub functions: Vec<Udf>,
}

Fields§

§program: Program§when_compiled: CompileTime

FUNCTION WHEN-COMPILED’s time.

§layout: Layout§options: Options§ssrange: bool§report_writer: Writer<Expr, Ref, Literal, (usize, usize)>§collating: Sequence

The PROGRAM COLLATING SEQUENCE, or EBCDIC.

§carriage: Vec<Option<Carriage>>

Each file’s printer control character, when it is a print file.

§diagnostics: Vec<Error>

The messages of a program that compiled, none of them severe enough to stop its object code.

§entries: Vec<EntryPoint>

The program’s ENTRY statements, in source order.

§declaratives: Table

Where each EXCEPTION/ERROR and debugging procedure runs.

§functions: Vec<Udf>

The user-defined functions the program may invoke.

Trait Implementations§

Source§

impl Execute for Compiled

Source§

fn run(&self, out: &mut dyn Write, err: &mut dyn Write) -> Result<Ending, Abend>

Source§

fn run_with( &self, dds: Dds, out: &mut dyn Write, err: &mut dyn Write, ) -> Result<Ending, Abend>

Runs with the DDs that ASSIGN names map to.
Source§

fn execute<'w>( &self, library: Library, dds: Dds, sysin: Option<Box<dyn BufRead + 'w>>, clock: Clock, out: &'w mut dyn Write, err: &'w mut dyn Write, ) -> Result<(Ending, i16), Abend>

Runs as the first program of a run unit: CALL finds other programs in library, ACCEPT reads sysin. Returns how the run ended and RETURN-CODE.
Source§

fn execute_with<'w>( &self, library: Library, dds: Dds, sysin: Option<Box<dyn BufRead + 'w>>, clock: Clock, database: Option<&'w mut (dyn Database + '_)>, out: &'w mut dyn Write, err: &'w mut dyn Write, ) -> Result<(Ending, i16), Abend>

Runs as Execute::execute does, with EXEC SQL answered by database.
Source§

fn execute_observed<'w>( &self, library: Library, dds: Dds, sysin: Option<Box<dyn BufRead + 'w>>, clock: Clock, database: Option<&'w mut (dyn Database + '_)>, out: &'w mut dyn Write, err: &'w mut dyn Write, observer: Option<Observer<'w>>, ) -> Result<(Ending, i16), Abend>

Runs as Execute::execute_with does, telling observer what the run opens, closes and loads.
Source§

fn execute_main<'w>( &self, library: Library, dds: Dds, sysin: Option<Box<dyn BufRead + 'w>>, clock: Clock, database: Option<&'w mut (dyn Database + '_)>, out: &'w mut dyn Write, err: &'w mut dyn Write, observer: Option<Observer<'w>>, parm: &str, ) -> Result<(Ending, i16), Abend>

Runs as Execute::execute_observed does, as the main program of a job step that EXEC PGM= started with parm: the first PROCEDURE DIVISION USING item addresses a halfword length and the program arguments Language Environment finds in it.
Source§

fn execute_with_arguments<'w>( &self, library: Library, dds: Dds, sysin: Option<Box<dyn BufRead + 'w>>, clock: Clock, database: Option<&'w mut (dyn Database + '_)>, out: &'w mut dyn Write, err: &'w mut dyn Write, observer: Option<Observer<'w>>, arguments: &[Option<Vec<u8>>], ) -> Result<(Ending, i16), Abend>

Runs as Execute::execute_observed does, as a subprogram whose caller passed arguments, one per PROCEDURE DIVISION USING item: the bytes of the item passed, or None for OMITTED, which passes a null address. Each argument is input to the run, and EXIT PROGRAM returns.
Source§

fn execute_kept<'w>( &self, library: Library, dds: Dds, sysin: Option<Box<dyn BufRead + 'w>>, clock: Clock, database: Option<&'w mut (dyn Database + '_)>, out: &'w mut dyn Write, err: &'w mut dyn Write, observer: Option<Observer<'w>>, kept: &mut Option<Remains>, ) -> Result<(Ending, i16), Abend>

Runs as Execute::execute_observed does, and puts what the run left in its run unit in kept.
Source§

fn execute_cics<'w>( &self, library: Library, dds: Dds, task: Task, clock: Clock, out: &'w mut dyn Write, err: &'w mut dyn Write, ) -> Result<(Ending, Task), Abend>

Runs as the first program of a CICS task. task says who started it, what COMMAREA it starts with, and what files and queues it has. Returns how the run ended and the task, with RETURN TRANSID and COMMAREA if it ended that way.
Source§

fn execute_cics_with<'w>( &self, library: Library, dds: Dds, task: Task, clock: Clock, database: Option<&'w mut (dyn Database + '_)>, out: &'w mut dyn Write, err: &'w mut dyn Write, ) -> Result<(Ending, Task), Abend>

A CICS task with a database: SYNCPOINT commits, and the end of the task commits, or rolls back after an abend, and closes every cursor. The database outlives the task, so a region’s tasks can share one.
Source§

fn execute_cics_observed<'w>( &self, library: Library, dds: Dds, task: Task, clock: Clock, database: Option<&'w mut (dyn Database + '_)>, out: &'w mut dyn Write, err: &'w mut dyn Write, observer: Option<Observer<'w>>, ) -> Result<(Ending, Task), Abend>

Runs as Execute::execute_cics_with does, telling observer what the task opens, loads and passes to an operation an input could steer.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.