[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
INSPECT statement (BEFORE / AFTER phrase)
From: |
Jonathan Beit-Aharon |
Subject: |
INSPECT statement (BEFORE / AFTER phrase) |
Date: |
Thu, 27 Feb 2020 17:27:57 -0500 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Hi there,
If you look at the INSPECT statement at
https://www.ibm.com/support/knowledgecenter/SSQ2R2_9.5.1/com.ibm.ent.cbl.zos.doc/PGandLR/ref/rlpsinsp.html
you might notice that it is allowing repeating BEFORE | AFTER phrases
("phrase 1").
Assuming they are correct, and given data such as:
DATA DIVISION.
WORKING-STORAGE SECTION.
01 S1 PIC X(23) VALUE "AbAbAcAcQrAbQsTrAAbAb".
01 S2 PIC X(23) VALUE "AcAcAbAcQrAbQsTrAAbAb".
01 SA PIC X(23).
--
01 N1R.
03 N1LABEL PIC X(3) VALUE 'N1='.
03 N1 PIC S9(2) VALUE 0.
03 N1SEP PIC X(2) VALUE '+,'.
one expects the statement (sentence, really)
INSPECT S1 TALLYING N1 FOR ALL 'Ab' BEFORE 'Qr' BEFORE 'Qs'.
to be parsed.
FWIW, I ran into this while trying to upgrade from my Open COBOL version 1,
downloaded in 2009, to the latest (well, almost... downloaded in August 2019).
Thanks and regards,
Jonathan Beit-Aharon
Work mailto: address@hidden
Home mailto:address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- INSPECT statement (BEFORE / AFTER phrase),
Jonathan Beit-Aharon <=