[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnubol: Alphanumeric-edited "sending items" - test program



I have finally created a (relatively simple) test case for my question about
alphanumeric-edited sending items.  I have already tested it with one
compiler (name withheld to protect the "dubious") and am already a little bit
more confused than before.

I have coded this sample so it should (I think) compile and run with any
ANS'74 or ANS'85 compiler.  I would be quite appreciative of any testing that
those receiving this note could (would) do.  Please respond to me privately
(as I doubt that everyone else will be interested in each and every reply).
Once I get a "feeling" of the total results, I will summarize them and "post
the summary".  Hopefully, this will allow me to create a change (if any) that
will be compatible with existing implementations.

Test case "attached"

Bill Klein
  wmklein <at> ix.netcom.com
000011 IDENTIFICATION DIVISION.
000020  PROGRAM-ID. ALPHEDIT.
000030 ENVIRONMENT DIVISION.
000040 DATA DIVISION.
000050  WORKING-STORAGE SECTION.
000060 01  GROUP1.
000070     05  ALPHA-EDIT1      PIC  X/X.
000080 01  MISC.
000090     05  ALPHANUM         PIC  XX.
000100     05  ALPHA-EDIT2      PIC  X/X.
000110     05  ALPHA-EDIT3      PIC  XBX.
000120 PROCEDURE DIVISION.
000150     PERFORM INIT
000160     PERFORM TEST1
000170     PERFORM TEST2
000180     PERFORM TEST3
000190     STOP RUN
000200      .
000210 INIT.
000211     MOVE "ABC" 	TO GROUP1
000220	   MOVE SPACES 	TO MISC
000230	    .
000231 TEST1.
000232 	   MOVE ALPHA-EDIT1	TO ALPHANUM
000233 	   DISPLAY "TEST1 - PIC XX:" ALPHANUM
000234 	   IF ALPHANUM = "AB"
000235 	   	   DISPLAY " BELIEVE THE DATA"
000236 	   ELSE
000237 	       IF ALPHANUM = "A/"
000238 	           DISPLAY " BELIEVE THE PICTURE"
000239 	       ELSE
000240 	           DISPLAY " OTHER !!!"
000241 	   .
000242 TEST2.
000243 	   MOVE ALPHA-EDIT1	TO ALPHA-EDIT2
000244 	   DISPLAY "TEST2 - PIC X/X:" ALPHA-EDIT2
000245 	   IF ALPHA-EDIT2 = "ABC"
000246 	   	   DISPLAY " BELIEVE THE DATA"
000247 	   ELSE
000248 	       IF ALPHA-EDIT2 = "A/C"
000249 	           DISPLAY " UNEDITED MOVE"
000250 	       ELSE
000251 	       	   IF ALPHA-EDIT2 = "A/B"
000252 	       	       DISPLAY " RE-EDIT THE DATA"
000253 	       	   ELSE
000254 	       	       IF ALPHA-EDIT2 = "A//"
000255 	       	           DISPLAY " RE-EDIT BUT BELIEVE SENDING PIC" 	       	
000257	 	       	   ELSE	
000258 		               DISPLAY " OTHER !!!"
000259 	   .
000260 TEST3.
000261 	   MOVE ALPHA-EDIT1	TO ALPHA-EDIT3
000262 	   DISPLAY "TEST3 - PIC XBX:" ALPHA-EDIT3
000263 	   IF ALPHA-EDIT3 = "A C"
000264 	   	   DISPLAY " BELIEVE THE DATA"
000265 	   ELSE
000266 	       IF ALPHA-EDIT3 = "ABC"
000267 	           DISPLAY " UNEDITED MOVE"
000268 	       ELSE
000269 	       	   IF ALPHA-EDIT3 = "A B"
000270 	       	       DISPLAY " RE-EDIT THE DATA"
000271 	       	   ELSE
000272 	       	       IF ALPHA-EDIT3 = "A/ "
000273 	       	           DISPLAY " RE-EDIT BUT BELIEVE SENDING PIC"
000274	 	       	   ELSE	
000275 		               DISPLAY " OTHER !!!"
000276 	   .