DDXP41 ;SFISC/DPC-EXPORT DATA (CONT) ;1/8/93  09:18
 ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
 ;;Per VA Directive 6402, this routine should not be modified.
 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
 ;;Licensed under the terms of the Apache License, Version 2.0.
 ;
SORTVAL ;
 N DDXPNG,CHK
 S DDXPNG=0
 F CHK="#","!","+","@" D
 . I $E(X)=CHK S DDXPNG=1 W !!,$C(7),"SORRY.  You cannot use the "_CHK_" sort qualifier when exporting data.",!
 . Q
 F CHK=";C",";S" D
 . I X[CHK S DDXPNG=1 W !!,$C(7),"SORRY.  Using "_CHK_" will have no effect when exporting data.",!
 . Q
 I X[";""" S DDXPNG=1 W !!,$C(7),"SORRY.  You cannot replace a caption with a literal when exporting data.",!
 K:DDXPNG X
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDDXP41   802     printed  Sep 23, 2025@20:20:21                                                                                                                                                                                                       Page 2
DDXP41    ;SFISC/DPC-EXPORT DATA (CONT) ;1/8/93  09:18
 +1       ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
 +2       ;;Per VA Directive 6402, this routine should not be modified.
 +3       ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
 +4       ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
 +5       ;;Licensed under the terms of the Apache License, Version 2.0.
 +6       ;
SORTVAL   ;
 +1        NEW DDXPNG,CHK
 +2        SET DDXPNG=0
 +3        FOR CHK="#","!","+","@"
               Begin DoDot:1
 +4                IF $EXTRACT(X)=CHK
                       SET DDXPNG=1
                       WRITE !!,$CHAR(7),"SORRY.  You cannot use the "_CHK_" sort qualifier when exporting data.",!
 +5                QUIT 
               End DoDot:1
 +6        FOR CHK=";C",";S"
               Begin DoDot:1
 +7                IF X[CHK
                       SET DDXPNG=1
                       WRITE !!,$CHAR(7),"SORRY.  Using "_CHK_" will have no effect when exporting data.",!
 +8                QUIT 
               End DoDot:1
 +9        IF X[";"""
               SET DDXPNG=1
               WRITE !!,$CHAR(7),"SORRY.  You cannot replace a caption with a literal when exporting data.",!
 +10       if DDXPNG
               KILL X
 +11       QUIT