PROGRAM PERP C PERP_VERSION == "Perp Version 2.0 ??-Apr-1985 C C Written by: J. Raquepau C MDSI - Ann Arbor, MI. C 01-Sep-1984 C C This program takes the command line from DCL (via the CLI$PRESENT C and CLI$GET_VALUE routines) computes an AFTER qualifier time for C the SUBMIT command, based on the qualifiers /DATES, /DAYS, /TIME C (or their defaults). It also check for other paramters and quali- C fiers, adding them to an output command line. The entire string C is then passed to the LIB$DO_COMMAND function. C INCLUDE 'PERP.INC/LIST' C IMPLICIT INTEGER(A-Z) INTEGER*4 submit_end, quals_end, file_end, comp_end, beg_pos INTEGER*4 global_quals(QUAL_COUNT), local_quals(QUAL_COUNT) C CHARACTER comp_date*17, file*255, quals_line*255, time*5, space*1 CHARACTER submit_line*255 C LOGICAL days(7), dates(31), delta_time DATA space /' '/ file =' ' quals_line=' ' submit_line=' ' comp_date=' ' time=' ' C C Get DATE, DAYS, and TIME to run from user. C CALL DAYPARSE(days) CALL DATEPARSE(dates,comp_date) CALL TIMEPARSE(time,delta_time) C C Compute the date to run. C CALL COMPDATE(comp_date,days,dates,time,delta_time) C C Get other switches and filenames. C CALL GETQUALS(quals_line,file) C C Make SUBMIT string. C icode = STR$TRIM(quals_line, quals_line, quals_end) icode = STR$TRIM(file, file, file_end) icode = STR$TRIM(comp_date, comp_date, comp_end) beg_pos = 1 if(comp_date(1:1).EQ.space) beg_pos = 2 if(quals_end.LE.0) quals_end = 1 if(file_end.LE.0) file_end = 1 if (quals_end.NE.1) then submit_line = 'SUBMIT' // quals_line(1:quals_end) // '/AFTER="' & // comp_date(beg_pos:comp_end) // '" ' // file(1:file_end) else submit_line = 'SUBMIT' // '/AFTER="' & // comp_date(beg_pos:comp_end) // '" ' // file(1:file_end) end if icode = STR$TRIM(submit_line, submit_line, submit_end) C C Call SUBMIT program. C write(6,100) 100 format(/,' PERP Version 2.00 15-Mar-1985',/) type *,'Submitted As: [',submit_line(1:submit_end),']' icode = LIB$DO_COMMAND(submit_line(1:submit_end)) C C Check for errors. C end