S.O.S - Cobol student needs help! 
Author Message
 S.O.S - Cobol student needs help!

I'm seeking all information I can find on the rules for 88 level
usage.  Unfortunately, my text is poor and my instructor inadequate.
Any help or reference would be GREATLY appreciated. Thanks for reading
this, and thanks in advance for any help.



Tue, 26 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!

Quote:

> I'm seeking all information I can find on the rules for 88 level
> usage.  Unfortunately, my text is poor and my instructor inadequate.
> Any help or reference would be GREATLY appreciated. Thanks for reading
> this, and thanks in advance for any help.

"Rules" ? Hmm. Well, here's examples of some 88 levels, and their tests.

 05  SW-DATE-VALIDATION      PIC X(01).          
     88  DATE-VALID                     VALUE "Y".
     88  DATE-INVALID                   VALUE "N".

   - - - - -

  IF NOT DATE-INVALID                              
      MOVE ......

   - - - - -

  SET DATE-VALID TO TRUE

Hope this is of some use!                    

--
Andy Styles.

     /o/-------------------------------------/o/


   \o\. . . . . . . . . . . . . . . . . . .\o\
   /o/ My opinions are my own, and do not  /o/
  /o/ reflect those of Ford Motor Company /o/



Tue, 26 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!

Quote:

>I'm seeking all information I can find on the rules for 88 level
>usage.  Unfortunately, my text is poor and my instructor inadequate.
>Any help or reference would be GREATLY appreciated. Thanks for reading
>this, and thanks in advance for any help.

how about:
01    master-record.
    ...
    ...
      05  account-status pic 9.
          88  good-status  value 1.
          88  owes-lots    value 2.
          88  unknown-credit value 0.

...
      if owes-lots  perform send-knee-breaker
.....
JR

and stir with a Runcible spoon...



Tue, 26 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!

Quote:

> I'm seeking all information I can find on the rules for 88 level
> usage.  Unfortunately, my text is poor and my instructor inadequate.
> Any help or reference would be GREATLY appreciated. Thanks for reading
> this, and thanks in advance for any help.

   88 condition-name VALUES ARE literal-1.
   88 condition-name VALUE  IS  literal-1, literal-2,..., literal-n.
   88 condition-name VALUES ARE literal-1 THRU literal-2.

    This format associates a value, values, and/or range(s) of values with a
    condition-name.  Each such condition-name requires a separate level-88

    condition-name-1
        Is a user-specified name that associates a value with a conditional
        variable.  If the associated conditional variable requires subscripts
        or indexes, each procedural reference to the condition-name must be
        subscripted or indexed as required for the conditional variable.

        Condition-name-1 is tested procedurally in condition-name conditions
        (see "Conditional Expressions").

    literal-1
        When literal-1 is specified alone, the condition-name is associated
        with a single value.

    literal-1 THROUGH literal-2
        The condition-name is associated with at least one range of values.
        Whenever the THROUGH phrase is used, literal-1 must be less than
        literal-2.

    In the VALUE clause of a data description entry (Format 2), all the

    literals specified in the VALUE clause must be DBCS literals if the
    associated conditional variable is a DBCS data item.  The figurative
    constants SPACE and SPACES can be used as DBCS literals.

    The range of DBCS literals specified for the THROUGH phrase is based on
    the binary collating sequence of the hexadecimal values of the DBCS
    characters.

    Rules for Condition-Name Values:

      The VALUE clause is required in a condition-name entry, and must be

        the only clause in the entry.  Each condition-name entry is associated
        with a preceding conditional variable.  Thus, every level-88 entry
        must always be preceded either by the entry for the conditional
        variable, or by another level-88 entry when several condition-names
        apply to one conditional variable.  Each such level-88 entry
        implicitly has the PICTURE characteristics of the conditional
        variable.

      The keywords THROUGH and THRU are equivalent.

        The condition-name entries associated with a particular conditional
        variable must immediately follow the conditional variable entry.  The
        conditional variable can be any elementary data description entry
        except another condition-name, a RENAMES clause (level-66 item), or an
        item with USAGE IS INDEX.

        The conditional variable cannot be an item described as USAGE IS
        POINTER.

        A condition-name can be associated with a group item data description

        entry.  In this case:

        -   The condition-name value must be specified as a nonnumeric literal
            or figurative constant.

        -   The size of the condition-name value must not exceed the sum of
            the sizes of all the elementary items within the group.

        -   No element within the group can contain a JUSTIFIED or
            SYNCHRONIZED clause.

        -   No USAGE other than DISPLAY can be specified within the group.

            USAGE other than USAGE IS DISPLAY can be specified within the
            group.

        Condition-names can be specified both at the group level and at
        subordinate levels within the group.

        The relation test implied by the definition of a condition-name at the
        group level is performed in accordance with the rules for comparison
        of nonnumeric operands, regardless of the nature of elementary items
        within the group.

        The VALUE clause is allowed for internal floating-point data items.

        The VALUE clause is allowed for DBCS data items.  Relation tests for
        DBCS data items are performed according to the rules for comparison of
        DBCS items.  These rules can be found in "Comparing DBCS Operands".

        A space, a separator comma, or a separator semicolon, must separate
        successive operands.

        Each entry must end with a separator period.

      The type of literal in a condition-name entry must be consistent with
        the data type of its conditional variable.  In the following example:

        -   CITY-COUNTY-INFO, COUNTY-NO, and CITY are conditional variables.

            The PICTURE associated with COUNTY-NO limits the condition-name
            value to a 2-digit numeric literal.

            The PICTURE associated with CITY limits the condition-name value
            to a 3-character nonnumeric literal.

        -   The associated condition-names are level-88 entries.

            Any values for the condition-names associated with
            CITY-COUNTY-INFO cannot exceed 5 characters.

            Because this is a group item, the literal must be nonnumeric.

          05  CITY-COUNTY-INFO.
              88  BRONX                    VALUE "03NYC".
              88  BROOKLYN                 VALUE "24NYC".
              88  MANHATTAN                VALUE "31NYC".

              88  QUEENS                   VALUE "41NYC".
              88  STATEN-ISLAND            VALUE "43NYC".
            10  COUNTY-NO                  PICTURE 99.
                88  DUTCHESS               VALUE 14.
                88  KINGS                  VALUE 24.
                88  NEW-YORK               VALUE 31.
                88  RICHMOND               VALUE 43.
            10  CITY                       PICTURE X(3).
                88  BUFFALO                VALUE "BUF".

                88  NEW-YORK-CITY          VALUE "NYC".
                88  POUGHKEEPSIE           VALUE "POK".
          05  POPULATION...

Subordinate Topics  

GRUMP, Copyright ? 1995, M. Bass



Tue, 26 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!

maybe just a bit more information

01  MONTH                          PIC x(02)
     88  30-DAYS                     VALUE '04' '06' '09' '11'.
     88  31-DAYS                     VALUE '01' '03' '05' '07' THRU '08'
'10' '12'

IF 30-DAYS
    PERFORM .....................
ELSE
IF 31-DAYS
   PERFORM .....................
ELSE
   PERFORM .....................



Wed, 27 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!

Quote:

> maybe just a bit more information

> 01  MONTH                          PIC x(02)
>      88  30-DAYS                     VALUE '04' '06' '09' '11'.
>      88  31-DAYS                     VALUE '01' '03' '05' '07' THRU '08'
> '10' '12'

> IF 30-DAYS
>     PERFORM .....................
> ELSE
> IF 31-DAYS
>    PERFORM .....................
> ELSE
>    PERFORM .....................

Why would you have '07' THRU '08' ?


Fri, 29 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!

Quote:

>how about:
>01    master-record.
>    ...
>    ...
>      05  account-status pic 9.
>          88  good-status  value 1.
>          88  owes-lots    value 2.
>          88  unknown-credit value 0.

>..
>      if owes-lots  perform send-knee-breaker

How about also:
       05  filler             pic x.
         88  send-kneebreaker value 1 false 0.
.
    send-knee-breaker.
       if cheque-in-post
         set send-kneebreaker to false
       else
         set send-kneebreaker to true
       end-if.


Fri, 29 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!

Quote:


> >I'm seeking all information I can find on the rules for 88 level
> >usage.  Unfortunately, my text is poor and my instructor inadequate.
> >Any help or reference would be GREATLY appreciated. Thanks for reading
> >this, and thanks in advance for any help.

> how about:
> 01    master-record.
>     ...
>     ...
>       05  account-status pic 9.
>           88  good-status  value 1.
>           88  owes-lots    value 2.
>           88  unknown-credit value 0.

> ...
>       if owes-lots  perform send-knee-breaker
> .....
> JR

> and stir with a Runcible spoon...

Gosh Jeff, I hope you never use a cross reference list to find data-name usage.

What happened to good naming standards?

(Just using the Runcible spoon to do a little stirring)
Joan.



Sun, 31 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!

Quote:



>> >I'm seeking all information I can find on the rules for 88 level
>> >usage.  Unfortunately, my text is poor and my instructor inadequate.
>> >Any help or reference would be GREATLY appreciated. Thanks for reading
>> >this, and thanks in advance for any help.

>> how about:
>> 01    master-record.
>>     ...
>>     ...
>>       05  account-status pic 9.
>>           88  good-status  value 1.
>>           88  owes-lots    value 2.
>>           88  unknown-credit value 0.

>> ...
>>       if owes-lots  perform send-knee-breaker
>> .....
>> JR

>> and stir with a Runcible spoon...
>Gosh Jeff, I hope you never use a cross reference list to find data-name usage.
>What happened to good naming standards?
>(Just using the Runcible spoon to do a little stirring)
>Joan.

JEFF is a good name!

JR

and stir with a Runcible spoon...



Sun, 31 Jan 1999 03:00:00 GMT  
 S.O.S - Cobol student needs help!


Quote:


>> maybe just a bit more information

>> 01  MONTH                          PIC x(02)
>>      88  30-DAYS                     VALUE '04' '06' '09' '11'.
>>      88  31-DAYS                     VALUE '01' '03' '05' '07' THRU
'08'
>> '10' '12'

>> IF 30-DAYS
>>     PERFORM .....................
>> ELSE
>> IF 31-DAYS
>>    PERFORM .....................
>> ELSE
>>    PERFORM .....................

>Why would you have '07' THRU '08' ?

you wouldn't "have" to use "THRU".   I just put it there to show another
option of the conditional expression.

Dave



Wed, 03 Feb 1999 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Help...college student needs help w/cobol prgm.

2. HELP HELP SOS SOS

3. Help Desperately Needed in Student Cobol Project

4. COBOL Student: NEED HELP!

5. COBOL STUDENT NEEDS HELP!

6. Student needs help - MF cobol personal edition

7. Student needs help on using mouse with cobol

8. Desperate student needs help with COBOL program

9. Micro Focus Personal Cobol student needs help

10. sos sos sos

11. Help for a starting Cobol Student - PC Cobol Info

12. SOS - We need help !!!

 

 
Powered by phpBB® Forum Software