[613] | 1 | SCCVDBU ;ALB/RMO,TMP - Database Update Utilities; [ 03/23/95 11:08 AM ]
|
---|
| 2 | ;;5.3;Scheduling;**211**;Aug 13, 1993
|
---|
| 3 | ;
|
---|
| 4 | UPD(SCFILE,SCIENS,SCDATA,SCERR) ;File data into an existing entry
|
---|
| 5 | ; Input -- SCFILE File or sub-file number
|
---|
| 6 | ; SCIENS Internal entry number(s)
|
---|
| 7 | ; SCDATA Data array to file
|
---|
| 8 | ; Output -- SCERR DEFINED=error
|
---|
| 9 | N SCFDA,SCFIELD
|
---|
| 10 | S SCFIELD=0
|
---|
| 11 | F S SCFIELD=$O(SCDATA(SCFIELD)) Q:'SCFIELD D
|
---|
| 12 | . S SCFDA(SCFILE,SCIENS_",",SCFIELD)=$G(SCDATA(SCFIELD))
|
---|
| 13 | D FILE^DIE("K","SCFDA","")
|
---|
| 14 | I $G(DIERR) S SCERR=U_$G(^TMP("DIERR",$J,$P(DIERR,U,2),"TEXT",1))
|
---|
| 15 | D CLEAN^DILF
|
---|
| 16 | UPDQ Q
|
---|
| 17 | ;
|
---|
| 18 | ADD(SCFILE,SCIENS,SCDATA,SCERR) ;File data into a new or existing entry
|
---|
| 19 | ; Input -- SCFILE File or sub-file number
|
---|
| 20 | ; SCIENS Internal entry number(s)
|
---|
| 21 | ; SCDATA Data array to file
|
---|
| 22 | ; Output -- SCERR DEFINED=error
|
---|
| 23 | N SCFDA,SCFIELD
|
---|
| 24 | S SCFIELD=0
|
---|
| 25 | F S SCFIELD=$O(SCDATA(SCFIELD)) Q:'SCFIELD D
|
---|
| 26 | . S SCFDA(SCFILE,SCIENS_",",SCFIELD)=$G(SCDATA(SCFIELD))
|
---|
| 27 | D UPDATE^DIE("","SCFDA","","")
|
---|
| 28 | I $G(DIERR) S SCERR=U_$G(^TMP("DIERR",$J,$P(DIERR,U,2),"TEXT",1))
|
---|
| 29 | D CLEAN^DILF
|
---|
| 30 | ADDQ Q
|
---|
| 31 | ;
|
---|
| 32 | WP(SCFILE,SCIENS,SCFIELD,SCDATA) ;File data into a single word processing field
|
---|
| 33 | ; Input -- SCFILE File or sub-file number
|
---|
| 34 | ; SCIENS Internal entry number(s)
|
---|
| 35 | ; SCFIELD Field number
|
---|
| 36 | ; SCDATA Data array to file
|
---|
| 37 | ; Output -- ;add- SCERR 0=error and 1=no error
|
---|
| 38 | D WP^DIE(SCFILE,SCIENS_",",SCFIELD,"AK","SCDATA(""WP"")","")
|
---|
| 39 | D CLEAN^DILF
|
---|
| 40 | WPQ Q
|
---|