- INHSYS10 ;SLT,JPD,WOM; 20 Oct 95 16:03;GIS system configuration compilation/installation utility; program split from INHSYS
- ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
- ;COPYRIGHT 1991-2000 SAIC
- ;CHCS TOOLS_460; GEN 3; 17-JUL-1997
- ;COPYRIGHT 1992 SAIC
- Q
- LOOP(INUT,INREPRT,INDELETE) ;
- ; Input:
- ; INUT - Routine to run and Transaction file name
- ; INREPRT - 0 - No report
- ; 1 - Report
- ; INDELETE - If 0/not passed/string then delete
- ; IBxxxxW,IBxxxxnn programs
- ; else do not delete programs
- ;Loop through PASS1 and PASS2
- N %PASS,%LFILES,AA,%SAV
- K ^UTILITY($J),^UTILITY("INHSYS",$J),^UTILITY("INHSYSUT",$J)
- S %DRVR=$P(INUT," -"),INDELETE=+$G(INDELETE)
- X "D EN^@%DRVR" ;used eXecute so that ^TCQ program does not crash!
- I $D(^UTILITY("INHSYS")),'$$LOCKFL^INHSYSUT(.INLKFLS) D
- .F %PASS=1:1:2 D INST^INHSYS05(%DRVR,.%PASS,INREPRT) Q:INPOP
- .Q:INPOP D PASS3^INHSYS06
- .Q:INPOP D PASS4^INHSYS06
- E S INPOP=1
- ;Unlock files/Clean up ^UTILITY/Remove IB routines
- S AA="" F S AA=$O(INLKFLS(AA)) Q:AA="" D UNLK^INHSYSUT(AA)
- K ^UTILITY($J),^UTILITY("INHSYS",$J),^UTILITY("INHSYSUT",$J)
- D:'INDELETE RMRTN^INHUT3($E(%DRVR,1,$L(%DRVR)-1))
- D ALLSUMER^INHSYS11() ;if error summary is requested, display it on the user's current device
- ;
- W !!,"File transfer ",$S('INPOP:"completed.",1:"aborted!")
- Q
- RUN(INREPRT,INSELTT) ;
- ; Input:
- ; INREPRT - 0 - No report
- ; 1 - Report
- ; INSELTT -Array of selected files
- ;
- N INORDR,INROU K ^UTILITY($J),^UTILITY("SVD",$J),^UTILITY("INHSYS",$J)
- S INORDR=""
- F S INORDR=$O(INSELTT(INORDR)) Q:'INORDR D PARSE(INSELTT(INORDR),.INROU,INREPRT) Q:INPOP
- Q:INPOP I $D(INROU) D
- .D NTRNL^INHSYS04(.INROU,$E($O(INROU(""),-1),1,6)_"W")
- .I INREPRT,$E(IOST)="C",INCR,$$CR^UTSRD(0,IOSL-1)
- Q
- PARSE(INPTT,INROU,INREPRT) ;begin data collection for a transaction type
- ;input:
- ; INPTT - ien^.01 parent transaction type from INTERFACE
- ; TRANSACTION TYPE file
- ; INREPRT - 0 - No report
- ; 1 - Report
- ;output:
- ; INROU - array of compiled routines where INROU(routine)=""
- ; Must be passed by referrence as the second parameter
- ;
- ;set global with file numbers
- I INREPRT D HEAD^INHSYS03(1)
- ;
- ;build storage buffer with transaction type data
- D XTRK^INHSYS01(+INPTT,"^INRHT(","^UTILITY($J,4000,",4000,INREPRT,0)
- I INPOP K ^UTILITY($J) Q
- ;
- I INREPRT,$E(IOST)="C",INCR,$$CR^UTSRD(0,IOSL-1)
- ;
- ;resolve all pointer relationships (ien to .01)
- D EXPAND^INHSYS03(INREPRT) Q:INPOP
- ;
- I INREPRT,$E(IOST)="C",INCR W $$RPTFOOT^INHUT5,@IOF
- ;
- ;format data into a routine
- D RTNBFR^INHSYS04(+INPTT,.INROU)
- Q
- INHSYS10 ;SLT,JPD,WOM; 20 Oct 95 16:03;GIS system configuration compilation/installation utility; program split from INHSYS
- +1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
- +2 ;COPYRIGHT 1991-2000 SAIC
- +3 ;CHCS TOOLS_460; GEN 3; 17-JUL-1997
- +4 ;COPYRIGHT 1992 SAIC
- +5 QUIT
- LOOP(INUT,INREPRT,INDELETE) ;
- +1 ; Input:
- +2 ; INUT - Routine to run and Transaction file name
- +3 ; INREPRT - 0 - No report
- +4 ; 1 - Report
- +5 ; INDELETE - If 0/not passed/string then delete
- +6 ; IBxxxxW,IBxxxxnn programs
- +7 ; else do not delete programs
- +8 ;Loop through PASS1 and PASS2
- +9 NEW %PASS,%LFILES,AA,%SAV
- +10 KILL ^UTILITY($JOB),^UTILITY("INHSYS",$JOB),^UTILITY("INHSYSUT",$JOB)
- +11 SET %DRVR=$PIECE(INUT," -")
- SET INDELETE=+$GET(INDELETE)
- +12 ;used eXecute so that ^TCQ program does not crash!
- XECUTE "D EN^@%DRVR"
- +13 IF $DATA(^UTILITY("INHSYS"))
- IF '$$LOCKFL^INHSYSUT(.INLKFLS)
- Begin DoDot:1
- +14 FOR %PASS=1:1:2
- DO INST^INHSYS05(%DRVR,.%PASS,INREPRT)
- IF INPOP
- QUIT
- +15 IF INPOP
- QUIT
- DO PASS3^INHSYS06
- +16 IF INPOP
- QUIT
- DO PASS4^INHSYS06
- End DoDot:1
- +17 IF '$TEST
- SET INPOP=1
- +18 ;Unlock files/Clean up ^UTILITY/Remove IB routines
- +19 SET AA=""
- FOR
- SET AA=$ORDER(INLKFLS(AA))
- IF AA=""
- QUIT
- DO UNLK^INHSYSUT(AA)
- +20 KILL ^UTILITY($JOB),^UTILITY("INHSYS",$JOB),^UTILITY("INHSYSUT",$JOB)
- +21 IF 'INDELETE
- DO RMRTN^INHUT3($EXTRACT(%DRVR,1,$LENGTH(%DRVR)-1))
- +22 ;if error summary is requested, display it on the user's current device
- DO ALLSUMER^INHSYS11()
- +23 ;
- +24 WRITE !!,"File transfer ",$SELECT('INPOP:"completed.",1:"aborted!")
- +25 QUIT
- RUN(INREPRT,INSELTT) ;
- +1 ; Input:
- +2 ; INREPRT - 0 - No report
- +3 ; 1 - Report
- +4 ; INSELTT -Array of selected files
- +5 ;
- +6 NEW INORDR,INROU
- KILL ^UTILITY($JOB),^UTILITY("SVD",$JOB),^UTILITY("INHSYS",$JOB)
- +7 SET INORDR=""
- +8 FOR
- SET INORDR=$ORDER(INSELTT(INORDR))
- IF 'INORDR
- QUIT
- DO PARSE(INSELTT(INORDR),.INROU,INREPRT)
- IF INPOP
- QUIT
- +9 IF INPOP
- QUIT
- IF $DATA(INROU)
- Begin DoDot:1
- +10 DO NTRNL^INHSYS04(.INROU,$EXTRACT($ORDER(INROU(""),-1),1,6)_"W")
- +11 IF INREPRT
- IF $EXTRACT(IOST)="C"
- IF INCR
- IF $$CR^UTSRD(0,IOSL-1)
- End DoDot:1
- +12 QUIT
- PARSE(INPTT,INROU,INREPRT) ;begin data collection for a transaction type
- +1 ;input:
- +2 ; INPTT - ien^.01 parent transaction type from INTERFACE
- +3 ; TRANSACTION TYPE file
- +4 ; INREPRT - 0 - No report
- +5 ; 1 - Report
- +6 ;output:
- +7 ; INROU - array of compiled routines where INROU(routine)=""
- +8 ; Must be passed by referrence as the second parameter
- +9 ;
- +10 ;set global with file numbers
- +11 IF INREPRT
- DO HEAD^INHSYS03(1)
- +12 ;
- +13 ;build storage buffer with transaction type data
- +14 DO XTRK^INHSYS01(+INPTT,"^INRHT(","^UTILITY($J,4000,",4000,INREPRT,0)
- +15 IF INPOP
- KILL ^UTILITY($JOB)
- QUIT
- +16 ;
- +17 IF INREPRT
- IF $EXTRACT(IOST)="C"
- IF INCR
- IF $$CR^UTSRD(0,IOSL-1)
- +18 ;
- +19 ;resolve all pointer relationships (ien to .01)
- +20 DO EXPAND^INHSYS03(INREPRT)
- IF INPOP
- QUIT
- +21 ;
- +22 IF INREPRT
- IF $EXTRACT(IOST)="C"
- IF INCR
- WRITE $$RPTFOOT^INHUT5,@IOF
- +23 ;
- +24 ;format data into a routine
- +25 DO RTNBFR^INHSYS04(+INPTT,.INROU)
- +26 QUIT