#! /bin/sh
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh

# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi


# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)$' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
  	  /^X\/\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`


# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi


  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
  # Find who we are.  Look in the path if we contain no path at all
  # relative or not.
  case $0 in
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done

       ;;
  esac
  # We did not find ourselves, most probably we were run as `sh COMMAND'
  # in which case we are not to be found in the path.
  if test "x$as_myself" = x; then
    as_myself=$0
  fi
  if test ! -f "$as_myself"; then
    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
   { (exit 1); exit 1; }; }
  fi
  case $CONFIG_SHELL in
  '')
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for as_base in sh bash ksh sh5; do
	 case $as_dir in
	 /*)
	   if ("$as_dir/$as_base" -c '
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
	     CONFIG_SHELL=$as_dir/$as_base
	     export CONFIG_SHELL
	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
	   fi;;
	 esac
       done
done
;;
  esac

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line before each line; the second 'sed' does the real
  # work.  The second script uses 'N' to pair each line-number line
  # with the numbered line, and appends trailing '-' during
  # substitution so that $LINENO is not a special case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
  sed '=' <$as_myself |
    sed '
      N
      s,$,-,
      : loop
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
      t loop
      s,-$,,
      s,^['$as_cr_digits']*\n,,
    ' >$as_me.lineno &&
  chmod +x $as_me.lineno ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensible to this).
  . ./$as_me.lineno
  # Exit status is that of the last command.
  exit
}


case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_executable_p="test -f"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"


# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH


SHELL=${CONFIG_SHELL-/bin/sh}

# How were we run?
at_cli_args="$@"

# Load the config file.
for at_file in atconfig atlocal
do
  test -r $at_file || continue
  . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
   { (exit 1); exit 1; }; }
done

# atconfig delivers paths relative to the directory the test suite is
# in, but the groups themselves are run in testsuite-dir/group-dir.
if test -n "$at_top_srcdir"; then
  builddir=../..
  for at_dir in srcdir top_srcdir top_builddir
  do
    at_val=`eval echo '${'at_$at_dir'}'`
    eval "$at_dir=\$at_val/../.."
  done
fi

# Not all shells have the 'times' builtin; the subshell is needed to make
# sure we discard the 'times: not found' message from the shell.
at_times_p=false
(times) >/dev/null 2>&1 && at_times_p=:

# CLI Arguments to pass to the debugging scripts.
at_debug_args=
# -e sets to true
at_errexit_p=false
# Shall we be verbose?
at_verbose=:
at_quiet=echo

# Shall we keep the debug scripts?  Must be `:' when the suite is
# run by a debug script, so that the script doesn't remove itself.
at_debug_p=false
# Display help message?
at_help_p=false
# List test groups?
at_list_p=false
# Test groups to run
at_groups=

# The directory we are in.
at_dir=`pwd`
# The directory the whole suite works in.
# Should be absolutely to let the user `cd' at will.
at_suite_dir=$at_dir/$as_me.dir
# The file containing the suite.
at_suite_log=$at_dir/$as_me.log
# The file containing the location of the last AT_CHECK.
at_check_line_file=$at_suite_dir/at-check-line
# The file containing the exit status of the last command.
at_status_file=$at_suite_dir/at-status
# The files containing the output of the tested commands.
at_stdout=$at_suite_dir/at-stdout
at_stder1=$at_suite_dir/at-stder1
at_stderr=$at_suite_dir/at-stderr
# The file containing dates.
at_times_file=$at_suite_dir/at-times

# List of the tested programs.
at_tested='cobc'
# List of the all the test groups.
at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157'
# As many dots as there are digits in the last test group number.
# Used to normalize the test group numbers so that `ls' lists them in
# numerical order.
at_format='...'
# Description of all the test groups.
at_help_all='1;fundamental.at:23;DISPLAY literals;;
2;fundamental.at:53;DISPLAY literals, Decimal Point is COMMA;;
3;fundamental.at:78;Hexadecimal literal;;
4;fundamental.at:112;DISPLAY data items with VALUE clause;;
5;fundamental.at:150;DISPLAY data items with MOVE statement;;
6;subscripts.at:28;non-numeric subscript;;
7;subscripts.at:54;The range of subscripts;;
8;subscripts.at:86;Subscript out of bounds (1);;
9;subscripts.at:109;Subscript out of bounds (2);;
10;subscripts.at:132;Value of DEPENDING ON N out of bounds (lower);;
11;subscripts.at:155;Value of DEPENDING ON N out of bounds (upper);;
12;subscripts.at:178;Subscript bounds with ODO (lower);;
13;subscripts.at:200;Subscript bounds with ODO (upper);;
14;subscripts.at:222;Subscript bounds with ODO;;
15;subscripts.at:247;Subscript by arithmetic expression;;
16;ref-mod.at:35;Separate sign positions;;
17;ref-mod.at:58;Static reference modification;;
18;ref-mod.at:84;Dynamic reference modification;;
19;ref-mod.at:111;Static out of bounds;;
20;ref-mod.at:136;Offset underflow;;
21;ref-mod.at:157;Offset overflow;;
22;ref-mod.at:178;Length underflow;;
23;ref-mod.at:199;Length overflow;;
24;accept.at:23;ACCEPT;;
25;initialize.at:27;INITIALIZE group entry with OCCURS;;
26;initialize.at:51;INITIALIZE OCCURS with numeric edited;;
27;initialize.at:73;INITIALIZE complex group (1);;
28;initialize.at:96;INITIALIZE complex group (2);;
29;initialize.at:119;INITIALIZE with REDEFINES;;
30;misc.at:21;Source file not found;;
31;misc.at:30;Comma separator without space;;
32;misc.at:46;LOCAL-STORAGE;;
33;misc.at:84;EXTERNAL data item;;
34;misc.at:123;EXTERNAL AS data item;;
35;misc.at:165;cobcrun validation;;
36;misc.at:206;MOVE to itself;;
37;misc.at:225;MOVE with refmod;;
38;misc.at:244;MOVE with refmod (variable);;
39;misc.at:265;MOVE with group refmod;;
40;misc.at:285;MOVE indexes;;
41;misc.at:306;MOVE X'00';;
42;misc.at:340;Level 01 subscripts;;
43;misc.at:361;Class check with reference modification;;
44;misc.at:381;Index and parenthesized expression;;
45;misc.at:400;Alphanumeric and binary numeric;;
46;misc.at:423;Dynamic call with static linking;;
47;misc.at:446;CALL m1. CALL m2. CALL m1.;;
48;misc.at:492;CALL binary literal parameter/LENGTH OF;;
49;misc.at:544;INSPECT REPLACING LEADING ZEROS BY SPACES;;
50;misc.at:563;INSPECT: no repeat conversion check;;
51;misc.at:583;INSPECT: TALLYING BEFORE;;
52;misc.at:611;INSPECT: TALLYING AFTER;;
53;misc.at:638;INSPECT REPLACING TRAILING ZEROS BY SPACES;;
54;misc.at:657;INSPECT REPLACING complex;;
55;misc.at:678;SWITCHES;;
56;misc.at:728;Nested PERFORM;;
57;misc.at:752;EXIT PERFORM;;
58;misc.at:774;EXIT PERFORM CYCLE;;
59;misc.at:794;88 with FILLER;;
60;misc.at:819;Non-overflow after overflow;;
61;misc.at:843;PERFORM ... CONTINUE;;
62;misc.at:859;STRING with subscript reference;;
63;misc.at:880;UNSTRING DELIMITED ALL LOW-VALUE;;
64;misc.at:910;READ INTO AT-END sequence;;
65;misc.at:943;First READ on empty SEQUENTIAL INDEXED file;;
66;misc.at:977;REWRITE a RELATIVE file with RANDOM access;;
67;misc.at:1023;SORT: table sort;;
68;misc.at:1056;SORT: EBCDIC table sort;;
69;misc.at:1096;SORT nonexistent file;;
70;misc.at:1130;PIC ZZZ-, ZZZ+;;
71;misc.at:1162;Larger REDEFINES lengths;;
72;misc.at:1197;PERFORM type OSVS;;
73;misc.at:1237;Sticky LINKAGE;;
74;misc.at:1284;COB_PRE_LOAD test;;
75;misc.at:1306;88 level with FALSE IS clause;;
76;misc.at:1330;ALLOCATE/FREE with BASED item;;
77;misc.at:1353;CALL with OMITTED parameter;;
78;extensions.at:24;COMP-5;;
79;extensions.at:69;Hexadecimal numeric literal;;
80;extensions.at:95;Semi-parenthesized condition;;
81;extensions.at:115;ADDRESS OF;;
82;extensions.at:170;LENGTH OF;;
83;extensions.at:201;WHEN-COMPILED;;
84;extensions.at:223;Complex OCCURS DEPENDING ON;;
85;extensions.at:250;MOVE NON-INTEGER TO ALPHA-NUMERIC;;
86;extensions.at:333;CALL USING file-name;;
87;extensions.at:374;CALL unusual program-id.;;
88;extensions.at:428;ASSIGN MF;;
89;extensions.at:458;ASSIGN IBM;;
90;extensions.at:488;ASSIGN mapping;;
91;extensions.at:524;ASSIGN expansion;;
92;extensions.at:554;ASSIGN with COB_FILE_PATH;;
93;extensions.at:587;NUMBER-OF-CALL-PARAMETERS;;
94;extensions.at:637;PROCEDURE DIVISION USING BY ...;;
95;extensions.at:682;PROCEDURE DIVISION CHAINING ...;;
96;extensions.at:708;STOP RUN RETURNING;;
97;extensions.at:725;ENTRY;;
98;extensions.at:768;LINE SEQUENTIAL write;;
99;extensions.at:804;LINE SEQUENTIAL read;;
100;extensions.at:852;ASSIGN to KEYBOARD/DISPLAY;;
101;extensions.at:907;Environment/Argument variable;;
102;return-code.at:23;RETURN-CODE moving;;
103;return-code.at:46;RETURN-CODE passing;;
104;functions.at:22;FUNCTION ABS;;
105;functions.at:42;FUNCTION ACOS;;
106;functions.at:69;FUNCTION ANNUITY;;
107;functions.at:97;FUNCTION ASIN;;
108;functions.at:124;FUNCTION ATAN;;
109;functions.at:151;FUNCTION CHAR;;
110;functions.at:171;FUNCTION COS;;
111;functions.at:198;FUNCTION DATE-OF-INTEGER;;
112;functions.at:217;FUNCTION DATE-TO-YYYYMMDD;;
113;functions.at:236;FUNCTION DAY-OF-INTEGER;;
114;functions.at:255;FUNCTION DAY-TO-YYYYDDD;;
115;functions.at:274;FUNCTION EXCEPTION-FILE;;
116;functions.at:303;FUNCTION EXCEPTION-LOCATION;;
117;functions.at:336;FUNCTION EXCEPTION-STATEMENT;;
118;functions.at:365;FUNCTION EXCEPTION-STATUS;;
119;functions.at:394;FUNCTION EXP;;
120;functions.at:420;FUNCTION FACTORIAL;;
121;functions.at:439;FUNCTION FRACTION-PART;;
122;functions.at:460;FUNCTION INTEGER;;
123;functions.at:480;FUNCTION INTEGER-OF-DATE;;
124;functions.at:499;FUNCTION INTEGER-OF-DAY;;
125;functions.at:518;FUNCTION INTEGER-PART;;
126;functions.at:538;FUNCTION LENGTH;;
127;functions.at:558;FUNCTION LOCALE-DATE;;
128;functions.at:581;FUNCTION LOCALE-TIME;;
129;functions.at:604;FUNCTION LOG;;
130;functions.at:631;FUNCTION LOG10;;
131;functions.at:658;FUNCTION LOWER-CASE;;
132;functions.at:678;FUNCTION MAX;;
133;functions.at:697;FUNCTION MEAN;;
134;functions.at:716;FUNCTION MEDIAN;;
135;functions.at:735;FUNCTION MIDRANGE;;
136;functions.at:754;FUNCTION MIN;;
137;functions.at:773;FUNCTION MOD;;
138;functions.at:792;FUNCTION NUMVAL;;
139;functions.at:812;FUNCTION NUMVAL-C;;
140;functions.at:832;FUNCTION ORD;;
141;functions.at:851;FUNCTION ORD-MAX;;
142;functions.at:870;FUNCTION ORD-MIN;;
143;functions.at:889;FUNCTION PRESENT-VALUE;;
144;functions.at:908;FUNCTION RANGE;;
145;functions.at:927;FUNCTION REM;;
146;functions.at:946;FUNCTION REVERSE;;
147;functions.at:966;FUNCTION SECONDS-FROM-FORMATTED-TIME;;
148;functions.at:993;FUNCTION SECONDS-PAST-MIDNIGHT;;
149;functions.at:1018;FUNCTION SIGN;;
150;functions.at:1043;FUNCTION SIN;;
151;functions.at:1070;FUNCTION SQRT;;
152;functions.at:1097;FUNCTION STANDARD-DEVIATION;;
153;functions.at:1123;FUNCTION STORED-CHAR-LENGTH;;
154;functions.at:1144;FUNCTION TAN;;
155;functions.at:1171;FUNCTION TRIM;;
156;functions.at:1193;FUNCTION UPPER-CASE;;
157;functions.at:1213;FUNCTION VARIANCE;;
'

at_keywords=
at_prev=
for at_option
do
  # If the previous option needs an argument, assign it.
  if test -n "$at_prev"; then
    at_option=$at_prev=$at_option
    at_prev=
  fi

  at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'`

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case $at_option in
    --help | -h )
	at_help_p=:
	;;

    --list | -l )
	at_list_p=:
	;;

    --version | -V )
	echo "$as_me (OpenCOBOL 0.33)"
	exit 0
	;;

    --clean | -c )
	rm -rf $at_suite_dir $at_suite_log
	exit 0
	;;

    --debug | -d )
	at_debug_p=:
	;;

    --errexit | -e )
	at_debug_p=:
	at_errexit_p=:
	;;

    --verbose | -v )
	at_verbose=echo; at_quiet=:
	;;

    --trace | -x )
	at_traceon='set -vx'; at_traceoff='set +vx'
	;;

    [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
	at_groups="$at_groups$at_option "
	;;

    # Ranges
    [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
	at_range_start=`echo $at_option |tr -d '-'`
	at_range=`echo " $at_groups_all " | \
	  sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,'`
	at_groups="$at_groups$at_range "
	;;

    -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
	at_range_end=`echo $at_option |tr -d '-'`
	at_range=`echo " $at_groups_all " | \
	  sed -e 's, '$at_range_end' .*$, '$at_range_end','`
	at_groups="$at_groups$at_range "
	;;

    [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
    [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
    [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
    [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
    [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
    [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
	at_range_start=`echo $at_option |sed 's,-.*,,'`
	at_range_end=`echo $at_option |sed 's,.*-,,'`
	# FIXME: Maybe test to make sure start <= end?
	at_range=`echo " $at_groups_all " | \
	  sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,' \
	      -e 's, '$at_range_end' .*$, '$at_range_end','`
	at_groups="$at_groups$at_range "
	;;

    # Keywords.
    --keywords | -k )
	at_prev=--keywords
	;;
    --keywords=* )
	at_keywords="$at_keywords,$at_optarg"
	;;

    *=*)
  	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
  	# Reject names that are not valid shell variable names.
  	expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
  	  { echo "$as_me: error: invalid variable name: $at_envvar" >&2
   { (exit 1); exit 1; }; }
  	at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
  	eval "$at_envvar='$at_value'"
  	export $at_envvar
	# Propagate to debug scripts.
  	at_debug_args="$at_debug_args $at_option"
  	;;

     *) echo "$as_me: invalid option: $at_option" >&2
	echo "Try \`$0 --help' for more information." >&2
	exit 1
	;;
  esac
done

# Process the --keywords
if test -n "$at_keywords"; then
  at_groups_selected=$at_help_all
  for at_keyword in `IFS=,; set X $at_keywords; shift; echo ${1+$@}`
  do
    # It is on purpose that we match the test group titles too.
    at_groups_selected=`echo "$at_groups_selected" |
			grep -i "^[^;]*;[^;]*.*[; ]$at_keyword[ ;]"`
  done
  at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
  # Smash the end of lines.
  at_groups_selected=`echo $at_groups_selected`
  at_groups="$at_groups$at_groups_selected "
fi

# Selected test groups.
test -z "$at_groups" && at_groups=$at_groups_all

# Help message.
if $at_help_p; then
  cat <<_ATEOF
Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]

Run all the tests, or the selected TESTS, and save a detailed log file.
Upon failure, create debugging scripts.

You should not change environment variables unless explicitly passed
as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
to exercise.  Each relative directory is expanded as build and source
directories relatively to the top level of this distribution.  E.g.,

  $ $0 AUTOTEST_PATH=bin

possibly amounts into

  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
_ATEOF
cat <<_ATEOF

Operation modes:
  -h, --help     print the help message, then exit
  -V, --version  print version number, then exit
  -c, --clean    remove all the files this test suite might create and exit
  -l, --list     describes all the tests, or the selected TESTS
_ATEOF
cat <<_ATEOF

Execution tuning:
  -k, --keywords=KEYWORDS
	         select the tests matching all the comma separated KEYWORDS
	         accumulates
  -e, --errexit  abort as soon as a test fails; implies --debug
  -v, --verbose  force more detailed output
	         default for debugging scripts
  -d, --debug    inhibit clean up and debug script creation
	         default for debugging scripts
  -x, --trace    enable tests shell tracing
_ATEOF
cat <<_ATEOF

Report bugs to <open-cobol-list@lists.sourceforge.net>.
_ATEOF
  exit 0
fi

# List of tests.
if $at_list_p; then
  cat <<_ATEOF
OpenCOBOL 0.33 test suite: Run Tests test groups:

 NUM: FILENAME:LINE      TEST-GROUP-NAME
      KEYWORDS

_ATEOF
  # "  1 42  45 " => "^(1|42|45);".
  at_groups_pattern=`echo "$at_groups" | sed 's/^  *//;s/  *$//;s/  */|/g'`
  echo "$at_help_all" |
    awk 'BEGIN { FS = ";" }
	 { if ($1 !~ /^('"$at_groups_pattern"')$/) next }
	 { if ($1) printf " %3d: %-18s %s\n", $1, $2, $3
	   if ($4) printf "      %s\n", $4 } '
  exit 0
fi

# Don't take risks: use only absolute directories in PATH.
#
# For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
#
# For embedded test suites, AUTOTEST_PATH is relative to the top level
# of the package.  Then expand it into build/src parts, since users
# may create executables in both places.
#
# There might be directories that don't exist, but don't redirect
# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
AUTOTEST_PATH=`echo $AUTOTEST_PATH | tr ':' $PATH_SEPARATOR`
at_path=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $AUTOTEST_PATH $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
  [\\/]* | ?:[\\/]* )
    at_path=$at_path$PATH_SEPARATOR$as_dir
    ;;
  * )
    if test -z "$at_top_builddir"; then
      # Stand-alone test suite.
      at_path=$at_path$PATH_SEPARATOR$as_dir
    else
      # Embedded test suite.
      at_path=$at_path$PATH_SEPARATOR$at_top_builddir/$as_dir
      at_path=$at_path$PATH_SEPARATOR$at_top_srcdir/$as_dir
    fi
    ;;
esac
done


# Now build and simplify PATH.
PATH=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $at_path
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
test -d "$as_dir" || continue
case $PATH in
	          $as_dir                 | \
	          $as_dir$PATH_SEPARATOR* | \
  *$PATH_SEPARATOR$as_dir                 | \
  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;

  '') PATH=$as_dir ;;
   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
esac
done

export PATH

# Setting up the FDs.
# 5 is the log file.  Not to be overwritten if `-d'.

$at_debug_p && at_suite_log=/dev/null
exec 5>$at_suite_log

# Banners and logs.
cat <<\_ASBOX
## ------------------------------------- ##
## OpenCOBOL 0.33 test suite: Run Tests. ##
## ------------------------------------- ##
_ASBOX
{
  cat <<\_ASBOX
## ------------------------------------- ##
## OpenCOBOL 0.33 test suite: Run Tests. ##
## ------------------------------------- ##
_ASBOX
  echo

  echo "$as_me: command line was:"
  echo "  $ $0 $at_cli_args"
  echo

  # Try to find a few ChangeLogs in case it might help determining the
  # exact version.  Use the relative dir: if the top dir is a symlink,
  # find will not follow it (and options to follow the links are not
  # portable), which would result in no output here.
  if test -n "$at_top_srcdir"; then
    cat <<\_ASBOX
## ----------- ##
## ChangeLogs. ##
## ----------- ##
_ASBOX
    echo
    for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
    do
      echo "$as_me: $at_file:"
      sed 's/^/| /;10q' $at_file
      echo
    done

    {
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  echo "PATH: $as_dir"
done

}
    echo
  fi

  # Contents of the config files.
  for at_file in atconfig atlocal
  do
    test -r $at_file || continue
    echo "$as_me: $at_file:"
    sed 's/^/| /' $at_file
    echo
  done

  cat <<\_ASBOX
## ---------------- ##
## Tested programs. ##
## ---------------- ##
_ASBOX
  echo
} >&5

# Report what programs are being tested.
for at_program in : $at_tested
do
  test "$at_program" = : && continue
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -f $as_dir/$at_program && break
done

  if test -f $as_dir/$at_program; then
    {
      echo "run.at:21: $as_dir/$at_program --version"
      $as_dir/$at_program --version
      echo
    } >&5 2>&1
  else
    { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
echo "$as_me: error: cannot find $at_program" >&2;}
   { (exit 1); exit 1; }; }
  fi
done

{
  cat <<\_ASBOX
## ------------------ ##
## Running the tests. ##
## ------------------ ##
_ASBOX
} >&5

at_start_date=`date`
at_start_time=`(date +%s) 2>/dev/null`
echo "$as_me: starting at: $at_start_date" >&5
at_xpass_list=
at_xfail_list=
at_pass_list=
at_fail_list=
at_skip_list=
at_group_count=0

# Create the master directory if it doesn't already exist.
test -d $at_suite_dir ||
  mkdir $at_suite_dir ||
  { { echo "$as_me:$LINENO: error: cannot create $at_suite_dir" >&5
echo "$as_me: error: cannot create $at_suite_dir" >&2;}
   { (exit 1); exit 1; }; }

# Can we diff with `/dev/null'?  DU 5.0 refuses.
if diff /dev/null /dev/null >/dev/null 2>&1; then
  at_devnull=/dev/null
else
  at_devnull=$at_suite_dir/devnull
  cp /dev/null $at_devnull
fi

# Use `diff -u' when possible.
if diff -u $at_devnull $at_devnull >/dev/null 2>&1; then
  at_diff='diff -u'
else
  at_diff=diff
fi


for at_group in $at_groups
do
  # Be sure to come back to the top test directory.
  cd $at_suite_dir

  case $at_group in
    banner-*)
      at_group_log=$at_suite_log
      ;;

    *)
      # Skip tests we already run (using --keywords makes it easy to get
      # duplication).
      case " $at_pass_test $at_skip_test $at_fail_test " in
	*" $at_group "* ) continue;;
      esac

      # Normalize the test group number.
      at_group_normalized=`expr "00000$at_group" : ".*\($at_format\)"`

      # Create a fresh directory for the next test group, and enter.
      at_group_dir=$at_suite_dir/$at_group_normalized
      at_group_log=$at_group_dir/$as_me.log
      rm -rf $at_group_dir
      mkdir $at_group_dir ||
	{ { echo "$as_me:$LINENO: error: cannot create $at_group_dir" >&5
echo "$as_me: error: cannot create $at_group_dir" >&2;}
   { (exit 1); exit 1; }; }
      cd $at_group_dir
      ;;
  esac

  echo 0 > $at_status_file

  # Clearly separate the test groups when verbose.
  test $at_group_count != 0 && $at_verbose

  # In verbose mode, append to the log file *and* show on
  # the standard output; in quiet mode only write to the log
  if test $at_verbose = echo; then
    at_tee_pipe="tee -a $at_group_log"
  else
    at_tee_pipe="cat >> $at_group_log"
  fi

  case $at_group in
  1 ) # 1. fundamental.at:23: DISPLAY literals
    at_setup_line='fundamental.at:23'
    at_desc='DISPLAY literals'
    $at_quiet $ECHO_N "  1: DISPLAY literals                             $ECHO_C"
    at_xfail=no
    (
      echo "1. fundamental.at:23: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           DISPLAY "abc".
           DISPLAY  123.
           DISPLAY +123.
           DISPLAY -123.
           DISPLAY  12.3.
           DISPLAY +12.3.
           DISPLAY -12.3.
           STOP RUN.
_ATEOF


$at_traceoff
echo "fundamental.at:39: \${COMPILE} prog.cob"
echo fundamental.at:39 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:39: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "fundamental.at:48: ./prog"
echo fundamental.at:48 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "abc
123
+123
-123
12.3
+12.3
-12.3
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:48: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  2 ) # 2. fundamental.at:53: DISPLAY literals, Decimal Point is COMMA
    at_setup_line='fundamental.at:53'
    at_desc='DISPLAY literals, Decimal Point is COMMA'
    $at_quiet $ECHO_N "  2: DISPLAY literals, Decimal Point is COMMA     $ECHO_C"
    at_xfail=no
    (
      echo "2. fundamental.at:53: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       CONFIGURATION    SECTION.
       SPECIAL-NAMES.
       DECIMAL-POINT    IS COMMA.
       PROCEDURE        DIVISION.
           DISPLAY  12,3.
           DISPLAY +12,3.
           DISPLAY -12,3.
           STOP RUN.
_ATEOF


$at_traceoff
echo "fundamental.at:69: \${COMPILE} prog.cob"
echo fundamental.at:69 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:69: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "fundamental.at:74: ./prog"
echo fundamental.at:74 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "12,3
+12,3
-12,3
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:74: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  3 ) # 3. fundamental.at:78: Hexadecimal literal
    at_setup_line='fundamental.at:78'
    at_desc='Hexadecimal literal'
    $at_quiet $ECHO_N "  3: Hexadecimal literal                          $ECHO_C"
    at_xfail=no
    (
      echo "3. fundamental.at:78: testing ..."
      $at_traceon


cat >dump.c <<'_ATEOF'

#include <stdio.h>
int dump (unsigned char *data);
int dump (unsigned char *data)
{
  int i;
  for (i = 0; i < 4; i++)
    printf ("%02x", data[i]);
  puts ("");
  return 0;
}
_ATEOF


$at_traceoff
echo "fundamental.at:93: \${CC} \${SHROPT} -o dump.\${SHREXT} dump.c"
echo fundamental.at:93 >$at_check_line_file
( $at_traceon; ${CC} ${SHROPT} -o dump.${SHREXT} dump.c ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:93: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           DISPLAY X"313233".
           CALL "dump" USING X"000102".
           STOP RUN.
_ATEOF


$at_traceoff
echo "fundamental.at:104: \${COMPILE} prog.cob"
echo fundamental.at:104 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:104: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "fundamental.at:108: ./prog"
echo fundamental.at:108 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "123
00010200
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:108: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  4 ) # 4. fundamental.at:112: DISPLAY data items with VALUE clause
    at_setup_line='fundamental.at:112'
    at_desc='DISPLAY data items with VALUE clause'
    $at_quiet $ECHO_N "  4: DISPLAY data items with VALUE clause         $ECHO_C"
    at_xfail=no
    (
      echo "4. fundamental.at:112: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X-ABC         PIC XXX   VALUE "abc".
       01 X-123         PIC 999   VALUE  123.
       01 X-P123        PIC S999  VALUE +123.
       01 X-N123        PIC S999  VALUE -123.
       01 X-12-3        PIC 99V9  VALUE  12.3.
       01 X-P12-3       PIC S99V9 VALUE +12.3.
       01 X-N12-3       PIC S99V9 VALUE -12.3.
       PROCEDURE        DIVISION.
           DISPLAY X-ABC.
           DISPLAY X-123.
           DISPLAY X-P123.
           DISPLAY X-N123.
           DISPLAY X-12-3.
           DISPLAY X-P12-3.
           DISPLAY X-N12-3.
           STOP RUN.
_ATEOF


$at_traceoff
echo "fundamental.at:137: \${COMPILE} prog.cob"
echo fundamental.at:137 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:137: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "fundamental.at:146: ./prog"
echo fundamental.at:146 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "abc
123
+123
-123
12.3
+12.3
-12.3
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:146: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  5 ) # 5. fundamental.at:150: DISPLAY data items with MOVE statement
    at_setup_line='fundamental.at:150'
    at_desc='DISPLAY data items with MOVE statement'
    $at_quiet $ECHO_N "  5: DISPLAY data items with MOVE statement       $ECHO_C"
    at_xfail=no
    (
      echo "5. fundamental.at:150: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X-ABC         PIC XXX   VALUE "abc".
       01 X-123         PIC 999   VALUE  123.
       01 X-P123        PIC S999  VALUE +123.
       01 X-N123        PIC S999  VALUE -123.
       01 X-12-3        PIC 99V9  VALUE  12.3.
       01 X-P12-3       PIC S99V9 VALUE +12.3.
       01 X-N12-3       PIC S99V9 VALUE -12.3.
       PROCEDURE        DIVISION.
           MOVE "abc" TO X-ABC.    DISPLAY X-ABC.
           MOVE  123  TO X-123.    DISPLAY X-123.
           MOVE +123  TO X-P123.   DISPLAY X-P123.
           MOVE -123  TO X-N123.   DISPLAY X-N123.
           MOVE  12.3 TO X-12-3.   DISPLAY X-12-3.
           MOVE +12.3 TO X-P12-3.  DISPLAY X-P12-3.
           MOVE -12.3 TO X-N12-3.  DISPLAY X-N12-3.
           STOP RUN.
_ATEOF


$at_traceoff
echo "fundamental.at:175: \${COMPILE} prog.cob"
echo fundamental.at:175 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:175: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "fundamental.at:184: ./prog"
echo fundamental.at:184 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "abc
123
+123
-123
12.3
+12.3
-12.3
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "fundamental.at:184: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  6 ) # 6. subscripts.at:28: non-numeric subscript
    at_setup_line='subscripts.at:28'
    at_desc='non-numeric subscript'
    $at_quiet $ECHO_N "  6: non-numeric subscript                        $ECHO_C"
    at_xfail=no
    (
      echo "6. subscripts.at:28: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G1.
         02 X           PIC X OCCURS 10.
       01 I             PIC X.
       PROCEDURE        DIVISION.
           DISPLAY X(I).
           DISPLAY X(I + 1).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:47: \${COMPILE_ONLY} prog.cob"
echo subscripts.at:47 >$at_check_line_file
( $at_traceon; ${COMPILE_ONLY} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: Error: 'I' is not integer value
prog.cob:11: Error: 'I' is not numeric value
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:47: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  7 ) # 7. subscripts.at:54: The range of subscripts
    at_setup_line='subscripts.at:54'
    at_desc='The range of subscripts'
    $at_quiet $ECHO_N "  7: The range of subscripts                      $ECHO_C"
    at_xfail=no
    (
      echo "7. subscripts.at:54: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G1.
         02 X           OCCURS 2.
           03 Y         PIC X OCCURS 3.
       PROCEDURE        DIVISION.
           DISPLAY X(0).
           DISPLAY X(1).
           DISPLAY X(2).
           DISPLAY X(3).
           DISPLAY Y(1, 0).
           DISPLAY Y(1, 1).
           DISPLAY Y(1, 3).
           DISPLAY Y(1, 4).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:81: \${COMPILE_ONLY} prog.cob"
echo subscripts.at:81 >$at_check_line_file
( $at_traceon; ${COMPILE_ONLY} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: Error: Subscript of 'X' out of bounds: 0
prog.cob:13: Error: Subscript of 'X' out of bounds: 3
prog.cob:14: Error: Subscript of 'Y' out of bounds: 0
prog.cob:17: Error: Subscript of 'Y' out of bounds: 4
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:81: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  8 ) # 8. subscripts.at:86: Subscript out of bounds (1)
    at_setup_line='subscripts.at:86'
    at_desc='Subscript out of bounds (1)'
    $at_quiet $ECHO_N "  8: Subscript out of bounds (1)                  $ECHO_C"
    at_xfail=no
    (
      echo "8. subscripts.at:86: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 10.
       01 I             PIC 9 VALUE 0.
       PROCEDURE        DIVISION.
           DISPLAY X(I).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:101: \${COMPILE} -o prog prog.cob"
echo subscripts.at:101 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "subscripts.at:101: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "subscripts.at:104: ./prog"
echo subscripts.at:104 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: libcob: Subscript of 'X' out of bounds: 0
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:104: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  9 ) # 9. subscripts.at:109: Subscript out of bounds (2)
    at_setup_line='subscripts.at:109'
    at_desc='Subscript out of bounds (2)'
    $at_quiet $ECHO_N "  9: Subscript out of bounds (2)                  $ECHO_C"
    at_xfail=no
    (
      echo "9. subscripts.at:109: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 10.
       01 I             PIC 99 VALUE 11.
       PROCEDURE        DIVISION.
           DISPLAY X(I).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:124: \${COMPILE} -o prog prog.cob"
echo subscripts.at:124 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "subscripts.at:124: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "subscripts.at:127: ./prog"
echo subscripts.at:127 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: libcob: Subscript of 'X' out of bounds: 11
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:127: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  10 ) # 10. subscripts.at:132: Value of DEPENDING ON N out of bounds (lower)
    at_setup_line='subscripts.at:132'
    at_desc='Value of DEPENDING ON N out of bounds (lower)'
    $at_quiet $ECHO_N " 10: Value of DEPENDING ON N out of bounds (lower)$ECHO_C"
    at_xfail=no
    (
      echo "10. subscripts.at:132: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 4 TO 6 DEPENDING ON N.
       01 N             PIC 9 VALUE 3.
       PROCEDURE        DIVISION.
           DISPLAY X(5).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:147: \${COMPILE} -o prog prog.cob"
echo subscripts.at:147 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "subscripts.at:147: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "subscripts.at:150: ./prog"
echo subscripts.at:150 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: libcob: OCCURS DEPENDING ON 'N' out of bounds: 3
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:150: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  11 ) # 11. subscripts.at:155: Value of DEPENDING ON N out of bounds (upper)
    at_setup_line='subscripts.at:155'
    at_desc='Value of DEPENDING ON N out of bounds (upper)'
    $at_quiet $ECHO_N " 11: Value of DEPENDING ON N out of bounds (upper)$ECHO_C"
    at_xfail=no
    (
      echo "11. subscripts.at:155: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 4 TO 6 DEPENDING ON N.
       01 N             PIC 9 VALUE 7.
       PROCEDURE        DIVISION.
           DISPLAY X(5).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:170: \${COMPILE} -o prog prog.cob"
echo subscripts.at:170 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "subscripts.at:170: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "subscripts.at:173: ./prog"
echo subscripts.at:173 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: libcob: OCCURS DEPENDING ON 'N' out of bounds: 7
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:173: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  12 ) # 12. subscripts.at:178: Subscript bounds with ODO (lower)
    at_setup_line='subscripts.at:178'
    at_desc='Subscript bounds with ODO (lower)'
    $at_quiet $ECHO_N " 12: Subscript bounds with ODO (lower)            $ECHO_C"
    at_xfail=no
    (
      echo "12. subscripts.at:178: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 4 TO 6 DEPENDING ON N.
       01 N             PIC 9 VALUE 4.
       PROCEDURE        DIVISION.
           DISPLAY X(0).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:195: \${COMPILE} -o prog prog.cob"
echo subscripts.at:195 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: Error: Subscript of 'X' out of bounds: 0
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:195: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  13 ) # 13. subscripts.at:200: Subscript bounds with ODO (upper)
    at_setup_line='subscripts.at:200'
    at_desc='Subscript bounds with ODO (upper)'
    $at_quiet $ECHO_N " 13: Subscript bounds with ODO (upper)            $ECHO_C"
    at_xfail=no
    (
      echo "13. subscripts.at:200: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 4 TO 6 DEPENDING ON N.
       01 N             PIC 9 VALUE 4.
       PROCEDURE        DIVISION.
           DISPLAY X(7).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:217: \${COMPILE} -o prog prog.cob"
echo subscripts.at:217 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: Error: Subscript of 'X' out of bounds: 7
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:217: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  14 ) # 14. subscripts.at:222: Subscript bounds with ODO
    at_setup_line='subscripts.at:222'
    at_desc='Subscript bounds with ODO'
    $at_quiet $ECHO_N " 14: Subscript bounds with ODO                    $ECHO_C"
    at_xfail=no
    (
      echo "14. subscripts.at:222: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 4 TO 6 DEPENDING ON N.
       01 N             PIC 9 VALUE 4.
       PROCEDURE        DIVISION.
           DISPLAY X(5).
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:237: \${COMPILE} -o prog prog.cob"
echo subscripts.at:237 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "subscripts.at:237: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "subscripts.at:240: ./prog"
echo subscripts.at:240 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:10: libcob: Subscript of 'X' out of bounds: 5
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "subscripts.at:240: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  15 ) # 15. subscripts.at:247: Subscript by arithmetic expression
    at_setup_line='subscripts.at:247'
    at_desc='Subscript by arithmetic expression'
    $at_quiet $ECHO_N " 15: Subscript by arithmetic expression           $ECHO_C"
    at_xfail=no
    (
      echo "15. subscripts.at:247: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G             VALUE "1234".
         02 X           PIC X OCCURS 4.
       PROCEDURE        DIVISION.
           DISPLAY X((3 + 1) / 2) NO ADVANCING.
           DISPLAY X(2 ** 2) NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "subscripts.at:262: \${COMPILE} -o prog prog.cob"
echo subscripts.at:262 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "subscripts.at:262: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "subscripts.at:263: ./prog"
echo subscripts.at:263 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "24" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "subscripts.at:263: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  16 ) # 16. ref-mod.at:35: Separate sign positions
    at_setup_line='ref-mod.at:35'
    at_desc='Separate sign positions'
    $at_quiet $ECHO_N " 16: Separate sign positions                      $ECHO_C"
    at_xfail=no
    (
      echo "16. ref-mod.at:35: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC S9 VALUE -1 SIGN LEADING SEPARATE.
       01 Y             PIC S9 VALUE -1 SIGN TRAILING SEPARATE.
       PROCEDURE        DIVISION.
           DISPLAY X(1:1) X(2:1) NO ADVANCING.
           DISPLAY Y(1:1) Y(2:1) NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "ref-mod.at:50: \${COMPILE} -o prog prog.cob"
echo ref-mod.at:50 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:50: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "ref-mod.at:51: ./prog"
echo ref-mod.at:51 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-11-" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:51: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  17 ) # 17. ref-mod.at:58: Static reference modification
    at_setup_line='ref-mod.at:58'
    at_desc='Static reference modification'
    $at_quiet $ECHO_N " 17: Static reference modification                $ECHO_C"
    at_xfail=no
    (
      echo "17. ref-mod.at:58: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "abcd".
       PROCEDURE        DIVISION.
           DISPLAY X(1:1) ":" X(1:2) ":" X(1:3) ":" X(1:4) ":" X(1:).
           DISPLAY X(2:1) ":" X(2:2) ":" X(2:3) ":" X(2:).
           DISPLAY X(3:1) ":" X(3:2) ":" X(3:).
           DISPLAY X(4:1) ":" X(4:).
           STOP RUN.
_ATEOF


$at_traceoff
echo "ref-mod.at:74: \${COMPILE} -o prog prog.cob"
echo ref-mod.at:74 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:74: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "ref-mod.at:80: ./prog"
echo ref-mod.at:80 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "a:ab:abc:abcd:abcd
b:bc:bcd:bcd
c:cd:cd
d:d
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:80: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  18 ) # 18. ref-mod.at:84: Dynamic reference modification
    at_setup_line='ref-mod.at:84'
    at_desc='Dynamic reference modification'
    $at_quiet $ECHO_N " 18: Dynamic reference modification               $ECHO_C"
    at_xfail=no
    (
      echo "18. ref-mod.at:84: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "abcd".
       01 I             PIC 9.
       PROCEDURE        DIVISION.
           MOVE 1 TO I. DISPLAY X(I:1).
           MOVE 4 TO I. DISPLAY X(I:1).
           MOVE 1 TO I. DISPLAY X(1:I).
           MOVE 4 TO I. DISPLAY X(1:I).
           STOP RUN.
_ATEOF


$at_traceoff
echo "ref-mod.at:101: \${COMPILE} -o prog prog.cob"
echo ref-mod.at:101 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:101: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "ref-mod.at:107: ./prog"
echo ref-mod.at:107 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "a
d
a
abcd
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:107: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  19 ) # 19. ref-mod.at:111: Static out of bounds
    at_setup_line='ref-mod.at:111'
    at_desc='Static out of bounds'
    $at_quiet $ECHO_N " 19: Static out of bounds                         $ECHO_C"
    at_xfail=no
    (
      echo "19. ref-mod.at:111: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4).
       PROCEDURE        DIVISION.
           DISPLAY X(0:1).
           DISPLAY X(5:1).
           DISPLAY X(1:0).
           DISPLAY X(1:5).
           STOP RUN.
_ATEOF


$at_traceoff
echo "ref-mod.at:132: \${COMPILE_ONLY} prog.cob"
echo ref-mod.at:132 >$at_check_line_file
( $at_traceon; ${COMPILE_ONLY} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:8: Error: Offset of 'X' out of bounds: 0
prog.cob:9: Error: Offset of 'X' out of bounds: 5
prog.cob:10: Error: Length of 'X' out of bounds: 0
prog.cob:11: Error: Length of 'X' out of bounds: 5
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "ref-mod.at:132: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  20 ) # 20. ref-mod.at:136: Offset underflow
    at_setup_line='ref-mod.at:136'
    at_desc='Offset underflow'
    $at_quiet $ECHO_N " 20: Offset underflow                             $ECHO_C"
    at_xfail=no
    (
      echo "20. ref-mod.at:136: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "abcd".
       01 I             PIC 9 VALUE 0.
       PROCEDURE        DIVISION.
           DISPLAY X(I:1) NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "ref-mod.at:150: \${COMPILE} -o prog prog.cob"
echo ref-mod.at:150 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:150: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "ref-mod.at:153: ./prog"
echo ref-mod.at:153 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:9: libcob: Offset of 'X' out of bounds: 0
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "ref-mod.at:153: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  21 ) # 21. ref-mod.at:157: Offset overflow
    at_setup_line='ref-mod.at:157'
    at_desc='Offset overflow'
    $at_quiet $ECHO_N " 21: Offset overflow                              $ECHO_C"
    at_xfail=no
    (
      echo "21. ref-mod.at:157: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "abcd".
       01 I             PIC 9 VALUE 5.
       PROCEDURE        DIVISION.
           DISPLAY X(I:1) NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "ref-mod.at:171: \${COMPILE} -o prog prog.cob"
echo ref-mod.at:171 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:171: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "ref-mod.at:174: ./prog"
echo ref-mod.at:174 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:9: libcob: Offset of 'X' out of bounds: 5
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "ref-mod.at:174: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  22 ) # 22. ref-mod.at:178: Length underflow
    at_setup_line='ref-mod.at:178'
    at_desc='Length underflow'
    $at_quiet $ECHO_N " 22: Length underflow                             $ECHO_C"
    at_xfail=no
    (
      echo "22. ref-mod.at:178: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "abcd".
       01 I             PIC 9 VALUE 0.
       PROCEDURE        DIVISION.
           DISPLAY X(1:I) NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "ref-mod.at:192: \${COMPILE} -o prog prog.cob"
echo ref-mod.at:192 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:192: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "ref-mod.at:195: ./prog"
echo ref-mod.at:195 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:9: libcob: Length of 'X' out of bounds: 0
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "ref-mod.at:195: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  23 ) # 23. ref-mod.at:199: Length overflow
    at_setup_line='ref-mod.at:199'
    at_desc='Length overflow'
    $at_quiet $ECHO_N " 23: Length overflow                              $ECHO_C"
    at_xfail=no
    (
      echo "23. ref-mod.at:199: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "abcd".
       01 I             PIC 9 VALUE 5.
       PROCEDURE        DIVISION.
           DISPLAY X(1:I) NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "ref-mod.at:213: \${COMPILE} -o prog prog.cob"
echo ref-mod.at:213 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "ref-mod.at:213: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "ref-mod.at:216: ./prog"
echo ref-mod.at:216 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:9: libcob: Length of 'X' out of bounds: 5
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "ref-mod.at:216: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  24 ) # 24. accept.at:23: ACCEPT
    at_setup_line='accept.at:23'
    at_desc='ACCEPT'
    $at_quiet $ECHO_N " 24: ACCEPT                                       $ECHO_C"
    at_xfail=no
    (
      echo "24. accept.at:23: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(8).
       PROCEDURE        DIVISION.
           ACCEPT X FROM DATE.
           INSPECT X CONVERTING "012345678" TO "999999999".
           DISPLAY "(" X ")".
           ACCEPT X FROM DATE YYYYMMDD.
           INSPECT X CONVERTING "012345678" TO "999999999".
           DISPLAY "(" X ")".
           ACCEPT X FROM DAY.
           INSPECT X CONVERTING "012345678" TO "999999999".
           DISPLAY "(" X ")".
           ACCEPT X FROM DAY YYYYDDD.
           INSPECT X CONVERTING "012345678" TO "999999999".
           DISPLAY "(" X ")".
           STOP RUN.
_ATEOF


$at_traceoff
echo "accept.at:47: \${COMPILE} -o prog prog.cob"
echo accept.at:47 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "accept.at:47: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "accept.at:53: ./prog"
echo accept.at:53 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "(999999  )
(99999999)
(99999   )
(9999999 )
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "accept.at:53: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  25 ) # 25. initialize.at:27: INITIALIZE group entry with OCCURS
    at_setup_line='initialize.at:27'
    at_desc='INITIALIZE group entry with OCCURS'
    $at_quiet $ECHO_N " 25: INITIALIZE group entry with OCCURS           $ECHO_C"
    at_xfail=no
    (
      echo "25. initialize.at:27: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G1.
         02 G2          OCCURS 2.
           03 X1        PIC X.
           03 X2        PIC 9.
       PROCEDURE        DIVISION.
           MOVE SPACE TO G1.
           INITIALIZE G2 (2).
           DISPLAY G1 NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "initialize.at:45: \${COMPILE} -o prog prog.cob"
echo initialize.at:45 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:45: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "initialize.at:46: ./prog"
echo initialize.at:46 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "   0" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:46: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  26 ) # 26. initialize.at:51: INITIALIZE OCCURS with numeric edited
    at_setup_line='initialize.at:51'
    at_desc='INITIALIZE OCCURS with numeric edited'
    $at_quiet $ECHO_N " 26: INITIALIZE OCCURS with numeric edited        $ECHO_C"
    at_xfail=no
    (
      echo "26. initialize.at:51: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G1.
         02 G2          OCCURS 5.
           03 X         PIC Z9.
       PROCEDURE        DIVISION.
           INITIALIZE G1.
           DISPLAY G1 NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "initialize.at:67: \${COMPILE} -o prog prog.cob"
echo initialize.at:67 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:67: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "initialize.at:68: ./prog"
echo initialize.at:68 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo " 0 0 0 0 0" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:68: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  27 ) # 27. initialize.at:73: INITIALIZE complex group (1)
    at_setup_line='initialize.at:73'
    at_desc='INITIALIZE complex group (1)'
    $at_quiet $ECHO_N " 27: INITIALIZE complex group (1)                 $ECHO_C"
    at_xfail=no
    (
      echo "27. initialize.at:73: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G1.
         02 X           PIC X.
         02 G2          OCCURS 2.
           03 Y         PIC 9.
         02 Z           PIC 9.
       PROCEDURE        DIVISION.
           INITIALIZE G1.
           DISPLAY G1 NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "initialize.at:91: \${COMPILE} -o prog prog.cob"
echo initialize.at:91 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:91: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "initialize.at:92: ./prog"
echo initialize.at:92 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo " 000" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:92: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  28 ) # 28. initialize.at:96: INITIALIZE complex group (2)
    at_setup_line='initialize.at:96'
    at_desc='INITIALIZE complex group (2)'
    $at_quiet $ECHO_N " 28: INITIALIZE complex group (2)                 $ECHO_C"
    at_xfail=no
    (
      echo "28. initialize.at:96: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G1.
         02 G2          OCCURS 2.
           03 X         PIC 9.
           03 Y         PIC X OCCURS 2.
           03 Z         PIC X.
       PROCEDURE        DIVISION.
           INITIALIZE G1.
           DISPLAY G1 NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "initialize.at:114: \${COMPILE} -o prog prog.cob"
echo initialize.at:114 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "initialize.at:115: ./prog"
echo initialize.at:115 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "0   0   " | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:115: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  29 ) # 29. initialize.at:119: INITIALIZE with REDEFINES
    at_setup_line='initialize.at:119'
    at_desc='INITIALIZE with REDEFINES'
    $at_quiet $ECHO_N " 29: INITIALIZE with REDEFINES                    $ECHO_C"
    at_xfail=no
    (
      echo "29. initialize.at:119: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G1.
         02 X           PIC X.
         02 Y           REDEFINES X PIC 9.
         02 Z           PIC 9.
       PROCEDURE        DIVISION.
           INITIALIZE G1.
           DISPLAY G1 NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "initialize.at:136: \${COMPILE} -o prog prog.cob"
echo initialize.at:136 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:136: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "initialize.at:137: ./prog"
echo initialize.at:137 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo " 0" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "initialize.at:137: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  30 ) # 30. misc.at:21: Source file not found
    at_setup_line='misc.at:21'
    at_desc='Source file not found'
    $at_quiet $ECHO_N " 30: Source file not found                        $ECHO_C"
    at_xfail=no
    (
      echo "30. misc.at:21: testing ..."
      $at_traceon


$at_traceoff
echo "misc.at:25: \${COMPILE_ONLY} prog.cob"
echo misc.at:25 >$at_check_line_file
( $at_traceon; ${COMPILE_ONLY} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "cobc: prog.cob: No such file or directory
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "misc.at:25: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  31 ) # 31. misc.at:30: Comma separator without space
    at_setup_line='misc.at:30'
    at_desc='Comma separator without space'
    $at_quiet $ECHO_N " 31: Comma separator without space                $ECHO_C"
    at_xfail=no
    (
      echo "31. misc.at:30: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           DISPLAY 1,1,1 NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:40: \${COMPILE} -o prog prog.cob"
echo misc.at:40 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:40: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:41: ./prog"
echo misc.at:41 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "111" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:41: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  32 ) # 32. misc.at:46: LOCAL-STORAGE
    at_setup_line='misc.at:46'
    at_desc='LOCAL-STORAGE'
    $at_quiet $ECHO_N " 32: LOCAL-STORAGE                                $ECHO_C"
    at_xfail=no
    (
      echo "32. misc.at:46: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 WRK-X         PIC XXX VALUE "abc".
       LOCAL-STORAGE    SECTION.
       01 LCL-X         PIC XXX VALUE "abc".
       PROCEDURE        DIVISION.
           DISPLAY "WRK-X = " WRK-X.
           DISPLAY "LCL-X = " LCL-X.
           MOVE ZERO TO WRK-X LCL-X.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       PROCEDURE        DIVISION.
           CALL "callee".
           CALL "callee".
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:72: \${COMPILE_MODULE} callee.cob"
echo misc.at:72 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:72: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:73: \${COMPILE} -o prog caller.cob"
echo misc.at:73 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:73: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:79: ./prog"
echo misc.at:79 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "WRK-X = abc
LCL-X = abc
WRK-X = 000
LCL-X = abc
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:79: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  33 ) # 33. misc.at:84: EXTERNAL data item
    at_setup_line='misc.at:84'
    at_desc='EXTERNAL data item'
    $at_quiet $ECHO_N " 33: EXTERNAL data item                           $ECHO_C"
    at_xfail=no
    (
      echo "33. misc.at:84: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 WRK-VAR       PIC X(5).
       01 EXT-VAR       PIC X(5) EXTERNAL.
       PROCEDURE        DIVISION.
           DISPLAY EXT-VAR.
           MOVE "World" TO EXT-VAR.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 EXT-VAR       PIC X(5) EXTERNAL.
       01 WRK-VAR       PIC X(5).
       PROCEDURE        DIVISION.
           MOVE "Hello" TO EXT-VAR.
           CALL "callee".
           DISPLAY EXT-VAR.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:113: \${COMPILE_MODULE} callee.cob"
echo misc.at:113 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:113: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:114: \${COMPILE} -o prog caller.cob"
echo misc.at:114 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:118: ./prog"
echo misc.at:118 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "Hello
World
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:118: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  34 ) # 34. misc.at:123: EXTERNAL AS data item
    at_setup_line='misc.at:123'
    at_desc='EXTERNAL AS data item'
    $at_quiet $ECHO_N " 34: EXTERNAL AS data item                        $ECHO_C"
    at_xfail=no
    (
      echo "34. misc.at:123: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 PRG-VAR       PIC X(5) EXTERNAL AS "WRK-VAR".
       01 EXT-VAR       PIC X(5) EXTERNAL.
       PROCEDURE        DIVISION.
           DISPLAY PRG-VAR.
           DISPLAY EXT-VAR.
           MOVE "World" TO EXT-VAR.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 MYVAR         PIC X(5) EXTERNAL AS "EXT-VAR".
       01 WRK-VAR       PIC X(5) EXTERNAL.
       PROCEDURE        DIVISION.
           MOVE "Extrn" TO WRK-VAR.
           MOVE "Hello" TO MYVAR.
           CALL "callee".
           DISPLAY MYVAR.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:154: \${COMPILE_MODULE} callee.cob"
echo misc.at:154 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:154: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:155: \${COMPILE} -o prog caller.cob"
echo misc.at:155 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:155: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:160: ./prog"
echo misc.at:160 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "Extrn
Hello
World
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:160: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  35 ) # 35. misc.at:165: cobcrun validation
    at_setup_line='misc.at:165'
    at_desc='cobcrun validation'
    $at_quiet $ECHO_N " 35: cobcrun validation                           $ECHO_C"
    at_xfail=no
    (
      echo "35. misc.at:165: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 WRK-VAR       PIC X(5).
       01 EXT-VAR       PIC X(5) EXTERNAL.
       PROCEDURE        DIVISION.
           DISPLAY EXT-VAR.
           MOVE "World" TO EXT-VAR.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 EXT-VAR       PIC X(5) EXTERNAL.
       01 WRK-VAR       PIC X(5).
       PROCEDURE        DIVISION.
           MOVE "Hello" TO EXT-VAR.
           CALL "callee".
           DISPLAY EXT-VAR.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:194: \${COMPILE_MODULE} callee.cob"
echo misc.at:194 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:194: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:195: \${COMPILE_MODULE} caller.cob"
echo misc.at:195 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:195: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:199: \${COBCRUN} caller"
echo misc.at:199 >$at_check_line_file
( $at_traceon; ${COBCRUN} caller ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "Hello
World
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:199: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  36 ) # 36. misc.at:206: MOVE to itself
    at_setup_line='misc.at:206'
    at_desc='MOVE to itself'
    $at_quiet $ECHO_N " 36: MOVE to itself                               $ECHO_C"
    at_xfail=no
    (
      echo "36. misc.at:206: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC 99 VALUE 12.
       PROCEDURE        DIVISION.
           MOVE X TO X.
           DISPLAY X NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:220: \${COMPILE} -o prog prog.cob"
echo misc.at:220 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:220: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:221: ./prog"
echo misc.at:221 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "12" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:221: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  37 ) # 37. misc.at:225: MOVE with refmod
    at_setup_line='misc.at:225'
    at_desc='MOVE with refmod'
    $at_quiet $ECHO_N " 37: MOVE with refmod                             $ECHO_C"
    at_xfail=no
    (
      echo "37. misc.at:225: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC 9(4) VALUE 0.
       PROCEDURE        DIVISION.
           MOVE "1" TO X(1:1).
           DISPLAY X NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:239: \${COMPILE} -o prog prog.cob"
echo misc.at:239 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:239: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:240: ./prog"
echo misc.at:240 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "1000" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:240: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  38 ) # 38. misc.at:244: MOVE with refmod (variable)
    at_setup_line='misc.at:244'
    at_desc='MOVE with refmod (variable)'
    $at_quiet $ECHO_N " 38: MOVE with refmod (variable)                  $ECHO_C"
    at_xfail=no
    (
      echo "38. misc.at:244: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "1234".
       01 Y             PIC X(4) VALUE "abcd".
       01 I             PIC 9 VALUE 1.
       PROCEDURE        DIVISION.
           MOVE X(1:I) TO Y.
           DISPLAY Y NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:260: \${COMPILE} -o prog prog.cob"
echo misc.at:260 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:260: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:261: ./prog"
echo misc.at:261 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "1   " | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:261: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  39 ) # 39. misc.at:265: MOVE with group refmod
    at_setup_line='misc.at:265'
    at_desc='MOVE with group refmod'
    $at_quiet $ECHO_N " 39: MOVE with group refmod                       $ECHO_C"
    at_xfail=no
    (
      echo "39. misc.at:265: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC 9999 VALUE 1234.
       PROCEDURE        DIVISION.
           MOVE "99" TO G(3:2).
           DISPLAY G NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:280: \${COMPILE} -o prog prog.cob"
echo misc.at:280 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:280: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:281: ./prog"
echo misc.at:281 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "1299" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:281: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  40 ) # 40. misc.at:285: MOVE indexes
    at_setup_line='misc.at:285'
    at_desc='MOVE indexes'
    $at_quiet $ECHO_N " 40: MOVE indexes                                 $ECHO_C"
    at_xfail=no
    (
      echo "40. misc.at:285: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 10 INDEXED I.
       PROCEDURE        DIVISION.
           SET I TO ZERO.
           MOVE I TO X(1).
           DISPLAY X(1) NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:301: \${COMPILE} -o prog prog.cob"
echo misc.at:301 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:301: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:302: ./prog"
echo misc.at:302 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "0" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:302: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  41 ) # 41. misc.at:306: MOVE X'00'
    at_setup_line='misc.at:306'
    at_desc='MOVE X'00''
    $at_quiet $ECHO_N " 41: MOVE X'00'                                   $ECHO_C"
    at_xfail=no
    (
      echo "41. misc.at:306: testing ..."
      $at_traceon


cat >dump.c <<'_ATEOF'

#include <stdio.h>
int dump (unsigned char *data);
int dump (unsigned char *data)
{
  printf ("%02x%02x%02x", data[0], data[1], data[2]);
  return 0;
}
_ATEOF


$at_traceoff
echo "misc.at:318: \${CC} \${SHROPT} -o dump.\${SHREXT} dump.c"
echo misc.at:318 >$at_check_line_file
( $at_traceon; ${CC} ${SHROPT} -o dump.${SHREXT} dump.c ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:318: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC XXX.
       PROCEDURE        DIVISION.
           MOVE X"000102" TO X.
           CALL "dump" USING X.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:332: \${COMPILE} -o prog prog.cob"
echo misc.at:332 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:332: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:333: ./prog"
echo misc.at:333 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "000102" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:333: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  42 ) # 42. misc.at:340: Level 01 subscripts
    at_setup_line='misc.at:340'
    at_desc='Level 01 subscripts'
    $at_quiet $ECHO_N " 42: Level 01 subscripts                          $ECHO_C"
    at_xfail=no
    (
      echo "42. misc.at:340: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X OCCURS 10.
       PROCEDURE        DIVISION.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:354: \${COMPILE_ONLY} prog.cob"
echo misc.at:354 >$at_check_line_file
( $at_traceon; ${COMPILE_ONLY} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:6: Error: Level 01 item 'X' cannot have OCCURS clause
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "misc.at:354: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  43 ) # 43. misc.at:361: Class check with reference modification
    at_setup_line='misc.at:361'
    at_desc='Class check with reference modification'
    $at_quiet $ECHO_N " 43: Class check with reference modification      $ECHO_C"
    at_xfail=no
    (
      echo "43. misc.at:361: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(6) VALUE "123   ".
       PROCEDURE        DIVISION.
           IF X(1:3) NUMERIC
               DISPLAY "OK" NO ADVANCING
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:376: \${COMPILE} -o prog prog.cob"
echo misc.at:376 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:376: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:377: ./prog"
echo misc.at:377 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:377: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  44 ) # 44. misc.at:381: Index and parenthesized expression
    at_setup_line='misc.at:381'
    at_desc='Index and parenthesized expression'
    $at_quiet $ECHO_N " 44: Index and parenthesized expression           $ECHO_C"
    at_xfail=no
    (
      echo "44. misc.at:381: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X OCCURS 1 INDEXED BY I.
       PROCEDURE        DIVISION.
         IF I < (I + 2)
           DISPLAY "OK"
         END-IF.
_ATEOF


$at_traceoff
echo "misc.at:396: \${COMPILE_ONLY} -o prog prog.cob"
echo misc.at:396 >$at_check_line_file
( $at_traceon; ${COMPILE_ONLY} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:396: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  45 ) # 45. misc.at:400: Alphanumeric and binary numeric
    at_setup_line='misc.at:400'
    at_desc='Alphanumeric and binary numeric'
    $at_quiet $ECHO_N " 45: Alphanumeric and binary numeric              $ECHO_C"
    at_xfail=no
    (
      echo "45. misc.at:400: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X-X           PIC XXXX VALUE "0001".
       01 X-9           PIC 9999 COMP VALUE 1.
       PROCEDURE        DIVISION.
         IF X-X = X-9
           DISPLAY "OK" NO ADVANCING
         END-IF.
_ATEOF


$at_traceoff
echo "misc.at:415: \${COMPILE} -o prog prog.cob"
echo misc.at:415 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:415: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:416: ./prog"
echo misc.at:416 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:416: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  46 ) # 46. misc.at:423: Dynamic call with static linking
    at_setup_line='misc.at:423'
    at_desc='Dynamic call with static linking'
    $at_quiet $ECHO_N " 46: Dynamic call with static linking             $ECHO_C"
    at_xfail=no
    (
      echo "46. misc.at:423: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       PROCEDURE        DIVISION.
           DISPLAY "OK" NO ADVANCING.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       PROCEDURE        DIVISION.
           CALL "callee".
_ATEOF


$at_traceoff
echo "misc.at:439: \${COMPILE_MODULE} -c callee.cob"
echo misc.at:439 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} -c callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:439: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:440: \${COMPILE} -c caller.cob"
echo misc.at:440 >$at_check_line_file
( $at_traceon; ${COMPILE} -c caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:440: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:441: \${COMPILE} -o prog caller.o callee.o"
echo misc.at:441 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog caller.o callee.o ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:441: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:442: ./prog"
echo misc.at:442 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:442: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  47 ) # 47. misc.at:446: CALL m1. CALL m2. CALL m1.
    at_setup_line='misc.at:446'
    at_desc='CALL m1. CALL m2. CALL m1.'
    $at_quiet $ECHO_N " 47: CALL m1. CALL m2. CALL m1.                   $ECHO_C"
    at_xfail=no
    (
      echo "47. misc.at:446: testing ..."
      $at_traceon


cat >m1.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      m1.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC 9(4).
       PROCEDURE        DIVISION.
           COMPUTE X = 1 + 2.
           DISPLAY X.
_ATEOF


cat >m2.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      m2.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC 9(4).
       PROCEDURE        DIVISION.
           COMPUTE X = 3 + 4.
           DISPLAY X.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       PROCEDURE        DIVISION.
           CALL "m1".
           CALL "m2".
           CALL "m1".
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:480: \${COMPILE_MODULE} m1.cob"
echo misc.at:480 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} m1.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:480: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:481: \${COMPILE_MODULE} m2.cob"
echo misc.at:481 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} m2.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:481: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:482: \${COMPILE} -o caller caller.cob"
echo misc.at:482 >$at_check_line_file
( $at_traceon; ${COMPILE} -o caller caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:482: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


$at_traceoff
echo "misc.at:488: ./caller"
echo misc.at:488 >$at_check_line_file
( $at_traceon; ./caller ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "0003
0007
0003
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:488: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  48 ) # 48. misc.at:492: CALL binary literal parameter/LENGTH OF
    at_setup_line='misc.at:492'
    at_desc='CALL binary literal parameter/LENGTH OF'
    $at_quiet $ECHO_N " 48: CALL binary literal parameter/LENGTH OF      $ECHO_C"
    at_xfail=no
    (
      echo "48. misc.at:492: testing ..."
      $at_traceon


cat >test.conf <<'_ATEOF'

include "default.conf"
binary-byteorder: native
_ATEOF


cat >dump.c <<'_ATEOF'

#include <stdio.h>
int dump (int *p)
{
  printf ("%8.8d\n", *p);
  return 0;
}
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  MYOCC        PIC 9(8) COMP.
       01  MYTAB.
           03  MYBYTE   PIC X OCCURS 1 TO 20
                        DEPENDING ON MYOCC.
       PROCEDURE        DIVISION.
           MOVE 9 TO MYOCC.
           CALL "dump" USING BY CONTENT 1.
           CALL "dump" USING BY CONTENT LENGTH OF MYTAB.
           CALL "dump" USING BY CONTENT LENGTH OF MYOCC.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:525: \${COMPILE_MODULE} dump.c"
echo misc.at:525 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} dump.c ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:525: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:526: \${COMPILE} -o prog prog.cob"
echo misc.at:526 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:526: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:531: ./prog"
echo misc.at:531 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00000001
00000009
00000004
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:531: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:532: \${COMPILE} -conf=test.conf -o prog prog.cob"
echo misc.at:532 >$at_check_line_file
( $at_traceon; ${COMPILE} -conf=test.conf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:532: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:537: ./prog"
echo misc.at:537 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00000001
00000009
00000004
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:537: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  49 ) # 49. misc.at:544: INSPECT REPLACING LEADING ZEROS BY SPACES
    at_setup_line='misc.at:544'
    at_desc='INSPECT REPLACING LEADING ZEROS BY SPACES'
    $at_quiet $ECHO_N " 49: INSPECT REPLACING LEADING ZEROS BY SPACES    $ECHO_C"
    at_xfail=no
    (
      echo "49. misc.at:544: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "0001".
       PROCEDURE        DIVISION.
           INSPECT X REPLACING LEADING ZEROS BY SPACES.
           DISPLAY X NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:558: \${COMPILE} prog.cob"
echo misc.at:558 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:558: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:559: ./prog"
echo misc.at:559 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "   1" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:559: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  50 ) # 50. misc.at:563: INSPECT: no repeat conversion check
    at_setup_line='misc.at:563'
    at_desc='INSPECT: no repeat conversion check'
    $at_quiet $ECHO_N " 50: INSPECT: no repeat conversion check          $ECHO_C"
    at_xfail=no
    (
      echo "50. misc.at:563: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(3) VALUE "BCA".
       PROCEDURE        DIVISION.
           INSPECT X CONVERTING "ABC" TO "BCD".
           DISPLAY X NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:577: \${COMPILE} prog.cob"
echo misc.at:577 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:577: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:578: ./prog"
echo misc.at:578 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "CDB" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:578: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  51 ) # 51. misc.at:583: INSPECT: TALLYING BEFORE
    at_setup_line='misc.at:583'
    at_desc='INSPECT: TALLYING BEFORE'
    $at_quiet $ECHO_N " 51: INSPECT: TALLYING BEFORE                     $ECHO_C"
    at_xfail=no
    (
      echo "51. misc.at:583: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "ABC ".
       01 TAL           PIC 999 VALUE 0.
       PROCEDURE        DIVISION.
           MOVE 0 TO TAL.
           INSPECT X TALLYING TAL FOR CHARACTERS
                     BEFORE INITIAL " ".
           DISPLAY TAL NO ADVANCING.
           MOVE 0 TO TAL.
           MOVE " ABC" TO X.
           INSPECT X TALLYING TAL FOR CHARACTERS
                     BEFORE INITIAL " ".
           DISPLAY TAL NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:605: \${COMPILE} prog.cob"
echo misc.at:605 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:605: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:606: ./prog"
echo misc.at:606 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "003000" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:606: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  52 ) # 52. misc.at:611: INSPECT: TALLYING AFTER
    at_setup_line='misc.at:611'
    at_desc='INSPECT: TALLYING AFTER'
    $at_quiet $ECHO_N " 52: INSPECT: TALLYING AFTER                      $ECHO_C"
    at_xfail=no
    (
      echo "52. misc.at:611: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "ABC ".
       01 TAL           PIC 999 VALUE 0.
       PROCEDURE        DIVISION.
           MOVE 0 TO TAL.
           INSPECT X TALLYING TAL FOR CHARACTERS
                     AFTER INITIAL " ".
           DISPLAY TAL NO ADVANCING.
           MOVE 0 TO TAL.
           MOVE " ABC" TO X.
           INSPECT X TALLYING TAL FOR CHARACTERS
                     AFTER INITIAL " ".
           DISPLAY TAL NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:633: \${COMPILE} prog.cob"
echo misc.at:633 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:633: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:634: ./prog"
echo misc.at:634 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "000003" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:634: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  53 ) # 53. misc.at:638: INSPECT REPLACING TRAILING ZEROS BY SPACES
    at_setup_line='misc.at:638'
    at_desc='INSPECT REPLACING TRAILING ZEROS BY SPACES'
    $at_quiet $ECHO_N " 53: INSPECT REPLACING TRAILING ZEROS BY SPACES   $ECHO_C"
    at_xfail=no
    (
      echo "53. misc.at:638: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4) VALUE "1000".
       PROCEDURE        DIVISION.
           INSPECT X REPLACING TRAILING ZEROS BY SPACES.
           DISPLAY X NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:652: \${COMPILE} prog.cob"
echo misc.at:652 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:652: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:653: ./prog"
echo misc.at:653 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "1   " | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:653: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  54 ) # 54. misc.at:657: INSPECT REPLACING complex
    at_setup_line='misc.at:657'
    at_desc='INSPECT REPLACING complex'
    $at_quiet $ECHO_N " 54: INSPECT REPLACING complex                    $ECHO_C"
    at_xfail=no
    (
      echo "54. misc.at:657: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(12) VALUE "AAABBCDCCCCC".
       PROCEDURE        DIVISION.
           INSPECT X REPLACING
             ALL      "A" BY "Z"
                      "B" BY "Y"
             TRAILING "C" BY "X".
           DISPLAY X NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:674: \${COMPILE} prog.cob"
echo misc.at:674 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:674: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:675: ./prog"
echo misc.at:675 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "ZZZYYCDXXXXX" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:675: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  55 ) # 55. misc.at:678: SWITCHES
    at_setup_line='misc.at:678'
    at_desc='SWITCHES'
    $at_quiet $ECHO_N " 55: SWITCHES                                     $ECHO_C"
    at_xfail=no
    (
      echo "55. misc.at:678: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SPECIAL-NAMES.
           SWITCH-1 IS SWIT1
             ON IS SWIT1-ON
             OFF IS SWIT1-OFF
           SWITCH-2 IS SWIT2
             ON IS SWIT2-ON
             OFF IS SWIT2-OFF.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           IF SWIT1-ON
              DISPLAY "ON" NO ADVANCING
           ELSE
              DISPLAY "OFF" NO ADVANCING
           END-IF.
           IF SWIT2-ON
              DISPLAY "ON" NO ADVANCING
           ELSE
              DISPLAY "OFF" NO ADVANCING
           END-IF.
           SET SWIT1 TO OFF.
           SET SWIT2 TO ON.
           IF SWIT1-ON
              DISPLAY "ON" NO ADVANCING
           ELSE
              DISPLAY "OFF" NO ADVANCING
           END-IF.
           IF SWIT2-ON
              DISPLAY "ON" NO ADVANCING
           ELSE
              DISPLAY "OFF" NO ADVANCING
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:720: \${COMPILE} prog.cob"
echo misc.at:720 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:720: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:721: COB_SWITCH_1=ON COB_SWITCH_2=OFF ./prog"
echo misc.at:721 >$at_check_line_file
( $at_traceon; COB_SWITCH_1=ON COB_SWITCH_2=OFF ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "ONOFFOFFON" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:721: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  56 ) # 56. misc.at:728: Nested PERFORM
    at_setup_line='misc.at:728'
    at_desc='Nested PERFORM'
    $at_quiet $ECHO_N " 56: Nested PERFORM                               $ECHO_C"
    at_xfail=no
    (
      echo "56. misc.at:728: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       PROCEDURE        DIVISION.
           PERFORM 2 TIMES
             PERFORM 2 TIMES
               DISPLAY "X" NO ADVANCING
             END-PERFORM
           END-PERFORM.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:743: \${COMPILE} -o prog prog.cob"
echo misc.at:743 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:743: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:744: ./prog"
echo misc.at:744 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "XXXX" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:744: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  57 ) # 57. misc.at:752: EXIT PERFORM
    at_setup_line='misc.at:752'
    at_desc='EXIT PERFORM'
    $at_quiet $ECHO_N " 57: EXIT PERFORM                                 $ECHO_C"
    at_xfail=no
    (
      echo "57. misc.at:752: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           PERFORM 2 TIMES
             DISPLAY "OK" NO ADVANCING
             EXIT PERFORM
             DISPLAY "NOT REACHED"
           END-PERFORM
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:766: \${COMPILE} -o prog prog.cob"
echo misc.at:766 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:766: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:767: ./prog"
echo misc.at:767 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:767: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  58 ) # 58. misc.at:774: EXIT PERFORM CYCLE
    at_setup_line='misc.at:774'
    at_desc='EXIT PERFORM CYCLE'
    $at_quiet $ECHO_N " 58: EXIT PERFORM CYCLE                           $ECHO_C"
    at_xfail=no
    (
      echo "58. misc.at:774: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           PERFORM 2 TIMES
             DISPLAY "OK" NO ADVANCING
             EXIT PERFORM CYCLE
             DISPLAY "NOT REACHED"
           END-PERFORM
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:788: \${COMPILE} -o prog prog.cob"
echo misc.at:788 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:788: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:789: ./prog"
echo misc.at:789 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OKOK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:789: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  59 ) # 59. misc.at:794: 88 with FILLER
    at_setup_line='misc.at:794'
    at_desc='88 with FILLER'
    $at_quiet $ECHO_N " 59: 88 with FILLER                               $ECHO_C"
    at_xfail=no
    (
      echo "59. misc.at:794: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 FILLER        PIC X VALUE SPACE.
         88 X           VALUE "X".
       PROCEDURE        DIVISION.
           IF X
               DISPLAY "NO" NO ADVANCING
           END-IF.
           SET X TO TRUE.
           IF X
               DISPLAY "OK" NO ADVANCING
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:814: \${COMPILE} -o prog prog.cob"
echo misc.at:814 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:814: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:815: ./prog"
echo misc.at:815 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:815: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  60 ) # 60. misc.at:819: Non-overflow after overflow
    at_setup_line='misc.at:819'
    at_desc='Non-overflow after overflow'
    $at_quiet $ECHO_N " 60: Non-overflow after overflow                  $ECHO_C"
    at_xfail=no
    (
      echo "60. misc.at:819: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC 9(2) VALUE 0.
       01 Y             PIC 9(2) VALUE 0.
       PROCEDURE        DIVISION.
           COMPUTE X = 100.
           COMPUTE Y = 99.
           DISPLAY Y NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:835: \${COMPILE} -o prog prog.cob"
echo misc.at:835 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:835: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:836: ./prog"
echo misc.at:836 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "99" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:836: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  61 ) # 61. misc.at:843: PERFORM ... CONTINUE
    at_setup_line='misc.at:843'
    at_desc='PERFORM ... CONTINUE'
    $at_quiet $ECHO_N " 61: PERFORM ... CONTINUE                         $ECHO_C"
    at_xfail=no
    (
      echo "61. misc.at:843: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           PERFORM 2 TIMES
             CONTINUE
           END-PERFORM.
_ATEOF


$at_traceoff
echo "misc.at:854: \${COMPILE_ONLY} prog.cob"
echo misc.at:854 >$at_check_line_file
( $at_traceon; ${COMPILE_ONLY} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:854: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  62 ) # 62. misc.at:859: STRING with subscript reference
    at_setup_line='misc.at:859'
    at_desc='STRING with subscript reference'
    $at_quiet $ECHO_N " 62: STRING with subscript reference              $ECHO_C"
    at_xfail=no
    (
      echo "62. misc.at:859: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G.
         02 X           PIC X(3) OCCURS 3.
       PROCEDURE        DIVISION.
           STRING "abc" INTO X(1).
           DISPLAY X(1) NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:874: \${COMPILE} -o prog prog.cob"
echo misc.at:874 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:874: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:875: ./prog"
echo misc.at:875 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "abc" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:875: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  63 ) # 63. misc.at:880: UNSTRING DELIMITED ALL LOW-VALUE
    at_setup_line='misc.at:880'
    at_desc='UNSTRING DELIMITED ALL LOW-VALUE'
    $at_quiet $ECHO_N " 63: UNSTRING DELIMITED ALL LOW-VALUE             $ECHO_C"
    at_xfail=no
    (
      echo "63. misc.at:880: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  G.
           03 FILLER    PIC XXX VALUE "ABC".
           03 FILLER    PIC XX  VALUE LOW-VALUES.
           03 FILLER    PIC XXX VALUE "DEF".
       01  A            PIC XXX.
       01  B            PIC XXX.
       PROCEDURE        DIVISION.
           UNSTRING G DELIMITED BY ALL LOW-VALUES
                      INTO A B.
           DISPLAY A.
           DISPLAY B.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:901: \${COMPILE} -o prog prog.cob"
echo misc.at:901 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:901: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:905: ./prog"
echo misc.at:905 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "ABC
DEF
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:905: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  64 ) # 64. misc.at:910: READ INTO AT-END sequence
    at_setup_line='misc.at:910'
    at_desc='READ INTO AT-END sequence'
    $at_quiet $ECHO_N " 64: READ INTO AT-END sequence                    $ECHO_C"
    at_xfail=no
    (
      echo "64. misc.at:910: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN "./TEST-FILE".
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(10).
       WORKING-STORAGE  SECTION.
       01 X             PIC X(10).
       PROCEDURE        DIVISION.
           OPEN  OUTPUT TEST-FILE.
           CLOSE TEST-FILE.
           OPEN  INPUT  TEST-FILE.
           READ  TEST-FILE INTO X
               AT END MOVE ZERO TO X
           END-READ.
           CLOSE TEST-FILE.
           DISPLAY X NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:937: \${COMPILE} -o prog prog.cob"
echo misc.at:937 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:937: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:938: ./prog"
echo misc.at:938 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "0000000000" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:938: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  65 ) # 65. misc.at:943: First READ on empty SEQUENTIAL INDEXED file
    at_setup_line='misc.at:943'
    at_desc='First READ on empty SEQUENTIAL INDEXED file'
    $at_quiet $ECHO_N " 65: First READ on empty SEQUENTIAL INDEXED file  $ECHO_C"
    at_xfail=no
    (
      echo "65. misc.at:943: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN       "./TEST-FILE"
                        ORGANIZATION IS  INDEXED
                        ACCESS MODE  IS  SEQUENTIAL
                        RECORD KEY   IS  TEST-KEY.
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-KEY      PIC X(10).
       PROCEDURE        DIVISION.
           OPEN  OUTPUT TEST-FILE.
           CLOSE TEST-FILE.
           OPEN  INPUT  TEST-FILE.
           READ  TEST-FILE
               AT END
                   DISPLAY "OK" NO ADVANCING
           END-READ.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:971: \${COMPILE} -o prog prog.cob"
echo misc.at:971 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:971: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:972: ./prog"
echo misc.at:972 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:972: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  66 ) # 66. misc.at:977: REWRITE a RELATIVE file with RANDOM access
    at_setup_line='misc.at:977'
    at_desc='REWRITE a RELATIVE file with RANDOM access'
    $at_quiet $ECHO_N " 66: REWRITE a RELATIVE file with RANDOM access   $ECHO_C"
    at_xfail=no
    (
      echo "66. misc.at:977: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN       "./TEST-FILE"
                        ORGANIZATION IS RELATIVE
                        ACCESS MODE  IS RANDOM
                        RELATIVE KEY IS TEST-KEY.
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X.
       WORKING-STORAGE  SECTION.
       01 TEST-KEY      PIC 9.
       PROCEDURE        DIVISION.
      *
           OPEN OUTPUT TEST-FILE.
           MOVE 1 TO TEST-KEY. MOVE "A" TO TEST-REC. WRITE TEST-REC.
           MOVE 2 TO TEST-KEY. MOVE "B" TO TEST-REC. WRITE TEST-REC.
           CLOSE TEST-FILE.
      *
           OPEN I-O TEST-FILE.
           MOVE 1 TO TEST-KEY. READ TEST-FILE.
           MOVE 2 TO TEST-KEY. MOVE "C" TO TEST-REC. REWRITE TEST-REC.
           CLOSE TEST-FILE.
      *
           OPEN INPUT TEST-FILE.
           MOVE 1 TO TEST-KEY. READ TEST-FILE. DISPLAY TEST-REC.
           MOVE 2 TO TEST-KEY. READ TEST-FILE. DISPLAY TEST-REC.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:1014: \${COMPILE} -o prog prog.cob"
echo misc.at:1014 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1014: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1018: ./prog"
echo misc.at:1018 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "A
C
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1018: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  67 ) # 67. misc.at:1023: SORT: table sort
    at_setup_line='misc.at:1023'
    at_desc='SORT: table sort'
    $at_quiet $ECHO_N " 67: SORT: table sort                             $ECHO_C"
    at_xfail=no
    (
      echo "67. misc.at:1023: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 G             VALUE "d4b2e1a3c5".
         02 TBL         OCCURS 5.
           03 X         PIC X.
           03 Y         PIC 9.
       PROCEDURE        DIVISION.
           SORT TBL ASCENDING KEY X.
           DISPLAY G.
           SORT TBL DESCENDING KEY Y.
           DISPLAY G.
           SORT TBL ASCENDING KEY TBL.
           DISPLAY G.
           SORT TBL DESCENDING KEY.
           DISPLAY G.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:1046: \${COMPILE} -o prog prog.cob"
echo misc.at:1046 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1046: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1052: ./prog"
echo misc.at:1052 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "a3b2c5d4e1
c5d4a3b2e1
a3b2c5d4e1
e1d4c5b2a3
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1052: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  68 ) # 68. misc.at:1056: SORT: EBCDIC table sort
    at_setup_line='misc.at:1056'
    at_desc='SORT: EBCDIC table sort'
    $at_quiet $ECHO_N " 68: SORT: EBCDIC table sort                      $ECHO_C"
    at_xfail=no
    (
      echo "68. misc.at:1056: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SPECIAL-NAMES.
           ALPHABET ALPHA IS EBCDIC.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 Z  PIC X(10)  VALUE "d4b2e1a3c5".
       01 G             VALUE "d4b2e1a3c5".
         02 TBL         OCCURS 10.
           03 X         PIC X.
       PROCEDURE        DIVISION.
           SORT TBL ASCENDING KEY X.
           DISPLAY G.
           MOVE Z TO G.
           SORT TBL DESCENDING KEY X.
           DISPLAY G.
           MOVE Z TO G.
           SORT TBL ASCENDING KEY X SEQUENCE ALPHA.
           DISPLAY G.
           MOVE Z TO G.
           SORT TBL DESCENDING KEY X SEQUENCE ALPHA.
           DISPLAY G.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:1086: \${COMPILE} -o prog prog.cob"
echo misc.at:1086 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1086: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1092: ./prog"
echo misc.at:1092 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "12345abcde
edcba54321
abcde12345
54321edcba
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1092: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  69 ) # 69. misc.at:1096: SORT nonexistent file
    at_setup_line='misc.at:1096'
    at_desc='SORT nonexistent file'
    $at_quiet $ECHO_N " 69: SORT nonexistent file                        $ECHO_C"
    at_xfail=no
    (
      echo "69. misc.at:1096: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT SORT-IN   ASSIGN "SORT-IN".
       SELECT SORT-OUT  ASSIGN "SORT-OUT".
       SELECT SORT-WRK  ASSIGN "SORT-WRK".
       DATA             DIVISION.
       FILE             SECTION.
       FD SORT-IN.
       01 IN-REC        PIC X(100).
       FD SORT-OUT.
       01 OUT-REC       PIC X(100).
       SD SORT-WRK.
       01 WRK-REC       PIC X(100).
       PROCEDURE        DIVISION.
           SORT SORT-WRK
                ASCENDING KEY WRK-REC
                USING  SORT-IN
                GIVING SORT-OUT.
             STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:1123: \${COMPILE} -o prog prog.cob"
echo misc.at:1123 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1123: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1124: ./prog"
echo misc.at:1124 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1124: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1125: cat SORT-OUT"
echo misc.at:1125 >$at_check_line_file
( $at_traceon; cat SORT-OUT ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1125: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  70 ) # 70. misc.at:1130: PIC ZZZ-, ZZZ+
    at_setup_line='misc.at:1130'
    at_desc='PIC ZZZ-, ZZZ+'
    $at_quiet $ECHO_N " 70: PIC ZZZ-, ZZZ+                               $ECHO_C"
    at_xfail=no
    (
      echo "70. misc.at:1130: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X-ZZZN        PIC ZZZ-.
       01 X-ZZZP        PIC ZZZ+.
       PROCEDURE        DIVISION.
           MOVE -1 TO X-ZZZN. DISPLAY "(" X-ZZZN ")".
           MOVE  0 TO X-ZZZN. DISPLAY "(" X-ZZZN ")".
           MOVE +1 TO X-ZZZN. DISPLAY "(" X-ZZZN ")".
           MOVE -1 TO X-ZZZP. DISPLAY "(" X-ZZZP ")".
           MOVE  0 TO X-ZZZP. DISPLAY "(" X-ZZZP ")".
           MOVE +1 TO X-ZZZP. DISPLAY "(" X-ZZZP ")".
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:1149: \${COMPILE} -o prog prog.cob"
echo misc.at:1149 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1149: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1157: ./prog"
echo misc.at:1157 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "(  1-)
(    )
(  1 )
(  1-)
(    )
(  1+)
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1157: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  71 ) # 71. misc.at:1162: Larger REDEFINES lengths
    at_setup_line='misc.at:1162'
    at_desc='Larger REDEFINES lengths'
    $at_quiet $ECHO_N " 71: Larger REDEFINES lengths                     $ECHO_C"
    at_xfail=no
    (
      echo "71. misc.at:1162: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  XMAIN        PIC X(8).
       01  XMAINRED REDEFINES XMAIN.
           03  FILLER         PIC X(4).
           03  XMAIN03.
               05  XMAIN0501  PIC X(4).
               05  XMAIN0502 REDEFINES XMAIN0501 PIC X(5).
       PROCEDURE        DIVISION.
           DISPLAY LENGTH OF XMAIN.
           DISPLAY LENGTH OF XMAINRED.
           DISPLAY LENGTH OF XMAIN03.
           DISPLAY LENGTH OF XMAIN0501.
           DISPLAY LENGTH OF XMAIN0502.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:1186: \${COMPILE} -std=mf -o prog prog.cob"
echo misc.at:1186 >$at_check_line_file
( $at_traceon; ${COMPILE} -std=mf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob:11: Warning: Size of 'XMAIN0502' larger than size of 'XMAIN0501'
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1186: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1193: ./prog"
echo misc.at:1193 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "8
9
5
4
5
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1193: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  72 ) # 72. misc.at:1197: PERFORM type OSVS
    at_setup_line='misc.at:1197'
    at_desc='PERFORM type OSVS'
    $at_quiet $ECHO_N " 72: PERFORM type OSVS                            $ECHO_C"
    at_xfail=no
    (
      echo "72. misc.at:1197: testing ..."
      $at_traceon


cat >test.conf <<'_ATEOF'

include "default.conf"
perform-osvs: yes
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  MYOCC        PIC 9(8) COMP VALUE 0.
       PROCEDURE        DIVISION.
       ASTART SECTION.
       A01.
           PERFORM BTEST.
           DISPLAY "OK".
           STOP RUN.
       BTEST SECTION.
       B01.
           PERFORM B02 VARYING MYOCC FROM 1 BY 1
                   UNTIL MYOCC > 5.
           GO TO B99.
       B02.
           IF MYOCC > 1
              GO TO B99
           END-IF.
       B99.
           EXIT.
_ATEOF


$at_traceoff
echo "misc.at:1229: \${COMPILE} -conf=test.conf -o prog prog.cob"
echo misc.at:1229 >$at_check_line_file
( $at_traceon; ${COMPILE} -conf=test.conf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1229: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1232: ./prog"
echo misc.at:1232 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1232: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  73 ) # 73. misc.at:1237: Sticky LINKAGE
    at_setup_line='misc.at:1237'
    at_desc='Sticky LINKAGE'
    $at_quiet $ECHO_N " 73: Sticky LINKAGE                               $ECHO_C"
    at_xfail=no
    (
      echo "73. misc.at:1237: testing ..."
      $at_traceon


cat >test.conf <<'_ATEOF'

include "default.conf"
sticky-linkage: yes
_ATEOF


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       LINKAGE          SECTION.
       01 P1            PIC X.
       01 P2            PIC X(6).
       01 P3            PIC X(6).
       PROCEDURE        DIVISION USING P1 P2.
           IF P1 = "A"
              SET ADDRESS OF P3 TO ADDRESS OF P2
           ELSE
              DISPLAY P3
           END-IF.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 P1            PIC X    VALUE "A".
       01 P2            PIC X(6) VALUE "NOT OK".
       PROCEDURE        DIVISION.
           CALL "callee" USING P1 P2.
           MOVE "B"      TO P1.
           MOVE "OKOKOK" TO P2.
           CALL "callee" USING P1.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:1276: \${COMPILE_MODULE} -conf=test.conf callee.cob"
echo misc.at:1276 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} -conf=test.conf callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1276: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1277: \${COMPILE} -conf=test.conf -o caller caller.cob"
echo misc.at:1277 >$at_check_line_file
( $at_traceon; ${COMPILE} -conf=test.conf -o caller caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1277: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1280: ./caller"
echo misc.at:1280 >$at_check_line_file
( $at_traceon; ./caller ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OKOKOK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1280: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  74 ) # 74. misc.at:1284: COB_PRE_LOAD test
    at_setup_line='misc.at:1284'
    at_desc='COB_PRE_LOAD test'
    $at_quiet $ECHO_N " 74: COB_PRE_LOAD test                            $ECHO_C"
    at_xfail=no
    (
      echo "74. misc.at:1284: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee2.
       PROCEDURE        DIVISION.
           DISPLAY "OK" NO ADVANCING.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       PROCEDURE        DIVISION.
           CALL "callee2".
_ATEOF


$at_traceoff
echo "misc.at:1300: \${COMPILE_MODULE} callee.cob"
echo misc.at:1300 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1300: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1301: \${COMPILE} caller.cob"
echo misc.at:1301 >$at_check_line_file
( $at_traceon; ${COMPILE} caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1301: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1302: export COB_PRE_LOAD=callee; ./caller"
echo misc.at:1302 >$at_check_line_file
( $at_traceon; export COB_PRE_LOAD=callee; ./caller ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1302: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  75 ) # 75. misc.at:1306: 88 level with FALSE IS clause
    at_setup_line='misc.at:1306'
    at_desc='88 level with FALSE IS clause'
    $at_quiet $ECHO_N " 75: 88 level with FALSE IS clause                $ECHO_C"
    at_xfail=no
    (
      echo "75. misc.at:1306: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  MYFLD        PIC X(6) VALUE "ABCDEF".
           88  MYFLD88  VALUE "ABCDEF"
               FALSE IS "OKOKOK".
       PROCEDURE        DIVISION.
       ASTART SECTION.
       A01.
           SET MYFLD88 TO FALSE.
           DISPLAY MYFLD.
_ATEOF


$at_traceoff
echo "misc.at:1323: \${COMPILE} prog.cob"
echo misc.at:1323 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1323: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1326: ./prog"
echo misc.at:1326 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OKOKOK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1326: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  76 ) # 76. misc.at:1330: ALLOCATE/FREE with BASED item
    at_setup_line='misc.at:1330'
    at_desc='ALLOCATE/FREE with BASED item'
    $at_quiet $ECHO_N " 76: ALLOCATE/FREE with BASED item                $ECHO_C"
    at_xfail=no
    (
      echo "76. misc.at:1330: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       LINKAGE          SECTION.
       01  MYFLD        PIC X(6) BASED VALUE "ABCDEF".
       PROCEDURE        DIVISION.
       ASTART SECTION.
       A01.
           ALLOCATE MYFLD INITIALIZED.
           DISPLAY MYFLD.
           FREE ADDRESS OF MYFLD.
_ATEOF


$at_traceoff
echo "misc.at:1346: \${COMPILE} prog.cob"
echo misc.at:1346 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1346: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1349: ./prog"
echo misc.at:1349 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "ABCDEF
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1349: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  77 ) # 77. misc.at:1353: CALL with OMITTED parameter
    at_setup_line='misc.at:1353'
    at_desc='CALL with OMITTED parameter'
    $at_quiet $ECHO_N " 77: CALL with OMITTED parameter                  $ECHO_C"
    at_xfail=no
    (
      echo "77. misc.at:1353: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       LINKAGE          SECTION.
       01 P1            PIC X.
       01 P2            PIC X(6).
       PROCEDURE        DIVISION USING P1 P2.
           IF P2 OMITTED
              DISPLAY "OKOKOK"
           END-IF.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 P1            PIC X    VALUE "A".
       01 P2            PIC X(6) VALUE "NOT OK".
       PROCEDURE        DIVISION.
           CALL "callee" USING P1 OMITTED.
           STOP RUN.
_ATEOF


$at_traceoff
echo "misc.at:1381: \${COMPILE_MODULE} callee.cob"
echo misc.at:1381 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1381: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1382: \${COMPILE} -o caller caller.cob"
echo misc.at:1382 >$at_check_line_file
( $at_traceon; ${COMPILE} -o caller caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1382: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "misc.at:1385: ./caller"
echo misc.at:1385 >$at_check_line_file
( $at_traceon; ./caller ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OKOKOK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "misc.at:1385: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  78 ) # 78. extensions.at:24: COMP-5
    at_setup_line='extensions.at:24'
    at_desc='COMP-5'
    $at_quiet $ECHO_N " 78: COMP-5                                       $ECHO_C"
    at_xfail=no
    (
      echo "78. extensions.at:24: testing ..."
      $at_traceon


cat >dump.c <<'_ATEOF'

#include <stdio.h>
int dump (unsigned char *data, int *p);
int dump (unsigned char *data, int *p)
{
  int i;
  if ( *p == 1 ) {
     for (i = 0; i < 4; i++)
       printf ("%02x", data[i]);
  } else {
       printf ("%8.8d", *((int *)data));
  }
  puts ("");
  return 0;
}
_ATEOF


$at_traceoff
echo "extensions.at:43: \${CC} \${SHROPT} -o dump.\${SHREXT} dump.c"
echo extensions.at:43 >$at_check_line_file
( $at_traceon; ${CC} ${SHROPT} -o dump.${SHREXT} dump.c ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:43: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X-1           PIC 9(9) VALUE 4660 COMP.
       01 X-2           PIC 9(9) VALUE 4660 COMP-5.
       PROCEDURE        DIVISION.
           CALL "dump" USING X-1 BY CONTENT 1.
           CALL "dump" USING X-2 BY CONTENT 2.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:58: \${COMPILE} -o prog prog.cob"
echo extensions.at:58 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:58: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:62: ./prog"
echo extensions.at:62 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00001234
00004660
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:62: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  79 ) # 79. extensions.at:69: Hexadecimal numeric literal
    at_setup_line='extensions.at:69'
    at_desc='Hexadecimal numeric literal'
    $at_quiet $ECHO_N " 79: Hexadecimal numeric literal                  $ECHO_C"
    at_xfail=no
    (
      echo "79. extensions.at:69: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X-1           PIC 9(8) VALUE H"012345".
       01 X-2           PIC 9(8) VALUE H"FFFFFF".
       PROCEDURE        DIVISION.
           DISPLAY X-1.
           DISPLAY X-2.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:84: \${COMPILE} -o prog prog.cob"
echo extensions.at:84 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:84: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:88: ./prog"
echo extensions.at:88 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00074565
16777215
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:88: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  80 ) # 80. extensions.at:95: Semi-parenthesized condition
    at_setup_line='extensions.at:95'
    at_desc='Semi-parenthesized condition'
    $at_quiet $ECHO_N " 80: Semi-parenthesized condition                 $ECHO_C"
    at_xfail=no
    (
      echo "80. extensions.at:95: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           IF 1 = (1 OR 2)
             DISPLAY "OK" NO ADVANCING
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:107: \${COMPILE} -o prog prog.cob"
echo extensions.at:107 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:107: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:108: ./prog"
echo extensions.at:108 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:108: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  81 ) # 81. extensions.at:115: ADDRESS OF
    at_setup_line='extensions.at:115'
    at_desc='ADDRESS OF'
    $at_quiet $ECHO_N " 81: ADDRESS OF                                   $ECHO_C"
    at_xfail=no
    (
      echo "81. extensions.at:115: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X-1           PIC X(3) VALUE "X-1".
       01 X-2           PIC X(3) VALUE "X-2".
       01 G.
         02 PTR-1       USAGE POINTER VALUE NULL.
         02 PTR-2       USAGE POINTER VALUE NULL.
       LINKAGE          SECTION.
       01 Y             PIC X(3).
       PROCEDURE        DIVISION.
         SET ADDRESS OF Y TO ADDRESS OF X-1.
         DISPLAY Y.
         SET PTR-1 TO ADDRESS OF X-2.
         SET PTR-2 TO PTR-1
         SET ADDRESS OF Y TO PTR-2.
         DISPLAY Y.
         INITIALIZE PTR-1.
         IF PTR-1 = NULL
           DISPLAY "OK"
         ELSE
           DISPLAY "NG"
         END-IF.
         SET ADDRESS OF Y TO NULL.
         IF PTR-1 = ADDRESS OF Y
           DISPLAY "OK"
         ELSE
           DISPLAY "NG"
         END-IF.
         IF ADDRESS OF Y = PTR-1
           DISPLAY "OK"
         ELSE
           DISPLAY "NG"
         END-IF.
_ATEOF


$at_traceoff
echo "extensions.at:155: \${COMPILE} -o prog prog.cob"
echo extensions.at:155 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:155: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:162: ./prog"
echo extensions.at:162 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "X-1
X-2
OK
OK
OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:162: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  82 ) # 82. extensions.at:170: LENGTH OF
    at_setup_line='extensions.at:170'
    at_desc='LENGTH OF'
    $at_quiet $ECHO_N " 82: LENGTH OF                                    $ECHO_C"
    at_xfail=no
    (
      echo "82. extensions.at:170: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(2).
       01 G.
         02 Y           PIC X(2) OCCURS 10.
       01 L             PIC 9(4).
       01 I             PIC 9(2) VALUE 10.
       PROCEDURE        DIVISION.
           MOVE LENGTH OF X TO L.  DISPLAY L.
           MOVE LENGTH OF Y TO L.  DISPLAY L.
           MOVE LENGTH OF Y(1) TO L.  DISPLAY L.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:189: \${COMPILE} -o prog prog.cob"
echo extensions.at:189 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:189: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:194: ./prog"
echo extensions.at:194 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "0002
0002
0002
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:194: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  83 ) # 83. extensions.at:201: WHEN-COMPILED
    at_setup_line='extensions.at:201'
    at_desc='WHEN-COMPILED'
    $at_quiet $ECHO_N " 83: WHEN-COMPILED                                $ECHO_C"
    at_xfail=no
    (
      echo "83. extensions.at:201: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(20).
       PROCEDURE        DIVISION.
           MOVE WHEN-COMPILED TO X.
           INSPECT X CONVERTING "0123456789" TO "9999999999".
           DISPLAY X NO ADVANCING.
_ATEOF


$at_traceoff
echo "extensions.at:215: \${COMPILE} -o prog prog.cob"
echo extensions.at:215 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:215: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:216: ./prog"
echo extensions.at:216 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "99/99/9999.99.99    " | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:216: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  84 ) # 84. extensions.at:223: Complex OCCURS DEPENDING ON
    at_setup_line='extensions.at:223'
    at_desc='Complex OCCURS DEPENDING ON'
    $at_quiet $ECHO_N " 84: Complex OCCURS DEPENDING ON                  $ECHO_C"
    at_xfail=no
    (
      echo "84. extensions.at:223: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 I PIC 9.
       01 G-1 VALUE "123456789".
         02 G-2.
           03 X PIC X OCCURS 1 TO 3 DEPENDING ON I.
         02 G-3.
           03 G-4.
             04 X PIC X OCCURS 1 TO 3 DEPENDING ON I.
           03 G-5.
             04 X PIC X OCCURS 1 TO 3 DEPENDING ON I.
       PROCEDURE        DIVISION.
           MOVE 2 TO I.
           DISPLAY G-1 ":" G-4 ":" G-5 NO ADVANCING.
_ATEOF


$at_traceoff
echo "extensions.at:244: \${COMPILE} -std=mvs -o prog prog.cob"
echo extensions.at:244 >$at_check_line_file
( $at_traceon; ${COMPILE} -std=mvs -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:244: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:245: ./prog"
echo extensions.at:245 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "123456:34:56" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:245: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  85 ) # 85. extensions.at:250: MOVE NON-INTEGER TO ALPHA-NUMERIC
    at_setup_line='extensions.at:250'
    at_desc='MOVE NON-INTEGER TO ALPHA-NUMERIC'
    $at_quiet $ECHO_N " 85: MOVE NON-INTEGER TO ALPHA-NUMERIC            $ECHO_C"
    at_xfail=no
    (
      echo "85. extensions.at:250: testing ..."
      $at_traceon

#  see MF - COBOL  Error Messages  1029-E ...
cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
        01 INTEGER             PIC 9(4)   VALUE 1289 .
        01 SIGNED-INTEGER      PIC S9(4)  VALUE -1289 .

        01 ALPHA-FIELD         PIC X(4).

        01 NON-INTEGER           PIC 9(2)V99   VALUE 12.89 .
        01 NON-INTEGER-2         PIC 9(2)V99
                                     USAGE BINARY VALUE 12.89 .
        01 NON-INTEGER-3         PIC 9(2)V99
                                      USAGE PACKED-DECIMAL VALUE 12.89 .
        01 SIGNED-NON-INTEGER    PIC S9(2)V99   VALUE -12.89 .
        01 SIGNED-NON-INTEGER-2  PIC S9(2)V99
                                     USAGE BINARY VALUE -12.89 .
        01 SIGNED-NON-INTEGER-3  PIC S9(2)V99
                                     USAGE PACKED-DECIMAL VALUE -12.89 .

       PROCEDURE        DIVISION.
*     *    1029-E :  MF-COBOL Extension  see ERROR-Messages (2-77) !
*     *    MOVE NON-INTEGER TO ALPHA-NUMERIC --> ignore Decimal Point!
       S-01.
          MOVE SPACES TO ALPHA-FIELD.
          MOVE INTEGER TO ALPHA-FIELD.
          DISPLAY  ALPHA-FIELD NO ADVANCING.
       S-02.
          MOVE SPACES TO ALPHA-FIELD.
          MOVE SIGNED-INTEGER TO ALPHA-FIELD.
          DISPLAY  ALPHA-FIELD NO ADVANCING.
       S-03.
          MOVE SPACES TO ALPHA-FIELD.
          MOVE NON-INTEGER TO ALPHA-FIELD.
          DISPLAY  ALPHA-FIELD NO ADVANCING.
       S-10.
          MOVE SPACES TO ALPHA-FIELD.
          MOVE NON-INTEGER-2 TO ALPHA-FIELD.
          DISPLAY  ALPHA-FIELD NO ADVANCING.
       S-20.
          MOVE SPACES TO ALPHA-FIELD.
          MOVE NON-INTEGER-3 TO ALPHA-FIELD.
          DISPLAY  ALPHA-FIELD NO ADVANCING.IELD.
       S-30.
          MOVE SPACES TO ALPHA-FIELD.
          MOVE SIGNED-NON-INTEGER TO ALPHA-FIELD.
          DISPLAY  ALPHA-FIELD NO ADVANCING.
       S-40.
          MOVE SPACES TO ALPHA-FIELD.
          MOVE SIGNED-NON-INTEGER-2 TO ALPHA-FIELD.
          DISPLAY  ALPHA-FIELD NO ADVANCING.
       S-50.
          MOVE SPACES TO ALPHA-FIELD.
          MOVE SIGNED-NON-INTEGER-3 TO ALPHA-FIELD.
          DISPLAY  ALPHA-FIELD NO ADVANCING.

          STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:325: \${COMPILE} -std=mf -o prog prog.cob"
echo extensions.at:325 >$at_check_line_file
( $at_traceon; ${COMPILE} -std=mf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "prog.cob: In paragraph 'S-03':
prog.cob:35: Warning: Move non-integer to alphanumeric
prog.cob: In paragraph 'S-10':
prog.cob:39: Warning: Move non-integer to alphanumeric
prog.cob: In paragraph 'S-20':
prog.cob:43: Warning: Move non-integer to alphanumeric
prog.cob: In paragraph 'S-30':
prog.cob:47: Warning: Move non-integer to alphanumeric
prog.cob: In paragraph 'S-40':
prog.cob:51: Warning: Move non-integer to alphanumeric
prog.cob: In paragraph 'S-50':
prog.cob:55: Warning: Move non-integer to alphanumeric
" | $at_diff - $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:325: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:326: ./prog"
echo extensions.at:326 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "12891289128912891289128912891289" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:326: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  86 ) # 86. extensions.at:333: CALL USING file-name
    at_setup_line='extensions.at:333'
    at_desc='CALL USING file-name'
    $at_quiet $ECHO_N " 86: CALL USING file-name                         $ECHO_C"
    at_xfail=no
    (
      echo "86. extensions.at:333: testing ..."
      $at_traceon


cat >setfilename.c <<'_ATEOF'

#include <stdio.h>
#include <string.h>
#include <libcob.h>
int setfilename (cob_file *f, unsigned char *name)
{
  memcpy (f->assign->data, name, strlen ((char *)name));
  return 0;
}
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN FILENAME.
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(4).
       WORKING-STORAGE  SECTION.
       01 FILENAME      PIC X(8).
       PROCEDURE        DIVISION.
           INITIALIZE FILENAME.
           CALL "setfilename" USING TEST-FILE "TESTFILE".
           OPEN OUTPUT TEST-FILE.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:367: \${COMPILE_MODULE} setfilename.c"
echo extensions.at:367 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} setfilename.c ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:367: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:368: \${COMPILE} -o prog prog.cob"
echo extensions.at:368 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:368: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:369: ./prog"
echo extensions.at:369 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:369: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:370: test -e TESTFILE"
echo extensions.at:370 >$at_check_line_file
( $at_traceon; test -e TESTFILE ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:370: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  87 ) # 87. extensions.at:374: CALL unusual program-id.
    at_setup_line='extensions.at:374'
    at_desc='CALL unusual program-id.'
    $at_quiet $ECHO_N " 87: CALL unusual program-id.                     $ECHO_C"
    at_xfail=no
    (
      echo "87. extensions.at:374: testing ..."
      $at_traceon


cat >A@B.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      "A@B".
       PROCEDURE        DIVISION.
           EXIT PROGRAM.
_ATEOF


cat >A#B.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      "A#B".
       PROCEDURE        DIVISION.
           EXIT PROGRAM.
_ATEOF


cat >A-B.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      "A-B".
       PROCEDURE        DIVISION.
           EXIT PROGRAM.
_ATEOF


cat >A_B.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      "A_B".
       PROCEDURE        DIVISION.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       PROCEDURE        DIVISION.
           CALL "A@B".
           CALL "A#B".
           CALL "A-B".
           CALL "A_B".
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:415: \${COMPILE_MODULE} A@B.cob"
echo extensions.at:415 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} A@B.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:415: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:416: \${COMPILE_MODULE} A#B.cob"
echo extensions.at:416 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} A#B.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:416: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:417: \${COMPILE_MODULE} A-B.cob"
echo extensions.at:417 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} A-B.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:417: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:418: \${COMPILE_MODULE} A_B.cob"
echo extensions.at:418 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} A_B.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:418: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:419: \${COMPILE} -o caller caller.cob"
echo extensions.at:419 >$at_check_line_file
( $at_traceon; ${COMPILE} -o caller caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:419: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


$at_traceoff
echo "extensions.at:421: ./caller"
echo extensions.at:421 >$at_check_line_file
( $at_traceon; ./caller ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:421: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  88 ) # 88. extensions.at:428: ASSIGN MF
    at_setup_line='extensions.at:428'
    at_desc='ASSIGN MF'
    $at_quiet $ECHO_N " 88: ASSIGN MF                                    $ECHO_C"
    at_xfail=no
    (
      echo "88. extensions.at:428: testing ..."
      $at_traceon


cat >test.conf <<'_ATEOF'

include "cobol2002.conf"
assign-clause: mf
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN FILENAME.
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(4).
       PROCEDURE        DIVISION.
           MOVE "TEST-FILE" TO FILENAME.
           OPEN OUTPUT TEST-FILE.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:453: \${COMPILE} -conf=test.conf -o prog prog.cob"
echo extensions.at:453 >$at_check_line_file
( $at_traceon; ${COMPILE} -conf=test.conf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:453: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:454: ./prog"
echo extensions.at:454 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:454: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  89 ) # 89. extensions.at:458: ASSIGN IBM
    at_setup_line='extensions.at:458'
    at_desc='ASSIGN IBM'
    $at_quiet $ECHO_N " 89: ASSIGN IBM                                   $ECHO_C"
    at_xfail=no
    (
      echo "89. extensions.at:458: testing ..."
      $at_traceon


cat >test.conf <<'_ATEOF'

include "cobol2002.conf"
assign-clause: ibm
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN DA-S-FILENAME.
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(4).
       PROCEDURE        DIVISION.
           OPEN OUTPUT TEST-FILE.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:482: \${COMPILE} -conf=test.conf -o prog prog.cob"
echo extensions.at:482 >$at_check_line_file
( $at_traceon; ${COMPILE} -conf=test.conf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:482: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:483: ./prog"
echo extensions.at:483 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:483: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:484: test -f FILENAME"
echo extensions.at:484 >$at_check_line_file
( $at_traceon; test -f FILENAME ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:484: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  90 ) # 90. extensions.at:488: ASSIGN mapping
    at_setup_line='extensions.at:488'
    at_desc='ASSIGN mapping'
    $at_quiet $ECHO_N " 90: ASSIGN mapping                               $ECHO_C"
    at_xfail=no
    (
      echo "90. extensions.at:488: testing ..."
      $at_traceon


cat >test.conf <<'_ATEOF'

include "cobol2002.conf"
filename-mapping: yes
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN "FILENAME".
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(4).
       PROCEDURE        DIVISION.
           OPEN OUTPUT TEST-FILE.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:512: \${COMPILE} -conf=test.conf -o prog prog.cob"
echo extensions.at:512 >$at_check_line_file
( $at_traceon; ${COMPILE} -conf=test.conf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:512: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:513: DD_FILENAME=\"x\" ./prog"
echo extensions.at:513 >$at_check_line_file
( $at_traceon; DD_FILENAME="x" ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:513: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:514: test -f \"x\""
echo extensions.at:514 >$at_check_line_file
( $at_traceon; test -f "x" ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:514: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:515: dd_FILENAME=\"y\" ./prog"
echo extensions.at:515 >$at_check_line_file
( $at_traceon; dd_FILENAME="y" ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:515: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:516: test -f \"y\""
echo extensions.at:516 >$at_check_line_file
( $at_traceon; test -f "y" ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:516: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:517: FILENAME=\"z\" ./prog"
echo extensions.at:517 >$at_check_line_file
( $at_traceon; FILENAME="z" ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:517: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:518: test -f \"z\""
echo extensions.at:518 >$at_check_line_file
( $at_traceon; test -f "z" ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:518: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:519: ./prog"
echo extensions.at:519 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:519: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:520: test -f \"FILENAME\""
echo extensions.at:520 >$at_check_line_file
( $at_traceon; test -f "FILENAME" ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:520: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  91 ) # 91. extensions.at:524: ASSIGN expansion
    at_setup_line='extensions.at:524'
    at_desc='ASSIGN expansion'
    $at_quiet $ECHO_N " 91: ASSIGN expansion                             $ECHO_C"
    at_xfail=no
    (
      echo "91. extensions.at:524: testing ..."
      $at_traceon


cat >test.conf <<'_ATEOF'

include "cobol2002.conf"
filename-mapping: yes
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN "$DIR/FILENAME".
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(4).
       PROCEDURE        DIVISION.
           OPEN OUTPUT TEST-FILE.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:548: \${COMPILE} -conf=test.conf -o prog prog.cob"
echo extensions.at:548 >$at_check_line_file
( $at_traceon; ${COMPILE} -conf=test.conf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:548: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:549: DIR=\".\" ./prog"
echo extensions.at:549 >$at_check_line_file
( $at_traceon; DIR="." ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:549: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:550: test -f \"./FILENAME\" && rm -f \"./FILENAME\""
echo extensions.at:550 >$at_check_line_file
( $at_traceon; test -f "./FILENAME" && rm -f "./FILENAME" ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:550: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  92 ) # 92. extensions.at:554: ASSIGN with COB_FILE_PATH
    at_setup_line='extensions.at:554'
    at_desc='ASSIGN with COB_FILE_PATH'
    $at_quiet $ECHO_N " 92: ASSIGN with COB_FILE_PATH                    $ECHO_C"
    at_xfail=no
    (
      echo "92. extensions.at:554: testing ..."
      $at_traceon


cat >test.conf <<'_ATEOF'

include "cobol2002.conf"
filename-mapping: yes
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN "FILENAMEX".
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(4).
       PROCEDURE        DIVISION.
           OPEN OUTPUT TEST-FILE.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:578: \${COMPILE} -conf=test.conf -o prog prog.cob"
echo extensions.at:578 >$at_check_line_file
( $at_traceon; ${COMPILE} -conf=test.conf -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:578: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:579: COB_FILE_PATH=\"..\" ./prog"
echo extensions.at:579 >$at_check_line_file
( $at_traceon; COB_FILE_PATH=".." ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:579: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:580: test -f \"../FILENAMEX\" && rm -f \"../FILENAMEX\""
echo extensions.at:580 >$at_check_line_file
( $at_traceon; test -f "../FILENAMEX" && rm -f "../FILENAMEX" ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:580: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  93 ) # 93. extensions.at:587: NUMBER-OF-CALL-PARAMETERS
    at_setup_line='extensions.at:587'
    at_desc='NUMBER-OF-CALL-PARAMETERS'
    $at_quiet $ECHO_N " 93: NUMBER-OF-CALL-PARAMETERS                    $ECHO_C"
    at_xfail=no
    (
      echo "93. extensions.at:587: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       LINKAGE          SECTION.
       01 W             PIC X.
       01 X             PIC X.
       01 Y             PIC X.
       01 Z             PIC X.
       PROCEDURE        DIVISION
           USING W X Y Z.
           DISPLAY NUMBER-OF-CALL-PARAMETERS.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 W             PIC X.
       01 X             PIC X.
       01 Y             PIC X.
       01 Z             PIC X.
       PROCEDURE        DIVISION.
           CALL "callee".
           CALL "callee" USING W.
           CALL "callee" USING W X.
           CALL "callee" USING W X Y.
           CALL "callee" USING W X Y Z.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:622: \${COMPILE} caller.cob"
echo extensions.at:622 >$at_check_line_file
( $at_traceon; ${COMPILE} caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:622: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:623: \${COMPILE_MODULE} callee.cob"
echo extensions.at:623 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:623: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:630: ./caller"
echo extensions.at:630 >$at_check_line_file
( $at_traceon; ./caller ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "+000000000
+000000001
+000000002
+000000003
+000000004
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:630: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  94 ) # 94. extensions.at:637: PROCEDURE DIVISION USING BY ...
    at_setup_line='extensions.at:637'
    at_desc='PROCEDURE DIVISION USING BY ...'
    $at_quiet $ECHO_N " 94: PROCEDURE DIVISION USING BY ...              $ECHO_C"
    at_xfail=no
    (
      echo "94. extensions.at:637: testing ..."
      $at_traceon


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       LINKAGE          SECTION.
       01 X             PIC X.
       01 Y             PIC 99.
       01 Z             PIC 99 USAGE COMP.
       PROCEDURE        DIVISION
           USING BY VALUE X BY REFERENCE Y BY CONTENT Z.
           DISPLAY "X = " X " Y = " Y " Z = " Z.
           MOVE "Z" TO X.
           MOVE 56 TO Y.
           MOVE 78 TO Z.
           EXIT PROGRAM.
_ATEOF


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      caller.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X.
       01 Y             PIC 99.
       01 Z             PIC 99 USAGE COMP.
       PROCEDURE        DIVISION.
           MOVE "X" TO X.
           MOVE 12 TO Y.
           MOVE 34 TO Z.
           CALL "callee" USING BY VALUE X BY REFERENCE Y Z.
           DISPLAY "X = " X " Y = " Y " Z = " Z.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:673: \${COMPILE} caller.cob"
echo extensions.at:673 >$at_check_line_file
( $at_traceon; ${COMPILE} caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:673: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:674: \${COMPILE_MODULE} callee.cob"
echo extensions.at:674 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:674: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:678: ./caller"
echo extensions.at:678 >$at_check_line_file
( $at_traceon; ./caller ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "X = X Y = 12 Z = 34
X = X Y = 56 Z = 34
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:678: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  95 ) # 95. extensions.at:682: PROCEDURE DIVISION CHAINING ...
    at_setup_line='extensions.at:682'
    at_desc='PROCEDURE DIVISION CHAINING ...'
    $at_quiet $ECHO_N " 95: PROCEDURE DIVISION CHAINING ...              $ECHO_C"
    at_xfail=no
    (
      echo "95. extensions.at:682: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X            PIC X.
       01  ABCD         PIC X(4).
       PROCEDURE        DIVISION
                        CHAINING X ABCD.
           DISPLAY X.
           DISPLAY ABCD.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:698: \${COMPILE} prog.cob"
echo extensions.at:698 >$at_check_line_file
( $at_traceon; ${COMPILE} prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:698: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


$at_traceoff
echo "extensions.at:703: ./prog X ABCD"
echo extensions.at:703 >$at_check_line_file
( $at_traceon; ./prog X ABCD ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "X
ABCD
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:703: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  96 ) # 96. extensions.at:708: STOP RUN RETURNING
    at_setup_line='extensions.at:708'
    at_desc='STOP RUN RETURNING'
    $at_quiet $ECHO_N " 96: STOP RUN RETURNING                           $ECHO_C"
    at_xfail=no
    (
      echo "96. extensions.at:708: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           STOP RUN RETURNING 1.
_ATEOF


$at_traceoff
echo "extensions.at:717: \${COMPILE} -o prog prog.cob"
echo extensions.at:717 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:717: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:718: ./prog"
echo extensions.at:718 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "extensions.at:718: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  97 ) # 97. extensions.at:725: ENTRY
    at_setup_line='extensions.at:725'
    at_desc='ENTRY'
    $at_quiet $ECHO_N " 97: ENTRY                                        $ECHO_C"
    at_xfail=no
    (
      echo "97. extensions.at:725: testing ..."
      $at_traceon


cat >caller.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           CALL "hello" USING "COBOL".
           CALL "bye" USING "COBOL".
           STOP RUN.
_ATEOF


cat >callee.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      hello.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 MSG-HELLO     PIC X(7) VALUE "Hello, ".
       01 MSG-BYE       PIC X(5) VALUE "Bye, ".
       LINKAGE          SECTION.
       01 X             PIC X(5).
       01 Y             PIC X(5).
       PROCEDURE        DIVISION USING X.
           DISPLAY MSG-HELLO X "!".
           EXIT PROGRAM.

           ENTRY "bye" USING Y.
           DISPLAY MSG-BYE Y "!".
           EXIT PROGRAM.
_ATEOF


$at_traceoff
echo "extensions.at:755: \${COMPILE} -std=mvs -c -fstatic-call caller.cob"
echo extensions.at:755 >$at_check_line_file
( $at_traceon; ${COMPILE} -std=mvs -c -fstatic-call caller.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:755: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:756: \${COMPILE_MODULE} -std=mvs -c -fstatic-call callee.cob"
echo extensions.at:756 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} -std=mvs -c -fstatic-call callee.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:756: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:757: \${COMPILE} -o prog caller.o callee.o"
echo extensions.at:757 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog caller.o callee.o ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:757: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:761: ./prog"
echo extensions.at:761 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "Hello, COBOL!
Bye, COBOL!
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:761: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  98 ) # 98. extensions.at:768: LINE SEQUENTIAL write
    at_setup_line='extensions.at:768'
    at_desc='LINE SEQUENTIAL write'
    $at_quiet $ECHO_N " 98: LINE SEQUENTIAL write                        $ECHO_C"
    at_xfail=no
    (
      echo "98. extensions.at:768: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN       "./TEST-FILE"
                        ORGANIZATION IS LINE SEQUENTIAL.
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(4).
       PROCEDURE        DIVISION.
           OPEN OUTPUT TEST-FILE.
           MOVE "a"    TO TEST-REC. WRITE TEST-REC.
           MOVE "ab"   TO TEST-REC. WRITE TEST-REC AFTER 1 LINES.
           MOVE "abc"  TO TEST-REC. WRITE TEST-REC BEFORE 2 LINES.
           MOVE "abcd" TO TEST-REC. WRITE TEST-REC.
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:792: \${COMPILE} -o prog prog.cob"
echo extensions.at:792 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:792: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:793: ./prog"
echo extensions.at:793 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:793: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:800: cat TEST-FILE"
echo extensions.at:800 >$at_check_line_file
( $at_traceon; cat TEST-FILE ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "a

ababc

abcd
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:800: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  99 ) # 99. extensions.at:804: LINE SEQUENTIAL read
    at_setup_line='extensions.at:804'
    at_desc='LINE SEQUENTIAL read'
    $at_quiet $ECHO_N " 99: LINE SEQUENTIAL read                         $ECHO_C"
    at_xfail=no
    (
      echo "99. extensions.at:804: testing ..."
      $at_traceon


cat >TEST-FILE <<'_ATEOF'
a
ab
abc
abcd
abcde
abcdef
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN       "./TEST-FILE"
                        ORGANIZATION IS LINE SEQUENTIAL.
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(4).
       PROCEDURE        DIVISION.
           OPEN INPUT TEST-FILE.
           READ TEST-FILE. DISPLAY "(" TEST-REC ")".
           READ TEST-FILE. DISPLAY "(" TEST-REC ")".
           READ TEST-FILE. DISPLAY "(" TEST-REC ")".
           READ TEST-FILE. DISPLAY "(" TEST-REC ")".
           READ TEST-FILE. DISPLAY "(" TEST-REC ")".
           READ TEST-FILE. DISPLAY "(" TEST-REC ")".
           CLOSE TEST-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:839: \${COMPILE} -o prog prog.cob"
echo extensions.at:839 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:839: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:847: ./prog"
echo extensions.at:847 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "(a   )
(ab  )
(abc )
(abcd)
(abcd)
(abcd)
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:847: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  100 ) # 100. extensions.at:852: ASSIGN to KEYBOARD/DISPLAY
    at_setup_line='extensions.at:852'
    at_desc='ASSIGN to KEYBOARD/DISPLAY'
    $at_quiet $ECHO_N "100: ASSIGN to KEYBOARD/DISPLAY                   $ECHO_C"
    at_xfail=no
    (
      echo "100. extensions.at:852: testing ..."
      $at_traceon


cat >TEST-FILE <<'_ATEOF'
a
ab
abc
abcd
abcde
abcdef
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
       SELECT TEST-FILE ASSIGN  KEYBOARD
                        ORGANIZATION IS LINE SEQUENTIAL.
       SELECT TEST-OUT  ASSIGN  DISPLAY
                        ORGANIZATION IS LINE SEQUENTIAL.
       DATA             DIVISION.
       FILE             SECTION.
       FD TEST-FILE.
       01 TEST-REC      PIC X(80).
       FD TEST-OUT.
       01 TEST-REC-OUT  PIC X(80).
       PROCEDURE        DIVISION.
       A00.
           OPEN INPUT  TEST-FILE.
           OPEN OUTPUT TEST-OUT.
       A01.
           READ TEST-FILE AT END
                GO TO Z99
           END-READ.
           WRITE TEST-REC-OUT FROM TEST-REC.
           GO TO A01.
       Z99.
           CLOSE TEST-FILE.
           CLOSE TEST-OUT.
           STOP RUN.
_ATEOF


$at_traceoff
echo "extensions.at:895: \${COMPILE} -o prog prog.cob"
echo extensions.at:895 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:895: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:903: cat TEST-FILE | ./prog"
echo extensions.at:903 >$at_check_line_file
( $at_traceon; cat TEST-FILE | ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "a
ab
abc
abcd
abcde
abcdef
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:903: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  101 ) # 101. extensions.at:907: Environment/Argument variable
    at_setup_line='extensions.at:907'
    at_desc='Environment/Argument variable'
    $at_quiet $ECHO_N "101: Environment/Argument variable                $ECHO_C"
    at_xfail=no
    (
      echo "101. extensions.at:907: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 X             PIC X(4).
       01 Y             PIC X(8).
       01 Z             PIC 9(4).
       PROCEDURE        DIVISION.
           DISPLAY "TEST_ENV" UPON ENVIRONMENT-NAME.
           ACCEPT X FROM ENVIRONMENT-VALUE.
           DISPLAY "(" X ")".
           DISPLAY "RXW" UPON ENVIRONMENT-VALUE.
           ACCEPT X FROM ENVIRONMENT-VALUE.
           DISPLAY "(" X ")".
           ACCEPT Y FROM ARGUMENT-VALUE.
           DISPLAY "(" Y ")".
           ACCEPT Z FROM ARGUMENT-NUMBER.
           DISPLAY "(" Z ")".
           STOP RUN.
_ATEOF


export TEST_ENV=OK
$at_traceoff
echo "extensions.at:932: \${COMPILE} -o prog prog.cob"
echo extensions.at:932 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:932: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "extensions.at:938: ./prog CHECKPAR"
echo extensions.at:938 >$at_check_line_file
( $at_traceon; ./prog CHECKPAR ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "(OK  )
(RXW )
(CHECKPAR)
(0001)
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "extensions.at:938: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  102 ) # 102. return-code.at:23: RETURN-CODE moving
    at_setup_line='return-code.at:23'
    at_desc='RETURN-CODE moving'
    $at_quiet $ECHO_N "102: RETURN-CODE moving                           $ECHO_C"
    at_xfail=no
    (
      echo "102. return-code.at:23: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01 I             PIC 99 COMP.
       PROCEDURE        DIVISION.
           INITIALIZE RETURN-CODE.
           MOVE ZERO TO RETURN-CODE.
           MOVE 1 TO RETURN-CODE.
           MOVE RETURN-CODE TO I.
           DISPLAY I NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "return-code.at:40: \${COMPILE} -o prog prog.cob"
echo return-code.at:40 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "return-code.at:40: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "return-code.at:41: ./prog"
echo return-code.at:41 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "01" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   1) ;;
   *) echo "return-code.at:41: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  103 ) # 103. return-code.at:46: RETURN-CODE passing
    at_setup_line='return-code.at:46'
    at_desc='RETURN-CODE passing'
    $at_quiet $ECHO_N "103: RETURN-CODE passing                          $ECHO_C"
    at_xfail=no
    (
      echo "103. return-code.at:46: testing ..."
      $at_traceon


cat >mod1.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      mod1.
       PROCEDURE        DIVISION.
           DISPLAY RETURN-CODE NO ADVANCING.
           MOVE 1 TO RETURN-CODE.
           DISPLAY RETURN-CODE NO ADVANCING.
           EXIT PROGRAM.
_ATEOF


cat >mod2.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      mod2.
       PROCEDURE        DIVISION.
           EXIT PROGRAM.
_ATEOF


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       PROCEDURE        DIVISION.
           CALL "mod1".
           DISPLAY RETURN-CODE NO ADVANCING.
           CALL "mod2".
           DISPLAY RETURN-CODE NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "return-code.at:76: \${COMPILE_MODULE} mod1.cob"
echo return-code.at:76 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} mod1.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "return-code.at:76: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "return-code.at:77: \${COMPILE_MODULE} mod2.cob"
echo return-code.at:77 >$at_check_line_file
( $at_traceon; ${COMPILE_MODULE} mod2.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "return-code.at:77: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "return-code.at:78: \${COMPILE} -o prog prog.cob"
echo return-code.at:78 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "return-code.at:78: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "return-code.at:79: ./prog"
echo return-code.at:79 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "+000000000+000000001+000000001+000000000" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "return-code.at:79: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  104 ) # 104. functions.at:22: FUNCTION ABS
    at_setup_line='functions.at:22'
    at_desc='FUNCTION ABS'
    $at_quiet $ECHO_N "104: FUNCTION ABS                                 $ECHO_C"
    at_xfail=no
    (
      echo "104. functions.at:22: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE -1.2345.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION ABS ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:35: \${COMPILE} -o prog prog.cob"
echo functions.at:35 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:35: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:38: ./prog"
echo functions.at:38 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "+0001.2345
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:38: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  105 ) # 105. functions.at:42: FUNCTION ACOS
    at_setup_line='functions.at:42'
    at_desc='FUNCTION ACOS'
    $at_quiet $ECHO_N "105: FUNCTION ACOS                                $ECHO_C"
    at_xfail=no
    (
      echo "105. functions.at:42: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE -0.2345.
       01  Z   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION ACOS ( X ) TO Z.
           IF Z >= 1.80750052110824325 AND
              Z <= 1.80750052110824345
                   DISPLAY "OK"
           ELSE
                   DISPLAY Z
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:62: \${COMPILE} -o prog prog.cob"
echo functions.at:62 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:62: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:65: ./prog"
echo functions.at:65 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:65: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  106 ) # 106. functions.at:69: FUNCTION ANNUITY
    at_setup_line='functions.at:69'
    at_desc='FUNCTION ANNUITY'
    $at_quiet $ECHO_N "106: FUNCTION ANNUITY                             $ECHO_C"
    at_xfail=no
    (
      echo "106. functions.at:69: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4) VALUE 3.
       01  Y   PIC   S9(4) VALUE 5.
       01  Z   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION ANNUITY ( X, Y ) TO Z.
           IF Z >= 3.002932551319648080 AND
              Z <= 3.002932551319648110
                   DISPLAY "OK"
           ELSE
                   DISPLAY Z
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:90: \${COMPILE} -o prog prog.cob"
echo functions.at:90 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:90: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:93: ./prog"
echo functions.at:93 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:93: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  107 ) # 107. functions.at:97: FUNCTION ASIN
    at_setup_line='functions.at:97'
    at_desc='FUNCTION ASIN'
    $at_quiet $ECHO_N "107: FUNCTION ASIN                                $ECHO_C"
    at_xfail=no
    (
      echo "107. functions.at:97: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE -0.2345.
       01  Y   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION ASIN ( X ) TO Y.
           IF Y >= -0.23670419431334685 AND
              Y <= -0.23670419431334675
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:117: \${COMPILE} -o prog prog.cob"
echo functions.at:117 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:117: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:120: ./prog"
echo functions.at:120 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:120: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  108 ) # 108. functions.at:124: FUNCTION ATAN
    at_setup_line='functions.at:124'
    at_desc='FUNCTION ATAN'
    $at_quiet $ECHO_N "108: FUNCTION ATAN                                $ECHO_C"
    at_xfail=no
    (
      echo "108. functions.at:124: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE 1.
       01  Y   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION ATAN ( X ) TO Y.
           IF Y >= 0.78539816339744825 AND
              Y <= 0.78539816339744835
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:144: \${COMPILE} -o prog prog.cob"
echo functions.at:144 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:144: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:147: ./prog"
echo functions.at:147 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:147: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  109 ) # 109. functions.at:151: FUNCTION CHAR
    at_setup_line='functions.at:151'
    at_desc='FUNCTION CHAR'
    $at_quiet $ECHO_N "109: FUNCTION CHAR                                $ECHO_C"
    at_xfail=no
    (
      echo "109. functions.at:151: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE 108.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION CHAR ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:164: \${COMPILE} -o prog prog.cob"
echo functions.at:164 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:164: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:167: ./prog"
echo functions.at:167 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "k
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:167: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  110 ) # 110. functions.at:171: FUNCTION COS
    at_setup_line='functions.at:171'
    at_desc='FUNCTION COS'
    $at_quiet $ECHO_N "110: FUNCTION COS                                 $ECHO_C"
    at_xfail=no
    (
      echo "110. functions.at:171: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE -0.2345.
       01  Y   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION COS ( X ) TO Y.
           IF Y >= 0.97263064125625815 AND
              Y <= 0.97263064125625825
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:191: \${COMPILE} -o prog prog.cob"
echo functions.at:191 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:191: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:194: ./prog"
echo functions.at:194 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:194: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  111 ) # 111. functions.at:198: FUNCTION DATE-OF-INTEGER
    at_setup_line='functions.at:198'
    at_desc='FUNCTION DATE-OF-INTEGER'
    $at_quiet $ECHO_N "111: FUNCTION DATE-OF-INTEGER                     $ECHO_C"
    at_xfail=no
    (
      echo "111. functions.at:198: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION DATE-OF-INTEGER ( 146000 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:210: \${COMPILE} -o prog prog.cob"
echo functions.at:210 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:210: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:213: ./prog"
echo functions.at:213 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "20000925
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:213: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  112 ) # 112. functions.at:217: FUNCTION DATE-TO-YYYYMMDD
    at_setup_line='functions.at:217'
    at_desc='FUNCTION DATE-TO-YYYYMMDD'
    $at_quiet $ECHO_N "112: FUNCTION DATE-TO-YYYYMMDD                    $ECHO_C"
    at_xfail=no
    (
      echo "112. functions.at:217: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION DATE-TO-YYYYMMDD ( 981002, -10, 1994 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:229: \${COMPILE} -o prog prog.cob"
echo functions.at:229 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:229: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:232: ./prog"
echo functions.at:232 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "18981002
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:232: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  113 ) # 113. functions.at:236: FUNCTION DAY-OF-INTEGER
    at_setup_line='functions.at:236'
    at_desc='FUNCTION DAY-OF-INTEGER'
    $at_quiet $ECHO_N "113: FUNCTION DAY-OF-INTEGER                      $ECHO_C"
    at_xfail=no
    (
      echo "113. functions.at:236: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION DAY-OF-INTEGER ( 146000 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:248: \${COMPILE} -o prog prog.cob"
echo functions.at:248 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:248: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:251: ./prog"
echo functions.at:251 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "2000269
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:251: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  114 ) # 114. functions.at:255: FUNCTION DAY-TO-YYYYDDD
    at_setup_line='functions.at:255'
    at_desc='FUNCTION DAY-TO-YYYYDDD'
    $at_quiet $ECHO_N "114: FUNCTION DAY-TO-YYYYDDD                      $ECHO_C"
    at_xfail=no
    (
      echo "114. functions.at:255: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION DAY-TO-YYYYDDD ( 95005, -10, 2013 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:267: \${COMPILE} -o prog prog.cob"
echo functions.at:267 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:267: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:270: ./prog"
echo functions.at:270 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "01995005
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:270: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  115 ) # 115. functions.at:274: FUNCTION EXCEPTION-FILE
    at_setup_line='functions.at:274'
    at_desc='FUNCTION EXCEPTION-FILE'
    $at_quiet $ECHO_N "115: FUNCTION EXCEPTION-FILE                      $ECHO_C"
    at_xfail=no
    (
      echo "115. functions.at:274: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
           SELECT TEST-FILE ASSIGN "NOTEXIST"
           FILE STATUS IS TEST-STATUS.
       DATA             DIVISION.
       FILE             SECTION.
       FD  TEST-FILE.
       01  TEST-REC      PIC X(4).
       WORKING-STORAGE SECTION.
       01  TEST-STATUS  PIC XX.
       PROCEDURE        DIVISION.
           OPEN INPUT TEST-FILE.
           DISPLAY FUNCTION EXCEPTION-FILE.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:296: \${COMPILE} -o prog prog.cob"
echo functions.at:296 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:296: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:299: ./prog"
echo functions.at:299 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "35TEST-FILE
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:299: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  116 ) # 116. functions.at:303: FUNCTION EXCEPTION-LOCATION
    at_setup_line='functions.at:303'
    at_desc='FUNCTION EXCEPTION-LOCATION'
    $at_quiet $ECHO_N "116: FUNCTION EXCEPTION-LOCATION                  $ECHO_C"
    at_xfail=no
    (
      echo "116. functions.at:303: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
           SELECT TEST-FILE ASSIGN "NOTEXIST"
           FILE STATUS IS TEST-STATUS.
       DATA             DIVISION.
       FILE             SECTION.
       FD  TEST-FILE.
       01  TEST-REC      PIC X(4).
       WORKING-STORAGE SECTION.
       01  TEST-STATUS  PIC XX.
       PROCEDURE        DIVISION.
       A00-MAIN SECTION.
       A00.
           OPEN INPUT TEST-FILE.
       B00-MAIN SECTION.
       B00.
           DISPLAY FUNCTION EXCEPTION-LOCATION
                   NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:330: \${COMPILE} -debug -o prog prog.cob"
echo functions.at:330 >$at_check_line_file
( $at_traceon; ${COMPILE} -debug -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:330: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:332: ./prog"
echo functions.at:332 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "prog; A00 OF A00-MAIN; 18" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:332: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  117 ) # 117. functions.at:336: FUNCTION EXCEPTION-STATEMENT
    at_setup_line='functions.at:336'
    at_desc='FUNCTION EXCEPTION-STATEMENT'
    $at_quiet $ECHO_N "117: FUNCTION EXCEPTION-STATEMENT                 $ECHO_C"
    at_xfail=no
    (
      echo "117. functions.at:336: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
           SELECT TEST-FILE ASSIGN "NOTEXIST"
           FILE STATUS IS TEST-STATUS.
       DATA             DIVISION.
       FILE             SECTION.
       FD  TEST-FILE.
       01  TEST-REC      PIC X(4).
       WORKING-STORAGE SECTION.
       01  TEST-STATUS  PIC XX.
       PROCEDURE        DIVISION.
           OPEN INPUT TEST-FILE.
           DISPLAY FUNCTION EXCEPTION-STATEMENT
                   NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:359: \${COMPILE} -debug -o prog prog.cob"
echo functions.at:359 >$at_check_line_file
( $at_traceon; ${COMPILE} -debug -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:359: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:361: ./prog"
echo functions.at:361 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OPEN                           " | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:361: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  118 ) # 118. functions.at:365: FUNCTION EXCEPTION-STATUS
    at_setup_line='functions.at:365'
    at_desc='FUNCTION EXCEPTION-STATUS'
    $at_quiet $ECHO_N "118: FUNCTION EXCEPTION-STATUS                    $ECHO_C"
    at_xfail=no
    (
      echo "118. functions.at:365: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       ENVIRONMENT      DIVISION.
       INPUT-OUTPUT     SECTION.
       FILE-CONTROL.
           SELECT TEST-FILE ASSIGN "NOTEXIST"
           FILE STATUS IS TEST-STATUS.
       DATA             DIVISION.
       FILE             SECTION.
       FD  TEST-FILE.
       01  TEST-REC      PIC X(4).
       WORKING-STORAGE SECTION.
       01  TEST-STATUS  PIC XX.
       PROCEDURE        DIVISION.
           OPEN INPUT TEST-FILE.
           DISPLAY FUNCTION EXCEPTION-STATUS
                   NO ADVANCING.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:388: \${COMPILE} -o prog prog.cob"
echo functions.at:388 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:388: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:390: ./prog"
echo functions.at:390 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "EC-I-O-PERMANENT-ERROR         " | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:390: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  119 ) # 119. functions.at:394: FUNCTION EXP
    at_setup_line='functions.at:394'
    at_desc='FUNCTION EXP'
    $at_quiet $ECHO_N "119: FUNCTION EXP                                 $ECHO_C"
    at_xfail=no
    (
      echo "119. functions.at:394: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  Y   PIC   S99V9(16)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION EXP ( 3 ) TO Y.
           IF Y >= 20.0855369231876636 AND
              Y <= 20.0855369231876644
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:413: \${COMPILE} -o prog prog.cob"
echo functions.at:413 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:413: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:416: ./prog"
echo functions.at:416 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:416: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  120 ) # 120. functions.at:420: FUNCTION FACTORIAL
    at_setup_line='functions.at:420'
    at_desc='FUNCTION FACTORIAL'
    $at_quiet $ECHO_N "120: FUNCTION FACTORIAL                           $ECHO_C"
    at_xfail=no
    (
      echo "120. functions.at:420: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION FACTORIAL ( 6 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:432: \${COMPILE} -o prog prog.cob"
echo functions.at:432 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:432: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:435: ./prog"
echo functions.at:435 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "000000000000000720
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:435: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  121 ) # 121. functions.at:439: FUNCTION FRACTION-PART
    at_setup_line='functions.at:439'
    at_desc='FUNCTION FRACTION-PART'
    $at_quiet $ECHO_N "121: FUNCTION FRACTION-PART                       $ECHO_C"
    at_xfail=no
    (
      echo "121. functions.at:439: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION FRACTION-PART ( 3.12345 ).
           DISPLAY FUNCTION FRACTION-PART ( -3.12345 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:452: \${COMPILE} -o prog prog.cob"
echo functions.at:452 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:452: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:456: ./prog"
echo functions.at:456 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "+.123450000000000000
-.123450000000000000
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:456: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  122 ) # 122. functions.at:460: FUNCTION INTEGER
    at_setup_line='functions.at:460'
    at_desc='FUNCTION INTEGER'
    $at_quiet $ECHO_N "122: FUNCTION INTEGER                             $ECHO_C"
    at_xfail=no
    (
      echo "122. functions.at:460: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE -1.5.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION INTEGER ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:473: \${COMPILE} -o prog prog.cob"
echo functions.at:473 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:473: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:476: ./prog"
echo functions.at:476 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-000000000000000002
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:476: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  123 ) # 123. functions.at:480: FUNCTION INTEGER-OF-DATE
    at_setup_line='functions.at:480'
    at_desc='FUNCTION INTEGER-OF-DATE'
    $at_quiet $ECHO_N "123: FUNCTION INTEGER-OF-DATE                     $ECHO_C"
    at_xfail=no
    (
      echo "123. functions.at:480: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION INTEGER-OF-DATE ( 20000925 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:492: \${COMPILE} -o prog prog.cob"
echo functions.at:492 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:492: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:495: ./prog"
echo functions.at:495 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00146000
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:495: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  124 ) # 124. functions.at:499: FUNCTION INTEGER-OF-DAY
    at_setup_line='functions.at:499'
    at_desc='FUNCTION INTEGER-OF-DAY'
    $at_quiet $ECHO_N "124: FUNCTION INTEGER-OF-DAY                      $ECHO_C"
    at_xfail=no
    (
      echo "124. functions.at:499: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION INTEGER-OF-DAY ( 2000269 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:511: \${COMPILE} -o prog prog.cob"
echo functions.at:511 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:511: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:514: ./prog"
echo functions.at:514 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00146000
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:514: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  125 ) # 125. functions.at:518: FUNCTION INTEGER-PART
    at_setup_line='functions.at:518'
    at_desc='FUNCTION INTEGER-PART'
    $at_quiet $ECHO_N "125: FUNCTION INTEGER-PART                        $ECHO_C"
    at_xfail=no
    (
      echo "125. functions.at:518: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE -1.5.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION INTEGER-PART ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:531: \${COMPILE} -o prog prog.cob"
echo functions.at:531 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:531: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:534: ./prog"
echo functions.at:534 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-000000000000000001
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:534: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  126 ) # 126. functions.at:538: FUNCTION LENGTH
    at_setup_line='functions.at:538'
    at_desc='FUNCTION LENGTH'
    $at_quiet $ECHO_N "126: FUNCTION LENGTH                              $ECHO_C"
    at_xfail=no
    (
      echo "126. functions.at:538: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE -1.5.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION LENGTH ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:551: \${COMPILE} -o prog prog.cob"
echo functions.at:551 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:551: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:554: ./prog"
echo functions.at:554 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "8
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:554: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  127 ) # 127. functions.at:558: FUNCTION LOCALE-DATE
    at_setup_line='functions.at:558'
    at_desc='FUNCTION LOCALE-DATE'
    $at_quiet $ECHO_N "127: FUNCTION LOCALE-DATE                         $ECHO_C"
    at_xfail=no
    (
      echo "127. functions.at:558: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   X(32)   VALUE SPACES.
       PROCEDURE        DIVISION.
           MOVE FUNCTION LOCALE-DATE ( "19630302" ) TO X.
           IF X NOT = SPACES
                DISPLAY "OK"
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:574: \${COMPILE} -o prog prog.cob"
echo functions.at:574 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:574: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:577: ./prog"
echo functions.at:577 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:577: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  128 ) # 128. functions.at:581: FUNCTION LOCALE-TIME
    at_setup_line='functions.at:581'
    at_desc='FUNCTION LOCALE-TIME'
    $at_quiet $ECHO_N "128: FUNCTION LOCALE-TIME                         $ECHO_C"
    at_xfail=no
    (
      echo "128. functions.at:581: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   X(32)   VALUE SPACES.
       PROCEDURE        DIVISION.
           MOVE FUNCTION LOCALE-TIME ( "233012" ) TO X.
           IF X NOT = SPACES
                DISPLAY "OK"
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:597: \${COMPILE} -o prog prog.cob"
echo functions.at:597 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:597: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:600: ./prog"
echo functions.at:600 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:600: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  129 ) # 129. functions.at:604: FUNCTION LOG
    at_setup_line='functions.at:604'
    at_desc='FUNCTION LOG'
    $at_quiet $ECHO_N "129: FUNCTION LOG                                 $ECHO_C"
    at_xfail=no
    (
      echo "129. functions.at:604: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE 1.5.
       01  Y   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION LOG ( X ) TO Y.
           IF Y >= 0.40546510810816435 AND
              Y <= 0.40546510810816445
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:624: \${COMPILE} -o prog prog.cob"
echo functions.at:624 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:624: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:627: ./prog"
echo functions.at:627 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:627: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  130 ) # 130. functions.at:631: FUNCTION LOG10
    at_setup_line='functions.at:631'
    at_desc='FUNCTION LOG10'
    $at_quiet $ECHO_N "130: FUNCTION LOG10                               $ECHO_C"
    at_xfail=no
    (
      echo "130. functions.at:631: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE 1.5.
       01  Y   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION LOG10 ( X ) TO Y.
           IF Y >= 0.17609125905568120 AND
              Y <= 0.17609125905568128
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:651: \${COMPILE} -o prog prog.cob"
echo functions.at:651 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:651: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:654: ./prog"
echo functions.at:654 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:654: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  131 ) # 131. functions.at:658: FUNCTION LOWER-CASE
    at_setup_line='functions.at:658'
    at_desc='FUNCTION LOWER-CASE'
    $at_quiet $ECHO_N "131: FUNCTION LOWER-CASE                          $ECHO_C"
    at_xfail=no
    (
      echo "131. functions.at:658: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   X(10) VALUE "A#B.C%D+E$".
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION LOWER-CASE ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:671: \${COMPILE} -o prog prog.cob"
echo functions.at:671 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:671: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:674: ./prog"
echo functions.at:674 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "a#b.c%d+e\$
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:674: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  132 ) # 132. functions.at:678: FUNCTION MAX
    at_setup_line='functions.at:678'
    at_desc='FUNCTION MAX'
    $at_quiet $ECHO_N "132: FUNCTION MAX                                 $ECHO_C"
    at_xfail=no
    (
      echo "132. functions.at:678: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION MAX ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:690: \${COMPILE} -o prog prog.cob"
echo functions.at:690 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:690: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:693: ./prog"
echo functions.at:693 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "8
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:693: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  133 ) # 133. functions.at:697: FUNCTION MEAN
    at_setup_line='functions.at:697'
    at_desc='FUNCTION MEAN'
    $at_quiet $ECHO_N "133: FUNCTION MEAN                                $ECHO_C"
    at_xfail=no
    (
      echo "133. functions.at:697: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION MEAN ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:709: \${COMPILE} -o prog prog.cob"
echo functions.at:709 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:709: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:712: ./prog"
echo functions.at:712 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-1.20000000000000000
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:712: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  134 ) # 134. functions.at:716: FUNCTION MEDIAN
    at_setup_line='functions.at:716'
    at_desc='FUNCTION MEDIAN'
    $at_quiet $ECHO_N "134: FUNCTION MEDIAN                              $ECHO_C"
    at_xfail=no
    (
      echo "134. functions.at:716: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION MEDIAN ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:728: \${COMPILE} -o prog prog.cob"
echo functions.at:728 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:728: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:731: ./prog"
echo functions.at:731 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "0
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:731: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  135 ) # 135. functions.at:735: FUNCTION MIDRANGE
    at_setup_line='functions.at:735'
    at_desc='FUNCTION MIDRANGE'
    $at_quiet $ECHO_N "135: FUNCTION MIDRANGE                            $ECHO_C"
    at_xfail=no
    (
      echo "135. functions.at:735: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION MIDRANGE ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:747: \${COMPILE} -o prog prog.cob"
echo functions.at:747 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:747: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:750: ./prog"
echo functions.at:750 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-3.000000000000000000
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:750: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  136 ) # 136. functions.at:754: FUNCTION MIN
    at_setup_line='functions.at:754'
    at_desc='FUNCTION MIN'
    $at_quiet $ECHO_N "136: FUNCTION MIN                                 $ECHO_C"
    at_xfail=no
    (
      echo "136. functions.at:754: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION MIN ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:766: \${COMPILE} -o prog prog.cob"
echo functions.at:766 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:766: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:769: ./prog"
echo functions.at:769 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-14
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:769: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  137 ) # 137. functions.at:773: FUNCTION MOD
    at_setup_line='functions.at:773'
    at_desc='FUNCTION MOD'
    $at_quiet $ECHO_N "137: FUNCTION MOD                                 $ECHO_C"
    at_xfail=no
    (
      echo "137. functions.at:773: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION MOD ( -11 5 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:785: \${COMPILE} -o prog prog.cob"
echo functions.at:785 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:785: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:788: ./prog"
echo functions.at:788 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "+000000000000000004
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:788: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  138 ) # 138. functions.at:792: FUNCTION NUMVAL
    at_setup_line='functions.at:792'
    at_desc='FUNCTION NUMVAL'
    $at_quiet $ECHO_N "138: FUNCTION NUMVAL                              $ECHO_C"
    at_xfail=no
    (
      echo "138. functions.at:792: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   X(12) VALUE " -9876.1234 ".
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION NUMVAL ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:805: \${COMPILE} -o prog prog.cob"
echo functions.at:805 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:805: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:808: ./prog"
echo functions.at:808 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-00000000009876.1234
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:808: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  139 ) # 139. functions.at:812: FUNCTION NUMVAL-C
    at_setup_line='functions.at:812'
    at_desc='FUNCTION NUMVAL-C'
    $at_quiet $ECHO_N "139: FUNCTION NUMVAL-C                            $ECHO_C"
    at_xfail=no
    (
      echo "139. functions.at:812: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   X(14) VALUE " % -9876.1234 ".
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION NUMVAL-C ( X , "%" ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:825: \${COMPILE} -o prog prog.cob"
echo functions.at:825 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:825: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:828: ./prog"
echo functions.at:828 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-00000000009876.1234
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:828: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  140 ) # 140. functions.at:832: FUNCTION ORD
    at_setup_line='functions.at:832'
    at_desc='FUNCTION ORD'
    $at_quiet $ECHO_N "140: FUNCTION ORD                                 $ECHO_C"
    at_xfail=no
    (
      echo "140. functions.at:832: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION ORD ( "k" ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:844: \${COMPILE} -o prog prog.cob"
echo functions.at:844 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:844: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:847: ./prog"
echo functions.at:847 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00000108
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:847: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  141 ) # 141. functions.at:851: FUNCTION ORD-MAX
    at_setup_line='functions.at:851'
    at_desc='FUNCTION ORD-MAX'
    $at_quiet $ECHO_N "141: FUNCTION ORD-MAX                             $ECHO_C"
    at_xfail=no
    (
      echo "141. functions.at:851: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION ORD-MAX ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:863: \${COMPILE} -o prog prog.cob"
echo functions.at:863 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:863: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:866: ./prog"
echo functions.at:866 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00000004
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:866: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  142 ) # 142. functions.at:870: FUNCTION ORD-MIN
    at_setup_line='functions.at:870'
    at_desc='FUNCTION ORD-MIN'
    $at_quiet $ECHO_N "142: FUNCTION ORD-MIN                             $ECHO_C"
    at_xfail=no
    (
      echo "142. functions.at:870: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION ORD-MIN ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:882: \${COMPILE} -o prog prog.cob"
echo functions.at:882 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:882: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:885: ./prog"
echo functions.at:885 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00000002
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:885: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  143 ) # 143. functions.at:889: FUNCTION PRESENT-VALUE
    at_setup_line='functions.at:889'
    at_desc='FUNCTION PRESENT-VALUE'
    $at_quiet $ECHO_N "143: FUNCTION PRESENT-VALUE                       $ECHO_C"
    at_xfail=no
    (
      echo "143. functions.at:889: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION PRESENT-VALUE ( 3 2 1 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:901: \${COMPILE} -o prog prog.cob"
echo functions.at:901 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:901: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:904: ./prog"
echo functions.at:904 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "0.562500000000000000
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:904: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  144 ) # 144. functions.at:908: FUNCTION RANGE
    at_setup_line='functions.at:908'
    at_desc='FUNCTION RANGE'
    $at_quiet $ECHO_N "144: FUNCTION RANGE                               $ECHO_C"
    at_xfail=no
    (
      echo "144. functions.at:908: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION RANGE ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:920: \${COMPILE} -o prog prog.cob"
echo functions.at:920 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:920: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:923: ./prog"
echo functions.at:923 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "+000000000000000022
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:923: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  145 ) # 145. functions.at:927: FUNCTION REM
    at_setup_line='functions.at:927'
    at_desc='FUNCTION REM'
    $at_quiet $ECHO_N "145: FUNCTION REM                                 $ECHO_C"
    at_xfail=no
    (
      echo "145. functions.at:927: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION REM ( -11 5 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:939: \${COMPILE} -o prog prog.cob"
echo functions.at:939 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:939: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:942: ./prog"
echo functions.at:942 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "-000000000000000001
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:942: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  146 ) # 146. functions.at:946: FUNCTION REVERSE
    at_setup_line='functions.at:946'
    at_desc='FUNCTION REVERSE'
    $at_quiet $ECHO_N "146: FUNCTION REVERSE                             $ECHO_C"
    at_xfail=no
    (
      echo "146. functions.at:946: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   X(10) VALUE "A#B.C%D+E$".
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION REVERSE ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:959: \${COMPILE} -o prog prog.cob"
echo functions.at:959 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:959: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:962: ./prog"
echo functions.at:962 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "\$E+D%C.B#A
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:962: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  147 ) # 147. functions.at:966: FUNCTION SECONDS-FROM-FORMATTED-TIME
    at_setup_line='functions.at:966'
    at_desc='FUNCTION SECONDS-FROM-FORMATTED-TIME'
    $at_quiet $ECHO_N "147: FUNCTION SECONDS-FROM-FORMATTED-TIME         $ECHO_C"
    at_xfail=no
    (
      echo "147. functions.at:966: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC      X(6)   VALUE "hhmmss".
       01  Y   PIC      9(8)   COMP-5.
       01  Z   PIC      X(6)   VALUE "010203".
       PROCEDURE        DIVISION.
           MOVE FUNCTION SECONDS-FROM-FORMATTED-TIME (X, Z) TO Y.
           IF Y = 3723
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:986: \${COMPILE} -o prog prog.cob"
echo functions.at:986 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:986: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:989: ./prog"
echo functions.at:989 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:989: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  148 ) # 148. functions.at:993: FUNCTION SECONDS-PAST-MIDNIGHT
    at_setup_line='functions.at:993'
    at_desc='FUNCTION SECONDS-PAST-MIDNIGHT'
    $at_quiet $ECHO_N "148: FUNCTION SECONDS-PAST-MIDNIGHT               $ECHO_C"
    at_xfail=no
    (
      echo "148. functions.at:993: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  Y   PIC      9(8)   COMP-5.
       PROCEDURE        DIVISION.
           MOVE FUNCTION SECONDS-PAST-MIDNIGHT TO Y.
           IF Y < 86402
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1011: \${COMPILE} -o prog prog.cob"
echo functions.at:1011 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1011: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1014: ./prog"
echo functions.at:1014 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1014: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  149 ) # 149. functions.at:1018: FUNCTION SIGN
    at_setup_line='functions.at:1018'
    at_desc='FUNCTION SIGN'
    $at_quiet $ECHO_N "149: FUNCTION SIGN                                $ECHO_C"
    at_xfail=no
    (
      echo "149. functions.at:1018: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION SIGN ( 3.12345 ).
           DISPLAY FUNCTION SIGN ( -0.0 ).
           DISPLAY FUNCTION SIGN ( 0.0 ).
           DISPLAY FUNCTION SIGN ( -3.12345 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1033: \${COMPILE} -o prog prog.cob"
echo functions.at:1033 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1033: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1039: ./prog"
echo functions.at:1039 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "+00000001
+00000000
+00000000
-00000001
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1039: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  150 ) # 150. functions.at:1043: FUNCTION SIN
    at_setup_line='functions.at:1043'
    at_desc='FUNCTION SIN'
    $at_quiet $ECHO_N "150: FUNCTION SIN                                 $ECHO_C"
    at_xfail=no
    (
      echo "150. functions.at:1043: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE 1.5.
       01  Y   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION SIN ( X ) TO Y.
           IF Y >= 0.99749498660405440 AND
              Y <= 0.99749498660405450
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1063: \${COMPILE} -o prog prog.cob"
echo functions.at:1063 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1063: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1066: ./prog"
echo functions.at:1066 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1066: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  151 ) # 151. functions.at:1070: FUNCTION SQRT
    at_setup_line='functions.at:1070'
    at_desc='FUNCTION SQRT'
    $at_quiet $ECHO_N "151: FUNCTION SQRT                                $ECHO_C"
    at_xfail=no
    (
      echo "151. functions.at:1070: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE 1.5.
       01  Y   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION SQRT ( X ) TO Y.
           IF Y >= 1.22474487139158890 AND
              Y <= 1.22474487139158899
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1090: \${COMPILE} -o prog prog.cob"
echo functions.at:1090 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1090: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1093: ./prog"
echo functions.at:1093 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1093: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  152 ) # 152. functions.at:1097: FUNCTION STANDARD-DEVIATION
    at_setup_line='functions.at:1097'
    at_desc='FUNCTION STANDARD-DEVIATION'
    $at_quiet $ECHO_N "152: FUNCTION STANDARD-DEVIATION                  $ECHO_C"
    at_xfail=no
    (
      echo "152. functions.at:1097: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  Y   PIC   S9V9(17)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION STANDARD-DEVIATION ( 3 -14 0 8 -3 ) TO Y.
           IF Y >= 7.35934779718963925 AND
              Y <= 7.35934779718964025
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1116: \${COMPILE} -o prog prog.cob"
echo functions.at:1116 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1116: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1119: ./prog"
echo functions.at:1119 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1119: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  153 ) # 153. functions.at:1123: FUNCTION STORED-CHAR-LENGTH
    at_setup_line='functions.at:1123'
    at_desc='FUNCTION STORED-CHAR-LENGTH'
    $at_quiet $ECHO_N "153: FUNCTION STORED-CHAR-LENGTH                  $ECHO_C"
    at_xfail=no
    (
      echo "153. functions.at:1123: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  Y   PIC   X(24).
       PROCEDURE        DIVISION.
           MOVE "123456789012" TO Y.
           DISPLAY FUNCTION STORED-CHAR-LENGTH ( Y ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1137: \${COMPILE} -o prog prog.cob"
echo functions.at:1137 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1137: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1140: ./prog"
echo functions.at:1140 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "00000012
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1140: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  154 ) # 154. functions.at:1144: FUNCTION TAN
    at_setup_line='functions.at:1144'
    at_desc='FUNCTION TAN'
    $at_quiet $ECHO_N "154: FUNCTION TAN                                 $ECHO_C"
    at_xfail=no
    (
      echo "154. functions.at:1144: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   S9(4)V9(4) VALUE 1.5.
       01  Y   PIC   S99V9(16)   COMP.
       PROCEDURE        DIVISION.
           MOVE FUNCTION TAN ( X ) TO Y.
           IF Y >= 14.1014199471717185 AND
              Y <= 14.1014199471717205
                   DISPLAY "OK"
           ELSE
                   DISPLAY Y
           END-IF.
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1164: \${COMPILE} -o prog prog.cob"
echo functions.at:1164 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1164: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1167: ./prog"
echo functions.at:1167 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "OK
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1167: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  155 ) # 155. functions.at:1171: FUNCTION TRIM
    at_setup_line='functions.at:1171'
    at_desc='FUNCTION TRIM'
    $at_quiet $ECHO_N "155: FUNCTION TRIM                                $ECHO_C"
    at_xfail=no
    (
      echo "155. functions.at:1171: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   X(12) VALUE " a#b.c%d+e$ ".
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION TRIM ( X ).
           DISPLAY FUNCTION TRIM ( X TRAILING ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1185: \${COMPILE} -o prog prog.cob"
echo functions.at:1185 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1185: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1189: ./prog"
echo functions.at:1189 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "a#b.c%d+e\$
 a#b.c%d+e\$
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1189: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  156 ) # 156. functions.at:1193: FUNCTION UPPER-CASE
    at_setup_line='functions.at:1193'
    at_desc='FUNCTION UPPER-CASE'
    $at_quiet $ECHO_N "156: FUNCTION UPPER-CASE                          $ECHO_C"
    at_xfail=no
    (
      echo "156. functions.at:1193: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       01  X   PIC   X(10) VALUE "a#b.c%d+e$".
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION UPPER-CASE ( X ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1206: \${COMPILE} -o prog prog.cob"
echo functions.at:1206 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1206: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1209: ./prog"
echo functions.at:1209 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "A#B.C%D+E\$
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1209: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;

  157 ) # 157. functions.at:1213: FUNCTION VARIANCE
    at_setup_line='functions.at:1213'
    at_desc='FUNCTION VARIANCE'
    $at_quiet $ECHO_N "157: FUNCTION VARIANCE                            $ECHO_C"
    at_xfail=no
    (
      echo "157. functions.at:1213: testing ..."
      $at_traceon


cat >prog.cob <<'_ATEOF'

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      prog.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       PROCEDURE        DIVISION.
           DISPLAY FUNCTION VARIANCE ( 3 -14 0 8 -3 ).
           STOP RUN.
_ATEOF


$at_traceoff
echo "functions.at:1225: \${COMPILE} -o prog prog.cob"
echo functions.at:1225 >$at_check_line_file
( $at_traceon; ${COMPILE} -o prog prog.cob ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
$at_diff $at_devnull $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1225: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon

$at_traceoff
echo "functions.at:1228: ./prog"
echo functions.at:1228 >$at_check_line_file
( $at_traceon; ./prog ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr || at_failed=:
echo >>$at_stdout; echo "+54.1600000000000000
" | $at_diff - $at_stdout || at_failed=:
case $at_status in
   77) echo 77 > $at_status_file
            exit 77;;
   0) ;;
   *) echo "functions.at:1228: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  echo 1 > $at_status_file
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >$at_times_file
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat $at_status_file`
    ;;


  * )
    echo "$as_me: no such test group: $at_group" >&2
    continue
    ;;
  esac

  # Be sure to come back to the suite directory, in particular
  # since below we might `rm' the group directory we are in currently.
  cd $at_suite_dir

  case $at_group in
    banner-*) ;;
    *)
      if test ! -f $at_check_line_file; then
	sed "s/^ */$as_me: warning: /" <<_ATEOF
	A failure happened in a test group before any test could be
	run. This means that test suite is improperly designed.  Please
	report this failure to <open-cobol-list@lists.sourceforge.net>.
_ATEOF
    	echo "$at_setup_line" >$at_check_line_file
      fi
      at_group_count=`expr 1 + $at_group_count`
      $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
      echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> $at_group_log
      case $at_xfail:$at_status in
	yes:0)
	    at_msg="UNEXPECTED PASS"
	    at_xpass_list="$at_xpass_list $at_group"
	    at_errexit=$at_errexit_p
	    ;;
	no:0)
	    at_msg="ok"
	    at_pass_list="$at_pass_list $at_group"
	    at_errexit=false
	    ;;
	*:77)
	    at_msg="skipped (`cat $at_check_line_file`)"
	    at_skip_list="$at_skip_list $at_group"
	    at_errexit=false
	    ;;
	yes:*)
	    at_msg="expected failure (`cat $at_check_line_file`)"
	    at_xfail_list="$at_xfail_list $at_group"
	    at_errexit=false
	    ;;
	no:*)
	    at_msg="FAILED (`cat $at_check_line_file`)"
	    at_fail_list="$at_fail_list $at_group"
	    at_errexit=$at_errexit_p
	    ;;
      esac
      echo $at_msg
      at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
      case $at_status in
	0|77)
	  # $at_times_file is only available if the group succeeded.
	  # We're not including the group log, so the success message
	  # is written in the global log separately.  But we also
	  # write to the group log in case they're using -d.
	  if test -f $at_times_file; then
	    at_log_msg="$at_log_msg	(`sed 1d $at_times_file`)"
	    rm -f $at_times_file
          fi
	  echo "$at_log_msg" >> $at_group_log
	  echo "$at_log_msg" >&5

	  # Cleanup the group directory, unless the user wants the files.
	  $at_debug_p || rm -rf $at_group_dir
	  ;;
	*)
	  # Upon failure, include the log into the testsuite's global
	  # log.  The failure message is written in the group log.  It
	  # is later included in the global log.
	  echo "$at_log_msg" >> $at_group_log

	  # Upon failure, keep the group directory for autopsy, and
	  # create the debugging script.
	  {
	    echo "#! /bin/sh"
	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
	    echo "cd $at_dir"
	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
	    echo 'exit 1'
	  } >$at_group_dir/run
	  chmod +x $at_group_dir/run
	  $at_errexit && break
	  ;;
      esac
      ;;
  esac
done

# Back to the top directory.
cd $at_dir

# Compute the duration of the suite.
at_stop_date=`date`
at_stop_time=`(date +%s) 2>/dev/null`
echo "$as_me: ending at: $at_stop_date" >&5
at_duration_s=`(expr $at_stop_time - $at_start_time) 2>/dev/null`
at_duration_m=`(expr $at_duration_s / 60) 2>/dev/null`
at_duration_h=`(expr $at_duration_m / 60) 2>/dev/null`
at_duration_s=`(expr $at_duration_s % 60) 2>/dev/null`
at_duration_m=`(expr $at_duration_m % 60) 2>/dev/null`
at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
if test "$at_duration" != "h m s"; then
  echo "$as_me: test suite duration: $at_duration" >&5
fi

# Wrap up the test suite with summary statistics.
at_skip_count=`set dummy $at_skip_list; shift; echo $#`
at_fail_count=`set dummy $at_fail_list; shift; echo $#`
at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`

at_run_count=`expr $at_group_count - $at_skip_count`
at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
at_total_fail_count=`expr $at_xfail_count + $at_fail_count`

echo
cat <<\_ASBOX
## ------------- ##
## Test results. ##
## ------------- ##
_ASBOX
echo
{
  echo
  cat <<\_ASBOX
## ------------- ##
## Test results. ##
## ------------- ##
_ASBOX
  echo
} >&5

if test $at_run_count = 1; then
  at_result="1 test"
  at_were=was
else
  at_result="$at_run_count tests"
  at_were=were
fi
if $at_errexit_p && test $at_unexpected_count != 0; then
  if test $at_xpass_count = 1; then
    at_result="$at_result $at_were run, one passed"
  else
    at_result="$at_result $at_were run, one failed"
  fi
  at_result="$at_result unexpectedly and inhibited subsequent tests."
else
  # Don't you just love exponential explosion of the number of cases?
  case $at_xpass_count:$at_fail_count:$at_xfail_count in
    # So far, so good.
    0:0:0) at_result="$at_result $at_were successful." ;;
    0:0:*) at_result="$at_result behaved as expected." ;;

    # Some unexpected failures
    0:*:0) at_result="$at_result $at_were run,
$at_fail_count failed unexpectedly." ;;

    # Some failures, both expected and unexpected
    0:*:1) at_result="$at_result $at_were run,
$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
    0:*:*) at_result="$at_result $at_were run,
$at_total_fail_count failed ($at_xfail_count expected failures)." ;;

    # No unexpected failures, but some xpasses
    *:0:*) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly." ;;

    # No expected failures, but failures and xpasses
    *:1:0) at_result="$at_result $at_were run,
$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
    *:*:0) at_result="$at_result $at_were run,
$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;

    # All of them.
    *:*:1) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly,
$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
    *:*:*) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly,
$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
  esac

  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
    at_result="All $at_result"
  fi
fi

# Now put skips in the mix.
case $at_skip_count in
  0) ;;
  1) at_result="$at_result
1 test was skipped." ;;
  *) at_result="$at_result
$at_skip_count tests were skipped." ;;
esac

if test $at_unexpected_count = 0; then
  echo "$at_result"
  echo "$at_result" >&5
else
  echo "ERROR: $at_result" >&2
  echo "ERROR: $at_result" >&5
  {
    echo
    cat <<\_ASBOX
## ------------------------ ##
## Summary of the failures. ##
## ------------------------ ##
_ASBOX

    # Summary of failed and skipped tests.
    if test $at_fail_count != 0; then
      echo "Failed tests:"
      $SHELL $0 $at_fail_list --list
      echo
    fi
    if test $at_skip_count != 0; then
      echo "Skipped tests:"
      $SHELL $0 $at_skip_list --list
      echo
    fi
    if test $at_xpass_count != 0; then
      echo "Unexpected passes:"
      $SHELL $0 $at_xpass_list --list
      echo
    fi
    if test $at_fail_count != 0; then
      cat <<\_ASBOX
## ---------------------- ##
## Detailed failed tests. ##
## ---------------------- ##
_ASBOX
      echo
      for at_group in $at_fail_list
      do
        # Normalize the test group number.
        at_group_normalized=`expr "00000$at_group" : ".*\($at_format\)"`
        # Create a fresh directory for the next test group, and enter.
        at_group_dir=$at_suite_dir/$at_group_normalized
        at_group_log=$at_group_dir/$as_me.log
        cat $at_group_log
        echo
      done
      echo
    fi
    if test -n "$at_top_srcdir"; then
      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## $at_top_builddir/config.log ##
_ASBOX
      sed 's/^/| /' $at_top_builddir/config.log
      echo
    fi
  } >&5

  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## $as_me.log was created. ##
_ASBOX

  echo
  echo "Please send \`$as_me.log' and all information you think might help:"
  echo
  echo "   To: <open-cobol-list@lists.sourceforge.net>"
  echo "   Subject: [OpenCOBOL 0.33] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
  echo
  if test $at_debug_p = false; then
    echo
    echo 'You may investigate any problem if you feel able to do so, in which'
    echo 'case the test suite provides a good starting point.'
    echo
  fi
    exit 1
fi

exit 0


