• Keine Ergebnisse gefunden

Figure 5-4. NETOFF Statement FORTRAN Call Format

The NETOFF statement is used after all processing o f l o g i c a l c o n n e c t i o n a c t i v i t i e s i s fi n i s h e d a n d the program is prepared to end connection with the n e t w o r k . A f t e r t h e N E T O F F c a l l i s c o m p l e t e d , n o AIP statement other than NETON, NETREL, NSTORE NFETCH, NETDMB, and NETSETF can be used. The NETOFF c a l l b r e a k s a n y l o g i c a l c o n n e c t i o n s t i l l e x i s t i n g b e t w e e n t h e a p p l i c a t i o n p r o g r a m a n d a d e v i c e o r another application and prevents the network soft ware from attempting to establish any new connec tion. After the NETOFF statement is processed, the a p p l i c a t i o n p r o g r a m c o n t i n u e s t o e x e c u t e u n d e r control of the operating system.

An application program should always issue a NETOFF c a l l b e f o r e t e r m i n a t i n g . O t h e r w i s e , t h e n e t w o r k s o f t w a r e i n f o r m s c o n s o l e s o r o t h e r a p p l i c a t i o n p r o g r a m s w i t h w h i c h c o n n e c t i o n s e x i s t t h a t t h e program has failed; passive device connections are d i s p o s e d o f b y t h e n e t w o r k s o f t w a r e a s i f t h e program had failed. Unless a NETOFF call is com p l e t e d o r N E T R E L i s c a l l e d , t h e d e b u g l o g fi l e c o m p i l e d d u r i n g j o b e x e c u t i o n c a n n o t b e c o r r e c t l y d i s p o s e d o f . U n l e s s a N E TO F F c a l l i s c o m p l e t e d , t h e s t a t i s t i c a l fi l e c o m p i l e d d u r i n g j o b e x e c u t i o n w i l l n o t e x i s t .

The NETOFF statement can also be used in a reprieval s i t u a t i o n . T h i s u s e i s d e s c r i b e d u n d e r C o n n e c t i n g to Network (NETON).

T h e f o u r o p t i o n s f o r s p e c i fi c c o n n e c t i o n i n p u t a n d output are as follows:

Fetch input to a single, unified buffer (NETGET statement)

F e t c h i n p u t t o a n a r r a y o f b u f f e r s ( N E T G E T F statement)

S e n d o u t p u t f r o m a s i n g l e , u n i fi e d b u f f e r (NETPUT statement)

Send output from an array of buffers (NETPUTF statement)

Inputing to Single Buffer (NETGET)

You can use NETGET to obtain an asynchronous super visory message from application connection number 0. You can also use NETGET to fetch synchronous supervisory messages and network data blocks from a p p l i c a t i o n c o n n e c t i o n n u m b e r s o t h e r t h a n 0 . Synchronous supervisory messages and network data blocks are never queued on logical connection 0.

Each NETGET call transfers one data or supervisory message block from the NIP queue for the connection s pec i fi ed i n the c al l . The N E TGE T c al l pl ac es the b l o c k h e a d e r i n t h e a p p l i c a t i o n p r o g r a m ' s b l o c k header area and the network block in the application program's text area. The NETGET statement has the format shown in figure 5-5.

CALL NETGET(acn,ha,ta,tlmax)

ha

Sur^T.rj^^r^fi'pSr'r„ wr.:E£of the i^ —

*-Transfer one asynchronous supervisory message.

Figure 5-5. NETGET Statement FORTRAN Call Format (Sheet 1 of 2)

5-4 60499500 R

t a A r e t u r n p a r a m e t e r ; a s i n p u t t o t h e c a l l , t h e s y m b o l i c a d d r e s s o f t h e fi r s t w o r d o f t h e b u ff e r connection, the network block remains queued. AIP copies the header word of the block into the appli asynchronous supervisory message to have the data t r u n c a t e d . ( S e e s e c t i o n 3 . ) I f b l o c k t r u n c a t i o n

c o n t i n u e s u n t i l n o a s y n c h r o n o u s m e s s a g e s a r e r e p o r t e d v i a t h e s u p e r v i s o r y s t a t u s w o r d ( t e s t o f NSUP contents). The second appearance of NETGET is i n a l o o p p o l l i n g f o r a n y m e s s a g e s q u e u e d o n a device connection; the polling loop continues until a N E T G E T c a l l r e t u r n s a n u l l b l o c k . T h e b l o c k header word HA is tested after each call to detect the null block, which has an application block type (ABHABT) of zero.

T h e v a l u e c h o s e n f o r T L M A X i n t h i s e x a m p l e I s adequate for both a connection-request supervisory m e s s a g e o f t h i r t e e n 6 0 - b i t c h a r a c t e r s a n d f o r a than anticipated must be transferred (third NETGET c a l l ) .

Inputing to Fragmented Buffer Array (NETGETF)

You can use NETGETF to obtain an asynchronous s u p e r v i s o r y m e s s a g e f r o m a p p l i c a t i o n c o n n e c t i o n n u m b e r 0 . Yo u c a n a l s o u s e N E T G E T F t o f e t c h synchronous supervisory messages and network data b l o c k s f r o m a p p l i c a t i o n c o n n e c t i o n n u m b e r s o t h e r

acn An input parameter, specifying the application connection number of the logical connection from which a block is requested. This parameter can have the values: program's header area. The header area always contains an updated application block header a f t e r r e t u r n f r o m t h e c a l l .

Figure 5-7. NETGETF Statement FORTRAN Call Format

5-6 60499500 R

0 ^ \

taa^

size^

address.;

taa-i

59 39 30 18

unused size-| unused address-j

taar unused unused address,na

The symbolic address of the beginning of the array used in the NETGETF call.

The length in central memory words of block fragment i. This field can contain the values 1 < size^ < 63. The sum of all na values for sizei defines the size in central memory words of the largest block the call can transfer; this sum is the equivalent of the tlmax parameter in the NETGET statement. The sum of all na values for size can be 0, but this

results in an input-block-undeliverable condition; that is, an application block header is returned with a set ibu field, even when an empty block of application block type 2 is queued (a block with a tic value of 0).

The relative numeric address of the first word of the application program text area to receive block fragment i. The text area addresses given in this field need not be for contiguous central memory areas.

Figure 5-8. NETGETF Statement Text Area Address Array

Figure 5-9 contains examples of NETGETF use. The p r o g r a m u s e s t h e fi r s t N E T G E T F c a l l t o f e t c h a b l o c k c o n t a i n i n g a n e n t i r e s c r e e n o f d a t a , w h i c h A I P f r a g m e n t s i n t o 1 2 t e x t a r e a s c o n t a i n i n g o n e 6 0 - c h a r a c t e r p h y s i c a l l i n e e a c h . T h e a p p l i c a t i o n c h a r a c t e r t y p e c h o s e n f o r i n p u t f r o m t h e l o g i c a l c o n n e c t i o n i s 4 . T h e p r o g r a m c o n t i n u e s t o f e t c h f u l l s c r e e n b u f f e r s o f d a t a u n t i l a n u l l b l o c k i s encountered by the test of ABHABT. The text areas u s e d a r e 1 2 s e p a r a t e l y a d d r e s s e d 6 - w o r d a r r a y s ( L I N E 1 t h r o u g h L I N E 1 2 ) , w h i c h i n i t i a l l y c o n t a i n b l a n k s ( D ATA s t a t e m e n t s ) . T h e t e x t a r e a a d d r e s s array (TAA), contains 12 corresponding words; each word contains the relative address of a text area, o b t a i n e d w i t h t h e L O C F f u n c t i o n . A l t h o u g h t h e array TAA has a dimension of 24, only the first 12 entries are expected to be used; therefore, a value o f 1 2 i s a s s i g n e d t o N A i n i t s D ATA s t a t e m e n t . O n l y t h e fi r s t a s s i g n m e n t s t a t e m e n t c o n s t r u c t i n g TAA is shown; because each text area will contain six words of ten 6-bit characters each, a size of 6 is declared in each TAA entry.

T h e s e c o n d N E T G E T F c a l l r e c o v e r s a b l o c k n o t delivered by the original call because the block was l a r g e r t h a n e x p e c t e d . T h i s c o n d i t i o n i s d e t e c t e d b y t h e t e s t o f A B H I B U , a s r e t u r n e d b y t h e fi r s t NETGETF call. The second call is issued with more o f t h e t e x t a r e a a d d r e s s a r r a y s p e c i fi e d , s o t h a t all 24 text areas potentially can be used.

DIMENSION LINE 1(6),...,LINE24(6) INTEGER HA,TAA(24),0VRFLNA,TERM(20)

DATA NA/12/,HA/0/,LINE1/6*L",7,...,LINE24/6*L,,,7 TAA(1)=SHIFT(6,30).OR.LOCF (LINED

NACN=TERM(IACN)

1 CALL NETGETF(NACN,HA,NA,TAA)

IF (NFETCH (HA,L,,ABHABT").EQ.0) GO TO 2 IF(NFETCH(HA,L"ABHIBU").EQ.1) GO TO 5 6 CONTINUE

GO TO 1

0VRFLNA=NFETCH(HA,L"ABHTLC")/60.0 ATEMP=NFETCH(HA,L"ABHTLC")/60.0 IF(ATEMP.NE.OVRFLNA)OVRFLNA=OVRFLNA IF(0VRFLNA.GT.24) GO TO 9

CALL NETGETF(NACN,HA,OVRFLNA,TAA) GO TO 6

CONTINUE

9 STOP

+ 1

yfP?*s

Outputing From Single Buffer (NETPUT)

You can use NETPUT to send asynchronous supervisory messages to application connection number 0. You can also use NETPUT to send synchronous supervisory m e s s a g e s a n d n e t w o r k d a t a b l o c k s t o a p p l i c a t i o n c o n n e c t i o n n u m b e r s o t h e r t h a n 0 . S y n c h r o n o u s supervisory messages and network data blocks are never sent on logical connection 0.

60499500 R

Figure 5-9. NETGETF Statement FORTRAN 5 Examples

Each NETPUT call requests AIP to form a block from the information located in the application program's b l o c k h e a d e r a n d t e x t a r e a s . T h e c a l l i n g a p p l i c a t i o n p r o g r a m m u s t c o n s t r u c t a c o m p l e t e b l o c k header, as described in section 2. The text portion of the block can be either a network data block, as 5-7

d e s c r i b e d i n s e c t i o n 2 , o r a s u p e r v i s o r y m e s s a g e Because asynchronous supervisory messages use an a p p l i c a t i o n c h a r a c t e r t y p e o f o n e , t h e c o n n e c t i o n do not necessarily cause Immediate downline trans fers, and downline data buffered by AIP may remain untransferred if the application program is swapped o u t b y t h e o p e r a t i n g s y s t e m . D o w n l i n e d a t a b u f fered by AIP might also remain untransferred if the a p p l i c a t i o n p r o g r a m s c h e d u l e s i t s o w n c e n t r a l processor usage with the COMPASS macro RECALL, i n s t e a d o f u s i n g c a l l s t o N E T WA I T. To f o r c e t h e

You can use NETPUTF to send asynchronous supervisory messages to application connection number 0. You can also use NETPUTF to send synchronous supervisory m e s s a g e s a n d n e t w o r k d a t a b l o c k s t o a p p l i c a t i o n c o n n e c t i o n n u m b e r s o t h e r t h a n 0 . S y n c h r o n o u s supervisory messages and network data blocks are never sent on logical connection 0.