/* COMMAND_RUN.SPL, SEGSRC, TRANSLATOR GROUP, 06/18/82 Start a seg program. Copyright (c) 1982, Prime Computer, Inc., Natick, MA 01760 */ /* Description: /* /* Abnormal conditions: /* /* Implementation: /* /* Modifications: /* Date Programmer Description of modification /* 06/18/82 D. Hornbaker Fixed to use correct unit to close seg file. /* 05/17/82 D. Hornbaker Initial coding. */ main: proc; /* Insert files */ %include 'syscom>keys.ins.pl1'; %include 'lodcom.ins.pl1'; /* External entry points */ declare seg0 external entry(character(*), fixed binary(15), fixed binary(15)) returns(bit(1)); declare ioit external entry(fixed binary(15)); declare srch$$ external entry(fixed binary(15), fixed binary(15), fixed binary(15), fixed binary(15), fixed binary(15), fixed binary(15)); declare vrunit external entry; declare exit external entry; declare errpr$ external entry(fixed binary(15), fixed binary(15), character(*), fixed binary(15), character(*), fixed binary(15)); declare setrc$ external entry(fixed binary(15)); declare errsev fixed binary(15) external; declare fname character(128) varying external; /* Local declarations */ declare file_type fixed binary(15); declare seg_file_name character(128); declare seg_file_name_length fixed binary(15); declare code fixed binary(15); seg_file_name = fname; seg_file_name_length = length(fname); if ^seg0(seg_file_name, seg_file_name_length, (1)) then do; call ioit((1)); call srch$$(k$clos, 0, 0, loatmp.segdir, file_type, code); call errpr$(k$nrtn, code, 'Closing seg file', 16, '', 0); call vrunit; call exit; end; else call setrc$(errsev); end main; /* command_run */