Changeset 301 for ccr/trunk


Ignore:
Timestamp:
Dec 8, 2008, 12:59:46 PM (16 years ago)
Author:
George Lilly
Message:

updates to GETNC0CRNF .. changed GET to GETN

Location:
ccr/trunk/p
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CDIC.m

    r300 r301  
    122122 . ;W C0CZX,!
    123123 . K C0CA,C0CN ; CLEAR OUT THE LAST ONE
    124  . D GET^C0CRNF("C0CA",170,C0CZX,"ALL") ; GET VARIABLE HASH
     124 . D GETN^C0CRNF("C0CA",170,C0CZX,"ALL") ; GET VARIABLE HASH
    125125 . ;ZWR C0CA B ;
    126126 . S C0CN=$$ZVALUE("VARIABLE") ;NAME OF THE VARIABLE
  • ccr/trunk/p/C0CRNF.m

    r300 r301  
    4343 Q
    4444 ;
    45 GET(GRTN,GFILE,GIEN,GNN) ; RETURN THE DICTIONARY RECORD GIEN IN ARRAY GRTN, PASSED
    46  ; BY NAME
     45GETN(GRTN,GFILE,GIEN,GNN) ; GET FIELDS FOR ACCESS BY NAME
     46 ; GRTN IS PASSED BY NAME
    4747 ;
    4848 N C0CTMP,C0CI,C0CJ,C0CREF,C0CNAME
     
    6868 Q
    6969 ;
    70 GET2(GRTN,GFILE,GREF,GNDX,GNN) ; NEW GET ;GPL ;RETURN THE DICTIONARY RECORD GIEN IN ARRAY GRTN, PASSED
    71  ; BY NAME
    72  ; GET IS AN EXTRINSIC WHICH RETURNS THE NEXT IEN AFTER THE CURRENT GIEN
     70GETN2(GRTN,GFILE,GREF,GNDX,GNN) ; NEW GET ;GPL ; RETURN A FIELD VALUE MAP
     71 ; GETN IS AN EXTRINSIC WHICH RETURNS THE NEXT IEN AFTER THE CURRENT GIEN
     72 ; GRTN, PASSED BY NAME, RETURNS A FIELD MAP AND A VALUE MAP
     73 ; .. FIELD MAP @GRTN@("F","FIELDNAME^FILE^FIELD#")=""
     74 ; ... ANY FIELD USED BY ANY RECORD PROCESSED IS IN THE FIELD MAP
     75 ; .. VALUE MAP @GRTN@("V","IEN","FIELDNAME")=VALUE
     76 ; .. GRTN IS NOT INITIALIZED, SO MULTIPLE CALLS ARE CUMULATIVE
     77 ; .. IF GNN="ALL" THEN ALL FIELDS FOR THE FILE ARE IN THE FIELD MAP
     78 ; .. EVEN IF GNN="ALL" ONLY POPULATED FIELDS ARE RETURNED IN THE VALUE MAP
     79 ; .. NUL FIELDS CAN BE DETERMINED BY CHECKING FIELD MAP - THIS SAVES SPACE
    7380 ; IF GREF IS "" THE FIRST RECORD IS OBTAINED
    7481 ; IF GNDX IS NULL, GREF IS AN IEN FOR THE FILE
     
    7784 ; GANN= NOT NULL - IF GANN IS "ALL" THEN EVEN NULL FIELDS WILL BE RETURNED
    7885 ; OTHERWISE, ONLY POPULATED FIELDS ARE RETURNED IN GRTN
    79  ;
    8086 ;
    81  N GIEN
     87 ;
     88 N GIEN,GF
     89 S GF=$$FILEREF(GFILE) ;CLOSED FILE REFERENCE FOR FILE NUMBER GFILE
    8290 I '$D(GNDX) S GIEN=GREF ; IF NO INDEX USED, GREF IS THE IEN
    8391 E  D  ; WE ARE USING AN INDEX
    84  .
     92 . ;N ZG
     93 . S ZG=$Q(@GF@(GNDX,GREF)) ;ACCESS INDEX
     94 . I $QS(ZG,3)=GREF D  ; IS GREF IN INDEX?
     95 . . S GIEN=$QS(ZG,4) ; PULL OUT THE IEN
     96 . E  S GIEN="" ; NOT FOUND IN INDEX
     97 W "IEN: ",GIEN,!
    8598 N C0CTMP,C0CI,C0CJ,C0CREF,C0CNAME
    8699 I $D(GNN) I GNN="ALL" S C0CNN=0 ; NOT NON-NULL (ALL FIELDS TO BE RETURNED)
     
    105118 Q
    106119 ;
    107 GETALL(GARFLD,GARVAL,GAFILE,GACNT,GASTRT,GANN) ; RETURN FIELD MAP AND VALUES
    108  ; GARFLD, PASSED BY NAME, RETURNS FIELD MAP @GARFLD@("FIELDNAME")
    109  ; .. ANY FIELD USED BY ANY RECORD PROCESSED IS IN THE FIELD MAP
    110  ; .. GARFLD IS NOT INITIALIZED, SO MULTIPLE CALLS ARE CUMULATIVE
     120GETALL(GARTN,GAFILE,GACNT,GASTRT,GANN) ; RETURN FIELD MAP AND VALUES
     121 ; GARTN, PASSED BY NAME, RETURNS A FIELD MAP AND A VALUE MAP
     122 ; .. FIELD MAP @GARTN@("F","FIELDNAME^FILE^FIELD#")=""
     123 ; ... ANY FIELD USED BY ANY RECORD PROCESSED IS IN THE FIELD MAP
     124 ; .. VALUE MAP @GARTN@("V","IEN","FIELDNAME")=VALUE
     125 ; .. GARTN IS NOT INITIALIZED, SO MULTIPLE CALLS ARE CUMULATIVE
    111126 ; .. IF GANN="ALL" THEN ALL FIELDS FOR THE FILE ARE IN THE FIELD MAP
    112  ; GARVAL, PASSED BY NAME, RETURNS VALUES AS @GARVAL@(IEN,"FIELDNAME")=VALUE
    113  ; .. FOR EVERY RECORD PROCESSED. IT IS NOT INITIALEZED SO IT IS CUMMULATIVE
    114  ; .. EVEN IF GANN="ALL" ONLY POPULATED FIELDS ARE RETURNED IN GARVAL
    115  ; .. NUL FIELDS CAN BE DETERMINED BY CHECKING GARFLD - THIS SAVES SPACE
    116  ; GARFILE IS THE FILE NUMBER TO BE PROCESSED. IT IS PASSED BY VALUE
    117  ; GARCNT IS THE NUMBER OF RECORDS TO PROCESS. IT IS PASSED BY VALUE
     127 ; .. EVEN IF GANN="ALL" ONLY POPULATED FIELDS ARE RETURNED IN THE VALUE MAP
     128 ; .. NUL FIELDS CAN BE DETERMINED BY CHECKING FIELD MAP - THIS SAVES SPACE
     129 ; GAFILE IS THE FILE NUMBER TO BE PROCESSED. IT IS PASSED BY VALUE
     130 ; GACNT IS THE NUMBER OF RECORDS TO PROCESS. IT IS PASSED BY VALUE
    118131 ; .. IF GARCNT IS NULL, ALL RECORDS ARE PROCESSED
    119  ; GARSTRT IS THE IEN OF THE FIRST RECORD TO PROCESS. IT IS PASSED BY VALUE
     132 ; GASTRT IS THE IEN OF THE FIRST RECORD TO PROCESS. IT IS PASSED BY VALUE
    120133 ; .. IF GARSTART IS NULL, PROCESSING STARTS AT THE FIRST RECORD
    121134 ; GANN= NOT NULL - IF GANN IS "ALL" THEN EVEN NULL FIELDS WILL BE RETURNED
     
    131144FILEREF(FNUM) ; EXTRINSIC THAT RETURNS A CLOSED ROOT FOR FILE NUMBER FNUM
    132145 ;
    133  N C0CF 
     146 N C0CF
    134147 S C0CF=^DIC(FNUM,0,"GL") ;OPEN ROOT TO FILE
    135148 S C0CF=$P(C0CF,",",1)_")" ; CLOSE THE ROOT
Note: See TracChangeset for help on using the changeset viewer.