MAGSIXG1 ;WOIFO/EdM/GEK/SEB/SG/NST - LIST OF IMAGES RPCS ; JUN 11, 2018@11:43 AM
;;3.0;IMAGING;**8,48,59,93,117,221**;Mar 19, 2002;Build 2238;Jul 15, 2011
;; Per VHA Directive 2004-038, this routine should not be modified.
;; +---------------------------------------------------------------+
;; | Property of the US Government. |
;; | No permission to copy or redistribute this software is given. |
;; | Use of unreleased versions of this software requires the user |
;; | to execute a written test agreement with the VistA Imaging |
;; | Development Office of the Department of Veterans Affairs, |
;; | telephone (301) 734-0100. |
;; | The Food and Drug Administration classifies this software as |
;; | a medical device. As such, it may not be changed in any way. |
;; | Modifications to this software may result in an adulterated |
;; | medical device under 21CFR820, the use of which is considered |
;; | to be a violation of US Federal Statutes. |
;; +---------------------------------------------------------------+
;;
Q
;
;+++++ FORMATS RPC ERRORS
ERRORS(RESULTS,RC) ;
S:$G(RC)'<0 RC=$$FIRSTERR^MAGUERR1()
D RPCERRS^MAGUERR1(.RESULTS,RC)
Q
;
;***** RETURNS THE LIST OF IMAGE DESCRIPTORS
; RPC: MAG4 IMAGE LIST
;
; .MAGOUT Reference to a local variable where the results
; are returned to.
;
; FLAGS Flags that control the execution (can be combined):
;
; C Capture date range. If this flag is provided,
; then the remote procedure uses values of the
; FROMDATE and TODATE parameters to select images
; that were captured in this date range.
;
; Otherwise, values of those parameters are
; treated as the date range when procedures were
; performed.
;
; D Include only deleted images (file #2005.1)
; E Include only existing images (file #2005)
;
; S Return the sparse subset of images captured by
; the user defined by the MISCPRMS("SAVEDBY").
; The latter becomes required in this case.
;
; G Include Group Images in the list of images returned.
; If any image in a group has an image that matches the
; status provided in the search criteria then
; the group will be returned.
;
; If the G flag is not set then only the status of the
; Group entry will be checked and the group will be
; returned if it passes.
;
; See description of the MAG4 IMAGE LIST remote
; procedure for details.
;
; If neither 'E' nor 'D' flag is provided, then an
; error code is returned.
;
; [FROMDATE] Date range for image selection. Dates can be in
; [TODATE] internal or external FileMan format. If a date
; parameter is not defined or empty, then the date
; range remains open on the corresponding side.
;
; Time parts of parameter values are ignored and both
; ends of the date range are included in the search.
; For example, in order to search images for May 21,
; 2008, the internal value of both parameters should
; be 3080521.
;
; If the FROMDATE is after the TODATE, then values of
; the parameters are swapped.
;
; [MAXNUM] If this parameter is defined and greater than 0,
; then it determines the maximum number of images
; returned by the call.
;
; If the S flag is included in the value of the FLAGS
; parameter, then the MAXNUM parameter must be defined
; and greater than 0. Its value determines percentage
; of preselected images to be returned in the result
; array.
;
; See description of the MAG4 IMAGE LIST remote
; procedure for details.
;
; [.MISCPRMS] Reference to a local variable that stores misc.
; parameters that define the image selection criteria.
; See the description of the MAG4 IMAGE LIST remote
; procedure for details.
;
; Return Values
; =============
;
; If MAGOUT(0) is defined and its 1st '^'-piece is 0, then an error
; occurred during execution of the procedure. In this case, the array
; is formatted as described in the comments to the RPCERRS^MAGUERR1.
;
; See description of the MAG4 IMAGE LIST remote procedure for more
; details.
;
; Notes
; =====
;
; Temporary global nodes ^TMP("MAGSIX1",$J) and ^TMP("MAGSIXG3",$J)
; are used by this procedure.
;
; If the number of images conforming to the filter reaches 76, all
; results are stored in the ^TMP("MAGSIXG1",$J) global node, closed
; reference is assigned to the MAGOUT parameter, and the type of the
; RPC return parameter is changed to 'GLOBAL ARRAY'.
;
GETIMGS(MAGOUT,FLAGS,FROMDATE,TODATE,MAXNUM,MISCPRMS) ;RPC [MAG4 IMAGE LIST]
N MAGDATA ; Array for passing the data to the callback
; ; function of the image query (including the
; ; image selection criteria).
;
N ERROR,MISC,QF,RC,TMP
S (MAGDATA("RESCNT"),RC)=0,MAGDATA="MAGOUT" K MAGOUT
D CLEAR^MAGUERR(1),NETPLCS^MAGGTU6
K ^TMP("MAGSIXG3",$J)
;
S MAXNUM=$G(MAXNUM)
;=== Validate parameters
S ERROR=$$VALPARAM(.MAGDATA,FLAGS,.FROMDATE,.TODATE,MAXNUM,.MISCPRMS)
;
;--- Check for errors
I ERROR D ERROR^MAGUERR(-30),ERRORS(.MAGOUT) Q
;
S MAXNUM=+$G(MAXNUM)
;
;=== Query the image file(s)
S MAGDATA("FLAGS")=FLAGS,MAGDATA("MAXNUM")=MAXNUM
S TMP=$S(TODATE<9999999:$$FMADD^XLFDT(TODATE,1),1:TODATE)
S QF=$$TRFLAGS^MAGUTL05(FLAGS,"CDEG")
S RC=$$QUERY^MAGGI13("$$QRYCBK^MAGSIXG3",QF,.MAGDATA,FROMDATE,TMP,+$G(MAGDATA("IDFN")))
I RC<0 D ERRORS(.MAGOUT,RC) Q
;
;=== Post-processing for the sparse subset query
I FLAGS["S" D I RC<0 D ERRORS(.MAGOUT,RC) Q
. S RC=$$SUBSET^MAGSIXG4()
. Q
;
;=== Cleanup
K ^TMP("MAGSIXG3",$J)
S TMP=$$FLTDESC^MAGSIXG2(.MAGDATA,FROMDATE(0),TODATE(0),FLAGS)
I 'MAGDATA("RESCNT") D ERRORS(.MAGOUT,$$ERROR^MAGUERR(-19,,TMP)) Q
S @MAGDATA@(0)="1^"_TMP_$S($G(MAGDATA("MAXNUM")):U_(RC>0),1:"")
S @MAGDATA@(1)=$$BLDHDR^MAGSIXG2()
Q
;
;***** GET IMAGES FOR THE PATIENT
; RPC: MAG4 PAT GET IMAGES
;
; .MAGOUT Reference to a local variable where the results
; are returned to.
;
; DFN Patient IEN (DFN)
;
; [PKG] Package index(es)
; [CLASS] Class index(es)
; [TYPE] Type index(es)
; [EVENT] Procedure/Event index(es)
; [SPEC] Speciality/SubSpecialty index(es)
;
; [FROMDATE] Date range for image selection. See description
; [TODATE] of the GETIMGS^MAGSIXG1 entry point for details.
;
; [ORIGIN] Origin index(es)
;
; [DATA] Reserved for future use.
;
; [FLAGS] Flags that control the execution (can be combined):
;
; D Include only deleted images (file #2005.1)
; E Include only existing images (file #2005)
;
; By default ($G(FLAGS)=""), the "E" value is assumed.
;
; Return Values
; =============
;
; See description of the MAG4 PAT GET IMAGES remote procedure.
;
PGI(MAGOUT,DFN,PKG,CLASS,TYPE,EVENT,SPEC,FROMDATE,TODATE,ORIGIN,DATA,FLAGS) ;RPC [MAG4 PAT GET IMAGES]
N I,MISCPRMS
K MAGOUT S I=0
;--- Check the patient IEN (DFN)
I $G(DFN)'>0 D ERRORS(.MAGOUT,$$IPVE^MAGUERR("DFN")) Q
S I=I+1,MISCPRMS(I)="IDFN^^"_(+DFN)
;--- Check the flags
S:$G(FLAGS)="" FLAGS="E"
I $TR(FLAGS,"DE")'="" D ERRORS(.MAGOUT,$$IPVE^MAGUERR("FLAGS")) Q
;--- Pass the filter parameters through
S:$G(PKG)'="" I=I+1,MISCPRMS(I)="IXPKG^^"_$TR(PKG,",","^")
S:$G(CLASS)'="" I=I+1,MISCPRMS(I)="IXCLASS^^"_$TR(CLASS,",","^")
S:$G(TYPE)'="" I=I+1,MISCPRMS(I)="IXTYPE^^"_$TR(TYPE,",","^")
S:$G(EVENT)'="" I=I+1,MISCPRMS(I)="IXPROC^^"_$TR(EVENT,",","^")
S:$G(SPEC)'="" I=I+1,MISCPRMS(I)="IXSPEC^^"_$TR(SPEC,",","^")
S:$G(ORIGIN)'="" I=I+1,MISCPRMS(I)="IXORIGIN^^"_$TR(ORIGIN,",","^")
;--- Call the new remote procedure implementation
D GETIMGS(.MAGOUT,FLAGS,.FROMDATE,.TODATE,,.MISCPRMS)
Q
;
VALPARAM(MAGDATA,FLAGS,FROMDATE,TODATE,MAXNUM,MISCPRMS) ; Validate input parameters
N ERROR,MISC,MISCDEFS,RC,TMP
;--- Control flags
S ERROR=0
S FLAGS=$G(FLAGS)
I $TR(FLAGS,"CDESG")'="" D S ERROR=1
. D IPVE^MAGUERR("FLAGS") ; Unknown/Unsupported flag(s)
. Q
I $TR(FLAGS,"DE")=FLAGS D S ERROR=1
. D ERROR^MAGUERR(-6,,"D,E") ; Missing required flag
. Q
;--- Date range
S:$$DTRANGE^MAGUTL03(.FROMDATE,.TODATE)<0 ERROR=1
;--- Miscellaneous parameters
S RC=$$LDMPDEFS^MAGUTL01(.MISCDEFS,"MISCDEFS^MAGSIXG2")
I RC<0 S ERROR=1 Q
S RC=$$RPCMISC^MAGUTL02(.MISCPRMS,.MISC,.MISCDEFS,"UV")
I RC<0 S ERROR=1 Q
S:$$VALMISC^MAGSIXG2(.MISC,.MAGDATA)<0 ERROR=1
;--- Number/percentage of results
I $G(MAXNUM)<0 D
. D IPVE^MAGUERR("MAXNUM") S ERROR=1
. Q
E I FLAGS["S" D
. ;--- Check the percentage
. S TMP=+$G(MAXNUM)
. I 'TMP!(TMP>100) D IPVE^MAGUERR("MAXNUM") S ERROR=1 Q
. S MAGDATA("SUBSET%")=TMP,MAXNUM=0
. ;--- User filter is required for this query
. S TMP=$NA(MAGDATA("SAVEDBY"))
. I $G(@TMP)'>0 D ERROR^MAGUERR(-8,,TMP) S ERROR=1 Q
. Q
;
Q ERROR
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGSIXG1 9836 printed Dec 13, 2024@02:08:21 Page 2
MAGSIXG1 ;WOIFO/EdM/GEK/SEB/SG/NST - LIST OF IMAGES RPCS ; JUN 11, 2018@11:43 AM
+1 ;;3.0;IMAGING;**8,48,59,93,117,221**;Mar 19, 2002;Build 2238;Jul 15, 2011
+2 ;; Per VHA Directive 2004-038, this routine should not be modified.
+3 ;; +---------------------------------------------------------------+
+4 ;; | Property of the US Government. |
+5 ;; | No permission to copy or redistribute this software is given. |
+6 ;; | Use of unreleased versions of this software requires the user |
+7 ;; | to execute a written test agreement with the VistA Imaging |
+8 ;; | Development Office of the Department of Veterans Affairs, |
+9 ;; | telephone (301) 734-0100. |
+10 ;; | The Food and Drug Administration classifies this software as |
+11 ;; | a medical device. As such, it may not be changed in any way. |
+12 ;; | Modifications to this software may result in an adulterated |
+13 ;; | medical device under 21CFR820, the use of which is considered |
+14 ;; | to be a violation of US Federal Statutes. |
+15 ;; +---------------------------------------------------------------+
+16 ;;
+17 QUIT
+18 ;
+19 ;+++++ FORMATS RPC ERRORS
ERRORS(RESULTS,RC) ;
+1 if $GET(RC)'<0
SET RC=$$FIRSTERR^MAGUERR1()
+2 DO RPCERRS^MAGUERR1(.RESULTS,RC)
+3 QUIT
+4 ;
+5 ;***** RETURNS THE LIST OF IMAGE DESCRIPTORS
+6 ; RPC: MAG4 IMAGE LIST
+7 ;
+8 ; .MAGOUT Reference to a local variable where the results
+9 ; are returned to.
+10 ;
+11 ; FLAGS Flags that control the execution (can be combined):
+12 ;
+13 ; C Capture date range. If this flag is provided,
+14 ; then the remote procedure uses values of the
+15 ; FROMDATE and TODATE parameters to select images
+16 ; that were captured in this date range.
+17 ;
+18 ; Otherwise, values of those parameters are
+19 ; treated as the date range when procedures were
+20 ; performed.
+21 ;
+22 ; D Include only deleted images (file #2005.1)
+23 ; E Include only existing images (file #2005)
+24 ;
+25 ; S Return the sparse subset of images captured by
+26 ; the user defined by the MISCPRMS("SAVEDBY").
+27 ; The latter becomes required in this case.
+28 ;
+29 ; G Include Group Images in the list of images returned.
+30 ; If any image in a group has an image that matches the
+31 ; status provided in the search criteria then
+32 ; the group will be returned.
+33 ;
+34 ; If the G flag is not set then only the status of the
+35 ; Group entry will be checked and the group will be
+36 ; returned if it passes.
+37 ;
+38 ; See description of the MAG4 IMAGE LIST remote
+39 ; procedure for details.
+40 ;
+41 ; If neither 'E' nor 'D' flag is provided, then an
+42 ; error code is returned.
+43 ;
+44 ; [FROMDATE] Date range for image selection. Dates can be in
+45 ; [TODATE] internal or external FileMan format. If a date
+46 ; parameter is not defined or empty, then the date
+47 ; range remains open on the corresponding side.
+48 ;
+49 ; Time parts of parameter values are ignored and both
+50 ; ends of the date range are included in the search.
+51 ; For example, in order to search images for May 21,
+52 ; 2008, the internal value of both parameters should
+53 ; be 3080521.
+54 ;
+55 ; If the FROMDATE is after the TODATE, then values of
+56 ; the parameters are swapped.
+57 ;
+58 ; [MAXNUM] If this parameter is defined and greater than 0,
+59 ; then it determines the maximum number of images
+60 ; returned by the call.
+61 ;
+62 ; If the S flag is included in the value of the FLAGS
+63 ; parameter, then the MAXNUM parameter must be defined
+64 ; and greater than 0. Its value determines percentage
+65 ; of preselected images to be returned in the result
+66 ; array.
+67 ;
+68 ; See description of the MAG4 IMAGE LIST remote
+69 ; procedure for details.
+70 ;
+71 ; [.MISCPRMS] Reference to a local variable that stores misc.
+72 ; parameters that define the image selection criteria.
+73 ; See the description of the MAG4 IMAGE LIST remote
+74 ; procedure for details.
+75 ;
+76 ; Return Values
+77 ; =============
+78 ;
+79 ; If MAGOUT(0) is defined and its 1st '^'-piece is 0, then an error
+80 ; occurred during execution of the procedure. In this case, the array
+81 ; is formatted as described in the comments to the RPCERRS^MAGUERR1.
+82 ;
+83 ; See description of the MAG4 IMAGE LIST remote procedure for more
+84 ; details.
+85 ;
+86 ; Notes
+87 ; =====
+88 ;
+89 ; Temporary global nodes ^TMP("MAGSIX1",$J) and ^TMP("MAGSIXG3",$J)
+90 ; are used by this procedure.
+91 ;
+92 ; If the number of images conforming to the filter reaches 76, all
+93 ; results are stored in the ^TMP("MAGSIXG1",$J) global node, closed
+94 ; reference is assigned to the MAGOUT parameter, and the type of the
+95 ; RPC return parameter is changed to 'GLOBAL ARRAY'.
+96 ;
GETIMGS(MAGOUT,FLAGS,FROMDATE,TODATE,MAXNUM,MISCPRMS) ;RPC [MAG4 IMAGE LIST]
+1 ; Array for passing the data to the callback
NEW MAGDATA
+2 ; ; function of the image query (including the
+3 ; ; image selection criteria).
+4 ;
+5 NEW ERROR,MISC,QF,RC,TMP
+6 SET (MAGDATA("RESCNT"),RC)=0
SET MAGDATA="MAGOUT"
KILL MAGOUT
+7 DO CLEAR^MAGUERR(1)
DO NETPLCS^MAGGTU6
+8 KILL ^TMP("MAGSIXG3",$JOB)
+9 ;
+10 SET MAXNUM=$GET(MAXNUM)
+11 ;=== Validate parameters
+12 SET ERROR=$$VALPARAM(.MAGDATA,FLAGS,.FROMDATE,.TODATE,MAXNUM,.MISCPRMS)
+13 ;
+14 ;--- Check for errors
+15 IF ERROR
DO ERROR^MAGUERR(-30)
DO ERRORS(.MAGOUT)
QUIT
+16 ;
+17 SET MAXNUM=+$GET(MAXNUM)
+18 ;
+19 ;=== Query the image file(s)
+20 SET MAGDATA("FLAGS")=FLAGS
SET MAGDATA("MAXNUM")=MAXNUM
+21 SET TMP=$SELECT(TODATE<9999999:$$FMADD^XLFDT(TODATE,1),1:TODATE)
+22 SET QF=$$TRFLAGS^MAGUTL05(FLAGS,"CDEG")
+23 SET RC=$$QUERY^MAGGI13("$$QRYCBK^MAGSIXG3",QF,.MAGDATA,FROMDATE,TMP,+$GET(MAGDATA("IDFN")))
+24 IF RC<0
DO ERRORS(.MAGOUT,RC)
QUIT
+25 ;
+26 ;=== Post-processing for the sparse subset query
+27 IF FLAGS["S"
Begin DoDot:1
+28 SET RC=$$SUBSET^MAGSIXG4()
+29 QUIT
End DoDot:1
IF RC<0
DO ERRORS(.MAGOUT,RC)
QUIT
+30 ;
+31 ;=== Cleanup
+32 KILL ^TMP("MAGSIXG3",$JOB)
+33 SET TMP=$$FLTDESC^MAGSIXG2(.MAGDATA,FROMDATE(0),TODATE(0),FLAGS)
+34 IF 'MAGDATA("RESCNT")
DO ERRORS(.MAGOUT,$$ERROR^MAGUERR(-19,,TMP))
QUIT
+35 SET @MAGDATA@(0)="1^"_TMP_$SELECT($GET(MAGDATA("MAXNUM")):U_(RC>0),1:"")
+36 SET @MAGDATA@(1)=$$BLDHDR^MAGSIXG2()
+37 QUIT
+38 ;
+39 ;***** GET IMAGES FOR THE PATIENT
+40 ; RPC: MAG4 PAT GET IMAGES
+41 ;
+42 ; .MAGOUT Reference to a local variable where the results
+43 ; are returned to.
+44 ;
+45 ; DFN Patient IEN (DFN)
+46 ;
+47 ; [PKG] Package index(es)
+48 ; [CLASS] Class index(es)
+49 ; [TYPE] Type index(es)
+50 ; [EVENT] Procedure/Event index(es)
+51 ; [SPEC] Speciality/SubSpecialty index(es)
+52 ;
+53 ; [FROMDATE] Date range for image selection. See description
+54 ; [TODATE] of the GETIMGS^MAGSIXG1 entry point for details.
+55 ;
+56 ; [ORIGIN] Origin index(es)
+57 ;
+58 ; [DATA] Reserved for future use.
+59 ;
+60 ; [FLAGS] Flags that control the execution (can be combined):
+61 ;
+62 ; D Include only deleted images (file #2005.1)
+63 ; E Include only existing images (file #2005)
+64 ;
+65 ; By default ($G(FLAGS)=""), the "E" value is assumed.
+66 ;
+67 ; Return Values
+68 ; =============
+69 ;
+70 ; See description of the MAG4 PAT GET IMAGES remote procedure.
+71 ;
PGI(MAGOUT,DFN,PKG,CLASS,TYPE,EVENT,SPEC,FROMDATE,TODATE,ORIGIN,DATA,FLAGS) ;RPC [MAG4 PAT GET IMAGES]
+1 NEW I,MISCPRMS
+2 KILL MAGOUT
SET I=0
+3 ;--- Check the patient IEN (DFN)
+4 IF $GET(DFN)'>0
DO ERRORS(.MAGOUT,$$IPVE^MAGUERR("DFN"))
QUIT
+5 SET I=I+1
SET MISCPRMS(I)="IDFN^^"_(+DFN)
+6 ;--- Check the flags
+7 if $GET(FLAGS)=""
SET FLAGS="E"
+8 IF $TRANSLATE(FLAGS,"DE")'=""
DO ERRORS(.MAGOUT,$$IPVE^MAGUERR("FLAGS"))
QUIT
+9 ;--- Pass the filter parameters through
+10 if $GET(PKG)'=""
SET I=I+1
SET MISCPRMS(I)="IXPKG^^"_$TRANSLATE(PKG,",","^")
+11 if $GET(CLASS)'=""
SET I=I+1
SET MISCPRMS(I)="IXCLASS^^"_$TRANSLATE(CLASS,",","^")
+12 if $GET(TYPE)'=""
SET I=I+1
SET MISCPRMS(I)="IXTYPE^^"_$TRANSLATE(TYPE,",","^")
+13 if $GET(EVENT)'=""
SET I=I+1
SET MISCPRMS(I)="IXPROC^^"_$TRANSLATE(EVENT,",","^")
+14 if $GET(SPEC)'=""
SET I=I+1
SET MISCPRMS(I)="IXSPEC^^"_$TRANSLATE(SPEC,",","^")
+15 if $GET(ORIGIN)'=""
SET I=I+1
SET MISCPRMS(I)="IXORIGIN^^"_$TRANSLATE(ORIGIN,",","^")
+16 ;--- Call the new remote procedure implementation
+17 DO GETIMGS(.MAGOUT,FLAGS,.FROMDATE,.TODATE,,.MISCPRMS)
+18 QUIT
+19 ;
VALPARAM(MAGDATA,FLAGS,FROMDATE,TODATE,MAXNUM,MISCPRMS) ; Validate input parameters
+1 NEW ERROR,MISC,MISCDEFS,RC,TMP
+2 ;--- Control flags
+3 SET ERROR=0
+4 SET FLAGS=$GET(FLAGS)
+5 IF $TRANSLATE(FLAGS,"CDESG")'=""
Begin DoDot:1
+6 ; Unknown/Unsupported flag(s)
DO IPVE^MAGUERR("FLAGS")
+7 QUIT
End DoDot:1
SET ERROR=1
+8 IF $TRANSLATE(FLAGS,"DE")=FLAGS
Begin DoDot:1
+9 ; Missing required flag
DO ERROR^MAGUERR(-6,,"D,E")
+10 QUIT
End DoDot:1
SET ERROR=1
+11 ;--- Date range
+12 if $$DTRANGE^MAGUTL03(.FROMDATE,.TODATE)<0
SET ERROR=1
+13 ;--- Miscellaneous parameters
+14 SET RC=$$LDMPDEFS^MAGUTL01(.MISCDEFS,"MISCDEFS^MAGSIXG2")
+15 IF RC<0
SET ERROR=1
QUIT
+16 SET RC=$$RPCMISC^MAGUTL02(.MISCPRMS,.MISC,.MISCDEFS,"UV")
+17 IF RC<0
SET ERROR=1
QUIT
+18 if $$VALMISC^MAGSIXG2(.MISC,.MAGDATA)<0
SET ERROR=1
+19 ;--- Number/percentage of results
+20 IF $GET(MAXNUM)<0
Begin DoDot:1
+21 DO IPVE^MAGUERR("MAXNUM")
SET ERROR=1
+22 QUIT
End DoDot:1
+23 IF '$TEST
IF FLAGS["S"
Begin DoDot:1
+24 ;--- Check the percentage
+25 SET TMP=+$GET(MAXNUM)
+26 IF 'TMP!(TMP>100)
DO IPVE^MAGUERR("MAXNUM")
SET ERROR=1
QUIT
+27 SET MAGDATA("SUBSET%")=TMP
SET MAXNUM=0
+28 ;--- User filter is required for this query
+29 SET TMP=$NAME(MAGDATA("SAVEDBY"))
+30 IF $GET(@TMP)'>0
DO ERROR^MAGUERR(-8,,TMP)
SET ERROR=1
QUIT
+31 QUIT
End DoDot:1
+32 ;
+33 QUIT ERROR