From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 25-JUN-1991 05:43:55.27
To:	ARISIA::EVERHART
CC:	
Subj:	REMPRTSMB part 3 of 3

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.101)
	 id AA06366; Tue, 25 Jun 91 05:33:21 EDT
Message-Id:  <9106250933.AA06366@crdgw1.ge.com>
Received: From CUNYVM.CUNY.EDU by CRVAX.SRI.COM with TCP; Tue, 25 JUN 91 02:10:45 PDT
Received: from DGOGWDG1.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.2.2MX) with BSMTP id 5978; Tue, 25 Jun 91 05:10:27 EDT
Received: from dnet.gwdg.de by DGOGWDG1.BITNET (Mailer R2.07) with BSMTP id
 2238; Tue, 25 Jun 91 11:07:30 MSZ
Date:    Tue, 25 Jun 1991 11:07:19 +0200
From: "GWDGV1::MOELLER" <moeller%gwdgv1.dnet.gwdg.de@CUNYVM.CUNY.EDU>
To: info-vax@sri.com, vmsnet-sources@ucbvax.berkeley.edu
Subject: REMPRTSMB part 3 of 3

+-+-+-+ Beginning of part 3 +-+-+-+
X`009`009`009rms_abort(wap);
X`009`009`009psm$report(&wap->wk_scbp,&status);
X`009`009`009return;
X`009`009`125
X`009`009break;
X
X`009/***********/
X`009  case close3:
X`009`009status = wap->wk_fab.fab$l_sts;
X`009`009wap->wk_state = closed;`009`009`009/* it got to be ... */
X#endif
X`009`009psm$report(&wap->wk_scbp,&status);
X`009`009break;
X
X`009/***********/
X`009  case aborting:
X`009`009rms_abort(wap);
X`009`009if(wap->wk_scbp != NULL) `123`009`009/* only if desired */
X`009`009`009psm$report(&wap->wk_scbp,&0);
X`009`009`125
X`009`009break;
X
X`009/***********/
X`009  default:
X`009`009lib$stop(0x10000004,1,wap->wk_state);
X`009`009break;
X`009`125
X
X`009return;
X
Xset_open_timer:`009`009/* set timer & later retry $create */
X`009`123
X`009`009unsigned bintim[2];
X`009`009$DESCRIPTOR(timdsc,"0 0:2:0");
X
X`009`009sys$bintim(&timdsc,&bintim);
X
X`009`009wap->wk_state = open1t;
X`009`009status = sys$setimr(0,&bintim,rms_ast,&wap->wk_rab);
X`009`009if((status & 1) == 0) `123
X`009`009`009lib$stop(status `124 0x10000000);
X`009`009`125
X`009`125
X`125
X
X/**`009AST-subroutine: cancel open loop`009**/
X
Xstatic void rms_open_cancel(
X`009WORKAREA *wap)
X`123
X`009switch(wap->wk_state) `123
X
X`009  case open1t:
X`009`009sys$cantim(&wap->wk_rab,0);`009/* try to cancel timer`009*/
X`009  case open1:
X`009`009wap->wk_state = closed;`009`009/* no more open pending`009*/
X`009`009psm$report(&wap->wk_scbp,&0);`009`009/* open failed`009*/
X`009`009break;
X
X#ifdef ASY_FAB
X`009  case open2:
X#endif
X`009  case open3:
X`009`009wap->wk_state = aborting;`009/* no more open pending`009*/
X`009`009/* AST will call psm$report */
X`009`009break;
X`009`125
X`125
X
X/*****`009 allocate output q-element `009*****/
X
Xstatic OUTPUTQELT *oq_alloc(void)
X`123
X`009unsigned status;
X`009OUTPUTQELT *qp;
X
X
X`009if(oq_vm_zone == NULL) `123
X`009`009status = lib$create_vm_zone(&oq_vm_zone,
X`009`009`009`009&LIB$K_VM_FIXED,&sizeof(OUTPUTQELT));
X`009`009if((status & 1) == 0) lib$stop(status `124 0x10000000);
X`009`125
X
X`009status = lib$get_vm(&sizeof(OUTPUTQELT),&qp,&oq_vm_zone);
X`009if((status & 1) == 0) lib$stop(status `124 0x10000000);
X
X`009return qp;
X`125
X
X/*****/
X
X#ifdef OPTRACE
X
Xstatic unsigned opermsg(char *text)
X`123
X#include opcdef
X`009extern unsigned sys$sndopr(const DESCR *, unsigned);
X
X`009int l;
X`009struct `123
X`009`009unsigned func;
X`009`009unsigned rqstid;
X`009`009char buf[120];
X`009`125 opcbuf;
X`009DESCR bufdsc = `1230-0, DSC$K_DTYPE_T, DSC$K_CLASS_S, opcbuf`125;
X
X
X`009opcbuf.func = OPC$_RQ_RQST `124 (OPC$M_NM_CENTRL<<8);
X`009opcbuf.rqstid = 0;
X`009l = strlen(text);
X`009if(l > 120) l = 120;
X`009memcpy(opcbuf.buf,text,l);
X`009bufdsc.dsc$w_length = l + offsetof(struct opcbuf,buf);
X`009return sys$sndopr(&bufdsc,0);
X`125
X#endif
$ GOSUB UNPACK_FILE

$ FILE_IS = "ITRMLEN.MAR"
$ CHECKSUM_IS = 1426158636
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X`009.title`009ITRMLEN`009`009length of "trimmed" string
X;
X;`009integer*4 function itrmlen(str)
X;`009character*(*) str
X;c
X;`009itrmlen=len(str)
X;`009do while(itrmlen.gt.0)
X;`009`009if(str(itrmlen:itrmlen).ne.' ') return
X;`009`009itrmlen=itrmlen-1
X;`009enddo
X;`009return
X;`009end
X;
X`009.entry`009ITRMLEN,`094m<>
X`009movq`009@1*4(ap),r0
X`009movzwl`009r0,r0
X1$:
X`009bleq`0099$
X`009cmpb`009-1(r1)[r0],#32
X`009bneq`0099$
X`009decl`009r0
X`009brb`0091$
X9$:
X`009ret
X`009.end
$ GOSUB UNPACK_FILE

$ FILE_IS = "PRVDEF.H"
$ CHECKSUM_IS = 1382967201
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X/*
X * definitions created by C_GBLINI at 11-MAY-1990 18:27:16.63
X */
X#define`009PRV$M_CMKRNL`0091
X#define`009PRV$M_CMEXEC`0092
X#define`009PRV$M_SYSNAM`0094
X#define`009PRV$M_GRPNAM`0098
X#define`009PRV$M_ALLSPOOL`00916
X#define`009PRV$M_DETACH`00932
X#define`009PRV$M_DIAGNOSE`00964
X#define`009PRV$M_LOG_IO`009128
X#define`009PRV$M_GROUP`009256
X#define`009PRV$M_NOACNT`009512
X#define`009PRV$M_PRMCEB`0091024
X#define`009PRV$M_PRMMBX`0092048
X#define`009PRV$M_PSWAPM`0094096
X#define`009PRV$M_SETPRI`0098192
X#define`009PRV$M_SETPRV`00916384
X#define`009PRV$M_TMPMBX`00932768
X#define`009PRV$M_WORLD`00965536
X#define`009PRV$M_MOUNT`009131072
X#define`009PRV$M_OPER`009262144
X#define`009PRV$M_EXQUOTA`009524288
X#define`009PRV$M_NETMBX`0091048576
X#define`009PRV$M_VOLPRO`0092097152
X#define`009PRV$M_PHY_IO`0094194304
X#define`009PRV$M_BUGCHK`0098388608
X#define`009PRV$M_PRMGBL`00916777216
X#define`009PRV$M_SYSGBL`00933554432
X#define`009PRV$M_PFNMAP`00967108864
X#define`009PRV$M_SHMEM`009134217728
X#define`009PRV$M_SYSPRV`009268435456
X#define`009PRV$M_BYPASS`009536870912
X#define`009PRV$M_SYSLCK`0091073741824
X#define`009PRV$M_SHARE`009(-2147483648)
X#define`009PRV$M_ACNT`009512
X#define`009PRV$M_ALTPRI`0098192
X#define`009PRV$S_PRVDEF`0095
X#define`009PRV$V_CMKRNL`0090
X#define`009PRV$V_CMEXEC`0091
X#define`009PRV$V_SYSNAM`0092
X#define`009PRV$V_GRPNAM`0093
X#define`009PRV$V_ALLSPOOL`0094
X#define`009PRV$V_DETACH`0095
X#define`009PRV$V_DIAGNOSE`0096
X#define`009PRV$V_LOG_IO`0097
X#define`009PRV$V_GROUP`0098
X#define`009PRV$V_NOACNT`0099
X#define`009PRV$V_PRMCEB`00910
X#define`009PRV$V_PRMMBX`00911
X#define`009PRV$V_PSWAPM`00912
X#define`009PRV$V_SETPRI`00913
X#define`009PRV$V_SETPRV`00914
X#define`009PRV$V_TMPMBX`00915
X#define`009PRV$V_WORLD`00916
X#define`009PRV$V_MOUNT`00917
X#define`009PRV$V_OPER`00918
X#define`009PRV$V_EXQUOTA`00919
X#define`009PRV$V_NETMBX`00920
X#define`009PRV$V_VOLPRO`00921
X#define`009PRV$V_PHY_IO`00922
X#define`009PRV$V_BUGCHK`00923
X#define`009PRV$V_PRMGBL`00924
X#define`009PRV$V_SYSGBL`00925
X#define`009PRV$V_PFNMAP`00926
X#define`009PRV$V_SHMEM`00927
X#define`009PRV$V_SYSPRV`00928
X#define`009PRV$V_BYPASS`00929
X#define`009PRV$V_SYSLCK`00930
X#define`009PRV$V_SHARE`00931
X#define`009PRV$V_UPGRADE`00932
X#define`009PRV$V_DOWNGRADE`00933
X#define`009PRV$V_GRPPRV`00934
X#define`009PRV$V_READALL`00935
X#define`009PRV$V_SECURITY`00938
X#define`009PRV$V_ACNT`0099
X#define`009PRV$V_ALTPRI`00913
X/*
X * end of C_GBLINI definitions
X */
$ GOSUB UNPACK_FILE

$ FILE_IS = "PSMDEF.H"
$ CHECKSUM_IS = 1080760262
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X/*
X * definitions created by C_GBLINI at 24-FEB-1986 11:25:09.24
X */
X#define`009PSM$K_CANCEL`0091
X#define`009PSM$K_CLOSE`0092
X#define`009PSM$K_FORMAT`0093
X#define`009PSM$K_OPEN`0094
X#define`009PSM$K_READ`0095
X#define`009PSM$K_GET_KEY`0096
X#define`009PSM$K_POSITION_TO_KEY`0097
X#define`009PSM$K_REWIND`0098
X#define`009PSM$K_WRITE`0099
X#define`009PSM$K_WRITE_NOFORMAT`00910
X#define`009PSM$K_WRITE_SUPPRESSED`00911
X#define`009PSM$K_PAUSE_TASK`00912
X#define`009PSM$K_RESET_STREAM`00913
X#define`009PSM$K_RESUME_TASK`00914
X#define`009PSM$K_START_STREAM`00915
X#define`009PSM$K_START_TASK`00916
X#define`009PSM$K_STOP_TASK`00917
X#define`009PSM$K_STOP_STREAM`00918
X#define`009PSM$K_PAGE_SETUP`0091
X#define`009PSM$K_PAGE_HEADER`0092
X#define`009PSM$K_LIBRARY_INPUT`0093
X#define`009PSM$K_INPUT_FILTER`0094
X#define`009PSM$K_MAIN_FORMAT`0095
X#define`009PSM$K_OUTPUT_FILTER`0096
X#define`009PSM$K_OUTPUT`0097
X#define`009PSM$K_JOB_SETUP`0098
X#define`009PSM$K_FORM_SETUP`0099
X#define`009PSM$K_JOB_FLAG`00910
X#define`009PSM$K_JOB_BURST`00911
X#define`009PSM$K_FILE_SETUP`00912
X#define`009PSM$K_FILE_FLAG`00913
X#define`009PSM$K_FILE_BURST`00914
X#define`009PSM$K_FILE_SETUP_2`00915
X#define`009PSM$K_MAIN_INPUT`00916
X#define`009PSM$K_FILE_INFORMATION`00917
X#define`009PSM$K_FILE_ERRORS`00918
X#define`009PSM$K_FILE_TRAILER`00919
X#define`009PSM$K_JOB_RESET`00920
X#define`009PSM$K_JOB_TRAILER`00921
X#define`009PSM$K_JOB_COMPLETION`00922
X#define`009PSM$k_max`00923
X#define`009PSM$K_CC_INTERNAL`0091
X#define`009PSM$K_CC_IMPLIED`0092
X#define`009PSM$K_CC_FORTRAN`0093
X#define`009PSM$K_CC_PRINT`0094
X#define`009PSM$K_CC_MAX`0095
X/*
X * end of C_GBLINI definitions
X */
$ GOSUB UNPACK_FILE

$ FILE_IS = "SMBDEF.H"
$ CHECKSUM_IS = 1229038169
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X/*
X * definitions created by C_GBLINI at 24-FEB-1986 11:24:00.62
X */
X#define`009SMBMSG$K_STRUCTURE_LEVEL`0091
X#define`009SMBMSG$K_STRUCTURE_LEVEL_1`0091
X#define`009SMBMSG$K_PAUSE_TASK`0091
X#define`009SMBMSG$K_RESET_STREAM`0092
X#define`009SMBMSG$K_RESUME_TASK`0093
X#define`009SMBMSG$K_START_STREAM`0094
X#define`009SMBMSG$K_START_TASK`0095
X#define`009SMBMSG$K_STOP_STREAM`0096
X#define`009SMBMSG$K_STOP_TASK`0097
X#define`009SMBMSG$K_TASK_COMPLETE`0098
X#define`009SMBMSG$K_TASK_STATUS`0099
X#define`009SMBMSG$K_MAX_REQUEST_CODE`00910
X#define`009SMBMSG$S_REQUEST_HEADER`0094
X#define`009SMBMSG$W_REQUEST_CODE`0090
X#define`009SMBMSG$B_STRUCTURE_LEVEL`0092
X#define`009SMBMSG$B_STREAM_INDEX`0093
X#define`009SMBMSG$K_ACCOUNTING_DATA`0091
X#define`009SMBMSG$K_ACCOUNT_NAME`0092
X#define`009SMBMSG$K_AFTER_TIME`0093
X#define`009SMBMSG$K_ALIGNMENT_PAGES`0094
X#define`009SMBMSG$K_BOTTOM_MARGIN`0095
X#define`009SMBMSG$K_CHARACTERISTICS`0096
X#define`009SMBMSG$K_CHECKPOINT_DATA`0097
X#define`009SMBMSG$K_CONDITION_VECTOR`0098
X#define`009SMBMSG$K_DEVICE_NAME`0099
X#define`009SMBMSG$K_DEVICE_STATUS`00910
X#define`009SMBMSG$K_ENTRY_NUMBER`00911
X#define`009SMBMSG$K_EXECUTOR_QUEUE`00912
X#define`009SMBMSG$K_FILE_COPIES`00913
X#define`009SMBMSG$K_FILE_COUNT`00914
X#define`009SMBMSG$K_FILE_SETUP_MODULES`00915
X#define`009SMBMSG$K_FIRST_PAGE`00916
X#define`009SMBMSG$K_FORM_LENGTH`00917
X#define`009SMBMSG$K_FORM_NAME`00918
X#define`009SMBMSG$K_FORM_SETUP_MODULES`00919
X#define`009SMBMSG$K_FORM_WIDTH`00920
X#define`009SMBMSG$K_FILE_IDENTIFICATION`00921
X#define`009SMBMSG$K_FILE_SPECIFICATION`00922
X#define`009SMBMSG$K_JOB_COPIES`00923
X#define`009SMBMSG$K_JOB_COUNT`00924
X#define`009SMBMSG$K_JOB_NAME`00925
X#define`009SMBMSG$K_JOB_RESET_MODULES`00926
X#define`009SMBMSG$K_LAST_PAGE`00927
X#define`009SMBMSG$K_LEFT_MARGIN`00928
X#define`009SMBMSG$K_LIBRARY_SPECIFICATION`00929
X#define`009SMBMSG$K_MAXIMUM_STREAMS`00930
X#define`009SMBMSG$K_MESSAGE_VECTOR`00931
X#define`009SMBMSG$K_NOTE`00932
X#define`009SMBMSG$K_PAGE_SETUP_MODULES`00933
X#define`009SMBMSG$K_PARAMETER_1`00934
X#define`009SMBMSG$K_PARAMETER_2`00935
X#define`009SMBMSG$K_PARAMETER_3`00936
X#define`009SMBMSG$K_PARAMETER_4`00937
X#define`009SMBMSG$K_PARAMETER_5`00938
X#define`009SMBMSG$K_PARAMETER_6`00939
X#define`009SMBMSG$K_PARAMETER_7`00940
X#define`009SMBMSG$K_PARAMETER_8`00941
X#define`009SMBMSG$K_PRINT_CONTROL`00942
X#define`009SMBMSG$K_PRIORITY`00943
X#define`009SMBMSG$K_QUEUE`00944
X#define`009SMBMSG$K_REFUSE_REASON`00945
X#define`009SMBMSG$K_RELATIVE_PAGE`00946
X#define`009SMBMSG$K_REQUEST_CONTROL`00947
X#define`009SMBMSG$K_REQUEST_RESPONSE`00948
X#define`009SMBMSG$K_RIGHT_MARGIN`00949
X#define`009SMBMSG$K_SEARCH_STRING`00950
X#define`009SMBMSG$K_SEPARATION_CONTROL`00951
X#define`009SMBMSG$K_STOP_CONDITION`00952
X#define`009SMBMSG$K_TIME_QUEUED`00953
X#define`009SMBMSG$K_TOP_MARGIN`00954
X#define`009SMBMSG$K_UIC`00955
X#define`009SMBMSG$K_USER_NAME`00956
X#define`009SMBMSG$K_MAX_ITEM_CODE`00957
X#define`009SMBMSG$S_ITEM_HEADER`0094
X#define`009SMBMSG$W_ITEM_SIZE`0090
X#define`009SMBMSG$W_ITEM_CODE`0092
X#define`009SMBMSG$S_ACCOUNTING_DATA`00916
X#define`009SMBMSG$L_PAGES_PRINTED`0090
X#define`009SMBMSG$l_qio_puts`0094
X#define`009SMBMSG$l_rms_gets`0098
X#define`009SMBMSG$L_CPU_TIME`00912
X#define`009SMBMSG$S_CHECKPOINT_DATA`00924
X#define`009SMBMSG$B_FILLER`0090
X#define`009SMBMSG$B_CHECKPOINT_LEVEL`0091
X#define`009SMBMSG$W_OFFSET`0092
X#define`009SMBMSG$L_CARCON`0094
X#define`009SMBMSG$L_PAGE`0098
X#define`009SMBMSG$L_RECORD_NUMBER`00912
X#define`009SMBMSG$S_USER_KEY`0098
X#define`009SMBMSG$Q_USER_KEY`00916
X#define`009SMBMSG$M_LOWERCASE`0091
X#define`009SMBMSG$M_PAUSE_TASK`0092
X#define`009SMBMSG$M_REMOTE`0094
X#define`009SMBMSG$M_SERVER`0098
X#define`009SMBMSG$M_STALLED`00916
X#define`009SMBMSG$M_STOP_STREAM`00932
X#define`009SMBMSG$M_TERMINAL`00964
X#define`009SMBMSG$M_UNAVAILABLE`009128
X#define`009SMBMSG$S_DEVICE_STATUS`0094
X#define`009SMBMSG$L_DEVICE_FLAGS`0090
X#define`009SMBMSG$V_LOWERCASE`0090
X#define`009SMBMSG$V_PAUSE_TASK`0091
X#define`009SMBMSG$V_REMOTE`0092
X#define`009SMBMSG$V_SERVER`0093
X#define`009SMBMSG$V_STALLED`0094
X#define`009SMBMSG$V_STOP_STREAM`0095
X#define`009SMBMSG$V_TERMINAL`0096
X#define`009SMBMSG$V_UNAVAILABLE`0097
X#define`009SMBMSG$M_DOUBLE_SPACE`0091
X#define`009SMBMSG$M_PAGE_HEADER`0092
X#define`009SMBMSG$M_PAGINATE`0094
X#define`009SMBMSG$M_PASSALL`0098
X#define`009SMBMSG$M_SEQUENCED`00916
X#define`009SMBMSG$M_SHEET_FEED`00932
X#define`009SMBMSG$M_TRUNCATE`00964
X#define`009SMBMSG$M_WRAP`009128
X#define`009SMBMSG$M_RECORD_BLOCKING`009256
X#define`009SMBMSG$S_PRINT_CONTROL`0094
X#define`009SMBMSG$L_PRINT_FLAGS`0090
X#define`009SMBMSG$V_DOUBLE_SPACE`0090
X#define`009SMBMSG$V_PAGE_HEADER`0091
X#define`009SMBMSG$V_PAGINATE`0092
X#define`009SMBMSG$V_PASSALL`0093
X#define`009SMBMSG$V_SEQUENCED`0094
X#define`009SMBMSG$V_SHEET_FEED`0095
X#define`009SMBMSG$V_TRUNCATE`0096
X#define`009SMBMSG$V_WRAP`0097
X#define`009SMBMSG$V_RECORD_BLOCKING`0098
X#define`009SMBMSG$M_ALIGNMENT_MASK`0091
X#define`009SMBMSG$M_PAUSE_COMPLETE`0092
X#define`009SMBMSG$M_RESTARTING`0094
X#define`009SMBMSG$M_TOP_OF_FILE`0098
X#define`009SMBMSG$S_REQUEST`0094
X#define`009SMBMSG$L_REQUEST_FLAGS`0090
X#define`009SMBMSG$V_ALIGNMENT_MASK`0090
X#define`009SMBMSG$V_PAUSE_COMPLETE`0091
X#define`009SMBMSG$V_RESTARTING`0092
X#define`009SMBMSG$V_TOP_OF_FILE`0093
X#define`009SMBMSG$M_FILE_BURST`0091
X#define`009SMBMSG$M_FILE_FLAG`0092
X#define`009SMBMSG$M_FILE_TRAILER`0094
X#define`009SMBMSG$M_FILE_TRAILER_ABORT`0098
X#define`009SMBMSG$M_JOB_FLAG`00916
X#define`009SMBMSG$M_JOB_BURST`00932
X#define`009SMBMSG$M_JOB_RESET`00964
X#define`009SMBMSG$M_JOB_RESET_ABORT`009128
X#define`009SMBMSG$M_JOB_TRAILER`009256
X#define`009SMBMSG$M_JOB_TRAILER_ABORT`009512
X#define`009SMBMSG$M_FIRST_FILE_OF_JOB`0091024
X#define`009SMBMSG$M_LAST_FILE_OF_JOB`0092048
X#define`009SMBMSG$S_SEPARATION_CONTROL`0094
X#define`009SMBMSG$L_SEPARATION_FLAGS`0090
X#define`009SMBMSG$V_FILE_BURST`0090
X#define`009SMBMSG$V_FILE_FLAG`0091
X#define`009SMBMSG$V_FILE_TRAILER`0092
X#define`009SMBMSG$V_FILE_TRAILER_ABORT`0093
X#define`009SMBMSG$V_JOB_FLAG`0094
X#define`009SMBMSG$V_JOB_BURST`0095
X#define`009SMBMSG$V_JOB_RESET`0096
X#define`009SMBMSG$V_JOB_RESET_ABORT`0097
X#define`009SMBMSG$V_JOB_TRAILER`0098
X#define`009SMBMSG$V_JOB_TRAILER_ABORT`0099
X#define`009SMBMSG$V_FIRST_FILE_OF_JOB`00910
X#define`009SMBMSG$V_LAST_FILE_OF_JOB`00911
X/*
X * end of C_GBLINI definitions
X */
$ GOSUB UNPACK_FILE
$ EXIT
-+-+-+-+-+ End of part 3 +-+-+-+-+-

