Google
 

Trailing-Edge - PDP-10 Archives - BB-5372C-BM - demo/sndseq.cbl
There is 1 other file named sndseq.cbl in the archive. Click here to see a list.
00100	IDENTIFICATION DIVISION.
00200	PROGRAM-ID. SNDSEQ.
00300	*
00400	*  THIS PROGRAM SENDS A CONTINUOUS STREAM OF IPCF MESSAGES TO ONE
00500	*  OR MORE RECEIVER PROGRAMS.  THE MESSAGE CONSISTS OF A SEQUENCE
00600	*  NUMBER WHICH IS INCREMENTED BY ONE FOR EACH MESSAGE SENT TO A
00700	*  SINGLE RECEIVER PROGRAM.
00800	*
00900	*  ANOTHER RECEIVER PROGRAM MAY BE ADDED TO THE GROUP OF RECEIVER
01000	*  PROGRAMS AT ANY TIME BY TYPING "NEW RECV" ON THE TERMINAL.
01100	*
01200	*  THIS PROGRAM EXPECTS TO RECEIVE REPLY MESSAGES FROM THE PROGRAMS
01300	*  WHICH IT IS SENDING TO.  A REPLY MESSAGE MAY BE RECEIVED AT ANY TIME.
01400	*  THE FORMAT OF THE REPLY MESSAGE IS:
01500	*  FIELD 1 - 3 ALPHABETIC CHARACTERS
01600	*  FIELD 2 - 5 NUMERIC CHARACTERS
01700	*  THE FIELDS OF THE THREE POSSIBLE REPLY MESSAGES ARE:
01800	*  1. MESSAGE RECEIVED IN SEQUENCE (POSITIVE ACKNOWLEDGEMENT):
01900	*     FIELD 1 - ACK
02000	*     FIELD 2 - HIGHEST MESSAGE NUMBER RECEIVED OK
02100	*  2. MESSAGE RECEIVED OUT OF SEQUENCE (NEGATIVE ACKNOWLEDGEMENT):
02200	*     FIELD 1 - NAK
02300	*     FIELD 2 - HIGHEST MESSAGE NUMBER RECEIVED OK
02400	*  3. THIS PROGRAM HAS COMPLETED (TERMINATION NOTICE):
02500	*     FIELD 1 - XIT
02600	*     FIELD 2 - HIGHEST MESSAGE NUMBER RECEIVED OK
02700	*
02800	DATA DIVISION.
02900	WORKING-STORAGE SECTION.
03000	77  ERROR-CODE PIC S9(10) COMP.
03100	77  FUNCTION-CODE PIC S9(10) COMP.
03200	77  MY-ID PIC X(29) DISPLAY-7 VALUE "SEND-NUMERIC-SEQUENCE".
03300	77  OTHER-ID-TMP PIC X(29).
03400	77  TMP-INDEX PIC S9(10) COMP.
03500	77  I PIC S9(10) COMP.
03600	77  J PIC S9(10) COMP.
03700	77  SEARCH-SWT PIC S9(10) COMP.
03800	77  BAD-IPCF-RECV-CNT PIC S9(10) COMP VALUE 0.
03900	77  TTY-MSG PIC X(10) DISPLAY-7.
04000	77  TIME-BETWEEN-SENDS PIC S9(5) COMP.
04100	77  RESUME-ALL PIC S9(5) COMP VALUE 3.
04200	77  WAIT-TIME PIC S9(5) COMP.
04300	77  STIME PIC S9(10) COMP.
04400	77  WAIT-END-TIME PIC S9(10) COMP.
04500	01  TODAY-FIELDS.
04600	    02  FILLER PIC XXXXXX.
04700	    02  TODAY-HH PIC 99.
04800	    02  TODAY-MM PIC 99.
04900	    02  TODAY-SS PIC 99.
05000	01  RECEIVE-DEFS.
05100	    02  RECEIVE-INFO.
05200	        03  RECEIVE-TYPE PIC XXX.
05300	            88  ACK-MSG  VALUE 'ACK'.
05400	            88  NAK-MSG  VALUE 'NAK'.
05500	            88  XIT-MSG  VALUE 'XIT'.
05600	        03  RECEIVE-SEQ PIC X(5).