PRCH69EN ;WISC/DJM-PATCH 69 ENVIRONMENT CHECK ; [9/28/98 11:46am]
V ;;5.0;IFCAP;**69**;4/21/95
;
START ; This is the Environment Check routine for patch 69. This routine
; will check file 440 for any NAME field that contains only leading
; stars or leading spaces before any other character or contains
; nothing (the field has no data).
;
; First, stop if this is not the KIDS Install Package(s) option.
;
Q:XPDENV'=1
N A,FLAG,MSG,X,X1,X1C
S FLAG=0
S X=0
F S X=$O(^PRC(440,X)) Q:X'>0 D
. S A=$P($G(^PRC(440,X,0)),"^",1)
. ; Remove all stars (*) and leading spaces (' ').
. F D Q:'(X1C=32!(X1C=42))
. . S X1=$E(A,1)
. . S X1C=$A(X1)
. . I X1C=32!(X1C=42) S A=$E(A,2,99)
. . Q
. I A="" D
. . W !,X
. . S FLAG=FLAG+1
. . Q
. Q
Q:FLAG=0
;
; Now that we have some bad records lets tell the patch installer
; what to do with them.
;
F I=1:1 S LINE=$P($T(MSG+I),";;",2) Q:LINE="~~" S LINE="W !,"_LINE X LINE
;
; Now lets exit and prevent the patch installer from proceeding.
;
S XPDQUIT=2
Q
;
MSG ;;
;;" "
;;"The preceding "_$S(FLAG=1:"number is an ",1:"numbers are ")_"Internal Entry Number"_$S(FLAG=1:" ",1:"s ")_"in the VENDOR file (#440)."
;;"The NAME, .01, field has only '*'s or ' 's or is missing from "_$S(FLAG=1:"the record ",1:"all records ")
;;"listed above. Please correct or remove "_$S(FLAG=1:"the entry ",1:"those entries ")_"before restarting the"
;;"install of patch PRC*5*69 again."
;;" "
;;"This environment check will look at the Vendor file (#440)."
;;"The following conditions will be checked at the beginning of"
;;"this patch:"
;;" "
;;"1. Each Vendor NAME (the .01 field) must contain valid characters"
;;" (beyond leading asterisks (*) and/or spaces)."
;;"2. If the Vendor record being checked in step 1 fails the check,"
;;" the internal record number will be displayed."
;;"3. After all Vendor records are checked, if bad records are"
;;" detected this text will be displayed."
;;" "
;;"The following steps may be taken to correct the bad Vendor records:"
;;" "
;;"1. Some records may be incomplete. You will need to view"
;;" them using the utility ^%G while in programmer mode."
;;" These records do not appear under the FileMan Inquire option"
;;"2. Use the FileMan Search option to see if the vendor record you are"
;;" checking is used in file #410, #441 or #442. If the vendor record"
;;" is in any of these files you must repair the record in the"
;;" Vendor file (#440) by editing the NAME field (.01)."
;;"3. If the vendor record is not found in step 2 above then you should"
;;" remove it from the Vendor file. Since the record is not"
;;" complete you need to remove it in the programmer mode."
;;" Use the following line of M code to remove the record:"
;;" "
;;" K ^PRC(440,IEN)"
;;" "
;;" Substitute the Internal Entry Number of the record from the"
;;" list that you are working with for the IEN in the line of code."
;;" Press RETURN <CR> after entering the line of code."
;;"4. Use steps 1-3 to correct or remove each Vendor record listed."
;;"5. Once all the records listed are corrected you need to"
;;" continue with the patch installation:"
;;" "
;;" A. Enter KIDS (Kernel Installation & Distribution System)"
;;" B. Select Installation..."
;;" C. Choose the Install Package(s) choice"
;;" "
;;" Now the patch will start again. The Environment Check will"
;;" run again. This will verify that all the Vendor records found"
;;" in the previous run have been either corrected or removed."
;;" "
;;" If all Vendor file records pass the environment check, the patch"
;;" will continue on with the install."
;;~~
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCH69EN 3812 printed Dec 13, 2024@02:05:22 Page 2
PRCH69EN ;WISC/DJM-PATCH 69 ENVIRONMENT CHECK ; [9/28/98 11:46am]
V ;;5.0;IFCAP;**69**;4/21/95
+1 ;
START ; This is the Environment Check routine for patch 69. This routine
+1 ; will check file 440 for any NAME field that contains only leading
+2 ; stars or leading spaces before any other character or contains
+3 ; nothing (the field has no data).
+4 ;
+5 ; First, stop if this is not the KIDS Install Package(s) option.
+6 ;
+7 if XPDENV'=1
QUIT
+8 NEW A,FLAG,MSG,X,X1,X1C
+9 SET FLAG=0
+10 SET X=0
+11 FOR
SET X=$ORDER(^PRC(440,X))
if X'>0
QUIT
Begin DoDot:1
+12 SET A=$PIECE($GET(^PRC(440,X,0)),"^",1)
+13 ; Remove all stars (*) and leading spaces (' ').
+14 FOR
Begin DoDot:2
+15 SET X1=$EXTRACT(A,1)
+16 SET X1C=$ASCII(X1)
+17 IF X1C=32!(X1C=42)
SET A=$EXTRACT(A,2,99)
+18 QUIT
End DoDot:2
if '(X1C=32!(X1C=42))
QUIT
+19 IF A=""
Begin DoDot:2
+20 WRITE !,X
+21 SET FLAG=FLAG+1
+22 QUIT
End DoDot:2
+23 QUIT
End DoDot:1
+24 if FLAG=0
QUIT
+25 ;
+26 ; Now that we have some bad records lets tell the patch installer
+27 ; what to do with them.
+28 ;
+29 FOR I=1:1
SET LINE=$PIECE($TEXT(MSG+I),";;",2)
if LINE="~~"
QUIT
SET LINE="W !,"_LINE
XECUTE LINE
+30 ;
+31 ; Now lets exit and prevent the patch installer from proceeding.
+32 ;
+33 SET XPDQUIT=2
+34 QUIT
+35 ;
MSG ;;
+1 ;;" "
+2 ;;"The preceding "_$S(FLAG=1:"number is an ",1:"numbers are ")_"Internal Entry Number"_$S(FLAG=1:" ",1:"s ")_"in the VENDOR file (#440)."
+3 ;;"The NAME, .01, field has only '*'s or ' 's or is missing from "_$S(FLAG=1:"the record ",1:"all records ")
+4 ;;"listed above. Please correct or remove "_$S(FLAG=1:"the entry ",1:"those entries ")_"before restarting the"
+5 ;;"install of patch PRC*5*69 again."
+6 ;;" "
+7 ;;"This environment check will look at the Vendor file (#440)."
+8 ;;"The following conditions will be checked at the beginning of"
+9 ;;"this patch:"
+10 ;;" "
+11 ;;"1. Each Vendor NAME (the .01 field) must contain valid characters"
+12 ;;" (beyond leading asterisks (*) and/or spaces)."
+13 ;;"2. If the Vendor record being checked in step 1 fails the check,"
+14 ;;" the internal record number will be displayed."
+15 ;;"3. After all Vendor records are checked, if bad records are"
+16 ;;" detected this text will be displayed."
+17 ;;" "
+18 ;;"The following steps may be taken to correct the bad Vendor records:"
+19 ;;" "
+20 ;;"1. Some records may be incomplete. You will need to view"
+21 ;;" them using the utility ^%G while in programmer mode."
+22 ;;" These records do not appear under the FileMan Inquire option"
+23 ;;"2. Use the FileMan Search option to see if the vendor record you are"
+24 ;;" checking is used in file #410, #441 or #442. If the vendor record"
+25 ;;" is in any of these files you must repair the record in the"
+26 ;;" Vendor file (#440) by editing the NAME field (.01)."
+27 ;;"3. If the vendor record is not found in step 2 above then you should"
+28 ;;" remove it from the Vendor file. Since the record is not"
+29 ;;" complete you need to remove it in the programmer mode."
+30 ;;" Use the following line of M code to remove the record:"
+31 ;;" "
+32 ;;" K ^PRC(440,IEN)"
+33 ;;" "
+34 ;;" Substitute the Internal Entry Number of the record from the"
+35 ;;" list that you are working with for the IEN in the line of code."
+36 ;;" Press RETURN <CR> after entering the line of code."
+37 ;;"4. Use steps 1-3 to correct or remove each Vendor record listed."
+38 ;;"5. Once all the records listed are corrected you need to"
+39 ;;" continue with the patch installation:"
+40 ;;" "
+41 ;;" A. Enter KIDS (Kernel Installation & Distribution System)"
+42 ;;" B. Select Installation..."
+43 ;;" C. Choose the Install Package(s) choice"
+44 ;;" "
+45 ;;" Now the patch will start again. The Environment Check will"
+46 ;;" run again. This will verify that all the Vendor records found"
+47 ;;" in the previous run have been either corrected or removed."
+48 ;;" "
+49 ;;" If all Vendor file records pass the environment check, the patch"
+50 ;;" will continue on with the install."
+51 ;;~~