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.
```
Discussion: cfa301ca
Discussion: Report writer and XML parsing feature of GNU COBOL ?
Just a note to issue 2: there are no functions
TIMEorDATE. I've not checked if existing ones work.For
LINE LIMITsee COBOL Report Writer Programmer's Manual [IBM].More from the discussions:
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
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 CENTERlooks identical and should work (at least from this single part).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?LINE LIMITis described in 2.7.Simon
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
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) .
Attaching a program which was clean compiled and executed on IBM mainframes. Also attaching expected report.
Last edit: Anonymous 2016-03-22
I managed to get further by:
Rem'ing out : - author date written,
then
[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.
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
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
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
Mode is unrelated to RW, I'm adding the rest at the start of this issue.
Diff:
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.