summaryrefslogtreecommitdiffstats
path: root/copy/cepis-status.cpy
blob: 75632c83f3c4902bcb0de3f458f24ae58cf79e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
*> ---------------------------------------------------------------------
*> Status layout without its 01 level, so the library can keep a private
*> scratch status alongside the caller's without duplicating the
*> definition. Replace the field-name tag and the level number.
*>
*> The six failure categories are split by the decision the caller has to
*> make, not by the HTTP status that produced them.
*> ---------------------------------------------------------------------
:L1:  :P:-STATUS-CODE              PIC 9(2).
      88  :P:-OK                   VALUE 0.
      88  :P:-INVALID-CEP          VALUE 1.
      88  :P:-NOT-FOUND            VALUE 2.
      88  :P:-RATE-LIMITED         VALUE 3.
      88  :P:-SERVER-ERROR         VALUE 4.
      88  :P:-NETWORK-ERROR        VALUE 5.
      88  :P:-INVALID-RESPONSE     VALUE 6.
      88  :P:-FAILED               VALUE 1 THRU 6.
      88  :P:-RETRIABLE            VALUE 3 THRU 5.
:L1:  :P:-STATUS-MESSAGE           PIC X(200).
:L1:  :P:-STATUS-HTTP              PIC 9(3).
:L1:  :P:-STATUS-RETRY-AFTER-MS    PIC S9(9)
                                   SIGN IS LEADING SEPARATE.
:L1:  :P:-STATUS-ATTEMPTS          PIC 9(4).