Menu

#214 missing IBM functionality in RW module

GC 3.x
accepted
nobody
3
9 hours ago
2016-03-16
No

Created from a post by saikotgire24 in [cfa301ca].

I installed RW branch and tried compiling few set of Report Writer codes [from Jay Moseley's Report Writer tutorial]. I could find below features that weren't supported. [...]
These three are very fundamental issues which are not being supported on GNU RW branch.

These are the mentioned issues:

1) RECORD description invalid with REPORT in FD of File section.

Example:

 FD SAMPLE-REPORT                                              
       BLOCK CONTAINS 0 RECORDS                                     
       LABEL RECORD STANDARD                                        
       RECORDING MODE IS F                                          
       RECORD CONTAINS 132 CHARACTERS                               
       REPORT IS SAMPLE-REP.                                        
 01  SAMPLE-REP                         PIC X(132).   -------> Invalid with RW on GNU.

2) DATE & TIME functions are not supported.

01  TYPE IS PH.                                        
     05 LINE 1.                                                   
             10  COLUMN 1         PIC        99/99/99      FUNCTION DATE.
             10  COLUMN +3       PIC        99.99           FUNCTION TIME.

3) Defining LINE LIMIT in Report Description is not allowed.

further (originally reported as a comment ion this ticket):

Hi Team,

Few more KEYWORDS not working on GC RW branch,

4) COLUMN LEFT/COLUMN RIGHT:

                         TYPE DETAIL-1
                         LINE 01
                         10 TEST1  COLUMN LEFT 85 PIC X(15) SOURCE WS-STREET-NAME

                         TYPE DETAIL-2
                         LINE 02
                         10 TEST1  COLUMN RIGHT 85 PIC X(15) SOURCE WS-STREET-NAME

5) COUNT OF:

```cobol
TYPE DETAIL-1
LINE 01
10 TEST1 COLUMN RIGHT 85 PIC X(15) SOURCE WS-STREET-NAME

                     TYPE DETAIL-2
                     LINE 02
                     10 TEST8 COLUMN 90 PIC X(15) COUNT OF TEST1.

```

Related

Discussion: cfa301ca
Discussion: Report writer and XML parsing feature of GNU COBOL ?

Discussion

  • Simon Sobisch

    Simon Sobisch - 2016-03-16
    • summary: Missing functions in RW module --> Missing functionality in RW module
     
  • Simon Sobisch

    Simon Sobisch - 2016-03-16

    Just a note to issue 2: there are no functions TIME or DATE. I've not checked if existing ones work.

     
  • Simon Sobisch

    Simon Sobisch - 2016-03-16
     
  • Simon Sobisch

    Simon Sobisch - 2016-03-17

    More from the discussions:

    Below are couple of other things i noticed.
    1) COLUMN CENTER 40 VALUE 'GNU REPORT WRITER'.
    Center is a anchoring keyword in IBM RW, which is not supported on GNU RW branch.

    2) LINE 05 PRESENT WHEN SALARY < MIN-SALARY.
    PRESENT is not supported on GNU RW branch, including PRESENT AFTER & PRESENT BEFORE.

     
    • Ron Norman

      Ron Norman - 2016-03-17

      Actually, PRESENT WHEN is in the RW test cases and I think it works.
      Also CENTER is in the RW test cases and should also be working.
      Is there a specific test case (example) that is not working?

       

      Last edit: Simon Sobisch 2016-03-17
      • Simon Sobisch

        Simon Sobisch - 2016-03-17

        The original topic starter wanted to snip it down to a minimal sample. In the meanwhile I've checked the IBM docs and parser.y. COLUMN CENTER looks identical and should work (at least from this single part).

        • One feature the op misses is PRESENT BEFORE, it is described in 3.17.1 and as format c (the only one in rw-branch) GROUP indicate. Should I open a specific feature request for this?
        • The missing LINE LIMIT is described in 2.7.

        Simon

         
        • Anonymous

          Anonymous - 2016-03-22

          Hi Simon,

          PRESENT AFTER NEW, PRESENT JUST AFTER NEW are not working too.

          COLUMN CENTER is not working as well. Is there some tweaking or alternate way to mention than the SYNTAX mentioned below. ?

          'COLUMN CENTER 40 VALUE 'GNU REPORT WRITER'

           

          Last edit: Anonymous 2016-03-22
          • Simon Sobisch

            Simon Sobisch - 2016-03-22

            The best way is always to provide a minimal source sample that should compile and run ("prog.cob") and add an expected output (should be easy if you can compile and run it with the old compiler) .

             
            • Anonymous

              Anonymous - 2016-03-22

              Attaching a program which was clean compiled and executed on IBM mainframes. Also attaching expected report.

               

              Last edit: Anonymous 2016-03-22
  • Simon Sobisch

    Simon Sobisch - 2016-03-17
    • summary: Missing functionality in RW module --> Missing IBM functionality in RW module
     
  • Vincent (Bryan) Coen

    I managed to get further by:

    Rem'ing out : - author date written,

         *    RECORDING MODE IS F                                          00380000
      *    LABEL RECORDS STANDARD                                       00390000
      *    BLOCK 0.                                                     00400000
    

    then

      *    RECORDING MODE IS F                                          00440000
      *    LABEL RECORDS OMITTED                                        00450000
      *    BLOCK 0                                                      00460000
      *    RECORD 134                                                   00470000
    
      *01  REP-REC                         PIC X(134).                  00500000
    

    [as not used ] none of mine defines such].

    Moving report section to after WS and linkage (if present) as per std layouts.

    Remove reference to functions DATE & TIME note the editing chars '.' so parser should allow any within the 9's defs.

    That said it fails after PRESENT AFTER which none of my code uses.

    But does use (for example)-- >>

    [
    03 WIP-Data line plus 1 present when Stock-Services-Flag not = "Y"
    and (Stock-Construct-Bundle not = zero
    or Stock-Under-Construction not = zero
    or Stock-Work-in-Progress not = zero
    or Stock-Construct-Item not = spaces).

    ]

    Still gives errors but compiler is upset and lost with the PRESENT AFTER clauses.

     
    • Anonymous

      Anonymous - 2016-03-23

      Hi Bryan,

      What about LINE LIMIT. Didnt you comment that out ?

      I agree with you that DATE & TIME functions would have to be removed and handled from PROCEDURE DIVISION.

      How did you handle COLUMN CENTER ?

      I understand that PRESENT AFTER might not be used in any or your code and neither ABSENT WHEN might be used as thats not working as well.

      Could you please let us know whether there are plans to include corrections or additions in RW branch ? Especially PRESENT AFTER, PRESENT JUST AFTER, ABSENT WHEN, CENTER etc as these are standard IBM keywords.

      Thanks.
      Anon

       
  • Anonymous

    Anonymous - 2016-03-29

    Hi Team,

    Few more KEYWORDS not working on GC RW branch,

    1) COLUMN LEFT :

    Example: LINE 01
    10 TEST1 COLUMN LEFT 85 PIC X(15) SOURCE WS-STREET-NAME

    2) COLUMN RIGHT :

    Example: LINE 01
    10 TEST1 COLUMN RIGHT 85 PIC X(15) SOURCE WS-STREET-NAME

    3) COUNT OF :

    Example: TYPE DETAIL-1
    LINE 01
    10 TEST1 COLUMN RIGHT 85 PIC X(15) SOURCE WS-STREET-NAME

                         TYPE DETAIL-2
                         LINE 02
                         10 TEST8 COLUMN 90 PIC X(15) COUNT OF TEST1.
    

    4) MODE IS

    Example:
    SELECT F-E1 ASSIGN TO E1 MODE IS PNOP
    USING FF-DN-FUNC
    FF-DN-PARMS
    FF-DN-PRINT-RET
    FF-DN-PARM-XEROX.
    Thanks,
    ANON

     

    Last edit: Anonymous 2016-03-29
    • Simon Sobisch

      Simon Sobisch - 9 hours ago

      Mode is unrelated to RW, I'm adding the rest at the start of this issue.

       
  • Simon Sobisch

    Simon Sobisch - 9 hours ago
    • labels: --> reportwriter, parser, libcob
    • summary: Missing IBM functionality in RW module --> missing IBM functionality in RW module
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,15 +3,13 @@
     &gt; I installed RW branch and tried compiling few set of Report Writer codes [from [Jay Moseley&#39;s Report Writer tutorial][1]]. I could find below features that weren&#39;t supported. [...]
     These three are very fundamental issues which are not being supported on GNU RW branch.
    
    -I&#39;ve assigned this to Ron in the hope he finds the time to investigate it.
     These are the mentioned issues:
    
     1) RECORD description invalid with REPORT in FD of File section.
    
     Example: 
    
    -~~~~
    -::cobolfree
    +```cobolfree
      FD SAMPLE-REPORT                                              
            BLOCK CONTAINS 0 RECORDS                                     
            LABEL RECORD STANDARD                                        
    @@ -19,19 +17,47 @@
            RECORD CONTAINS 132 CHARACTERS                               
            REPORT IS SAMPLE-REP.                                        
      01  SAMPLE-REP                         PIC X(132).   -------&gt; Invalid with RW on GNU.
    -~~~~
    +```
    
    -2) DATE &amp; TIME functions are not supported. 
    +2) `DATE` &amp; `TIME` functions are not supported. 
    
    -~~~~
    -::cobolfree
    +```cobolfree
     01  TYPE IS PH.                                        
          05 LINE 1.                                                   
                  10  COLUMN 1         PIC        99/99/99      FUNCTION DATE.
                  10  COLUMN +3       PIC        99.99           FUNCTION TIME.
    -~~~~
    +```
    
    -3)  Defining LINE LIMIT in Report Description is not allowed.
    +3)  Defining `LINE LIMIT` in Report Description is not allowed.
    
    +further (originally reported as a comment ion this ticket):
    +
    +Hi Team,
    +
    +Few more KEYWORDS not working on GC RW branch,
    +
    +4) `COLUMN LEFT`/`COLUMN RIGHT`:
    +
    +```cobol
    
    +                         TYPE DETAIL-1
    +                         LINE 01
    +                         10 TEST1  COLUMN LEFT 85 PIC X(15) SOURCE WS-STREET-NAME
    +
    +                         TYPE DETAIL-2
    +                         LINE 02
    +                         10 TEST1  COLUMN RIGHT 85 PIC X(15) SOURCE WS-STREET-NAME
    +```
    + 
    +5)  `COUNT OF`:
    +
    +```cobol
    +                         TYPE DETAIL-1
    +                         LINE 01
    +                         10 TEST1  COLUMN RIGHT 85 PIC X(15) SOURCE WS-STREET-NAME
    +                         
    +                         TYPE DETAIL-2
    +                         LINE 02
    +                         10 TEST8 COLUMN 90 PIC X(15) COUNT OF TEST1.
    + ```
    
     [1]:http://www.jaymoseley.com/hercules/compiling/cobolrw.htm
    
    • assigned_to: Ron Norman --> nobody
    • Group: reportwriter --> GC 3.x
     
  • Vincent (Bryan) Coen

    Another feature that is missing and I have reported it in the past as a bug I think but have documented it in the PG is >

    6.6.2 REPORT SECTION Data Items - 2/3rds down :

    [ VARYING identifier-3 FROM { identifier-4 } BY { identifier-5 } ]
    ~~~~~~~~~~~ { integer-6 } ~~ { integer-7 } ***

    Varying clause not supported in v3.2.

    I did try and find it in the existing tickets but could not but may be it is me not knowing how to search correctly.

     

Log in to post a comment.