Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: INHSZ72

INHSZ72.m

Go to the documentation of this file.
  1. INHSZ72 ;JSH; 29 Sep 93 11:42;Script Compiler - FILE command
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. FILE ;Process a FILE command
  1. I MULT!OTHER!FILEB D ERROR^INHSZ0("Cannot nest a FILE block.",1) Q
  1. N %1,F,V
  1. S %1=$$LBTB^UTIL($P(LINE,COMM,2,99)),F=$$LBTB^UTIL($P(%1,";")),V=$$LBTB^UTIL($P(%1,";",2))
  1. I F="" D ERROR^INHSZ0("File missing from FILE command.",1) Q
  1. I V="" D ERROR^INHSZ0("Variable missing from FILE command.",1) Q
  1. I '$D(DICOMPX(V)) D WARN^INHSZ0("Identifier variable in FILE command not known.",1)
  1. I F,'$D(^DIC(F,0)) D ERROR^INHSZ0("File #"_F_" not found.",1) Q
  1. I 'F D Q:ER
  1. . S DIC=1,DIC(0)="",X=F X "N F,V D ^DIC" I Y<0 D ERROR^INHSZ0("File '"_F_"' is unknown or ambiguous.",1) Q
  1. . S F=+Y
  1. S FILE=F_^DIC(F,0,"GL"),FILEB=1,LOOKUP=0
  1. S A=" ;"_LINE D L
  1. I '$D(LVARS(V)) D Q
  1. . S A=" K MDESC S INDA=0,IDENT=$G(@INV@("""_V_""")),MDESC(2)="".01 = ""_IDENT K FIELD" D L
  1. . S LPARAM="",IDENT=1,MCNT=2
  1. ;If var is a loop
  1. D RLB^INHSZ51
  1. Q
  1. ;
  1. ENDFILE ;End of FILE block
  1. ;I REPEAT S UP^INHSZ1 S SLVL=SLVL-1,FILEB=0
  1. Q
  1. L ;Should be call to another routine
  1. Q
  1. ;