experchange > cobol

redscofield (11-07-18, 06:02 PM)
I have written a program in Cobol report writer programming, only to discover the the version of z/OS we have will not precompile this. Is there any way for me to compile this or convert it to basic Cobol? Or will I have to rewrite the whole thing?

Thanks in advance for your assistance.

-Red
(11-07-18, 06:12 PM)
In article <bc26a220-1391-4032-9def-c4ce399f4616>,
<redscofield> wrote:
>I have written a program in Cobol report writer programming, only to
>discover the the version of z/OS we have will not precompile this.


Please post z/OS versions and errors. This may assist in a diagnosis.

DD
redscofield (11-07-18, 06:35 PM)
On Wednesday, November 7, 2018 at 10:12:20 AM UTC-6, docd...@panix.com wrote:
> In article <bc26a220-1391-4032-9def-c4ce399f4616>,
> <redscofield> wrote:
> >I have written a program in Cobol report writer programming, only to
> >discover the the version of z/OS we have will not precompile this.

> Please post z/OS versions and errors. This may assist in a diagnosis.
> DD


Certainly! z/OS 2.1 I'm unable to compile with with my JCL as this version of z/OS does not support Report Writer code. Code posted below in case you'd like to see that.

IDENTIFICATION DIVISION.
PROGRAM-ID. PRODRPT.
*
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT PRODIN ASSIGN TO PRODLIST.
SELECT PRODOUT ASSIGN TO PRODRPT.
*
DATA DIVISION.
FILE SECTION.
FD PRODIN
RECORDING MODE IS F
RECORD CONTAINS 80 CHARACTERS
BLOCK CONTAINS 0 RECORDS.
*
01 PROD-LIST.
88 ENDOFFILE VALUE HIGH-VALUES.
05 PRODCODE PIC X(5).
05 PRODTYPE PIC X(8).
05 PRODDESC PIC X(32).
05 PRODCOST PIC X(9).
*
FD PRODOUT
REPORT IS PRODUCT-REPORT.
01 PROD-OUT PIC X(80).
*
WORKING-STORAGE SECTION.
* COUNTERS AND HOLD FIELDS
01 PAGE-COUNT PIC 9(3) VALUE 0.

REPORT SECTION
RD PRODUCT-REPORT
LINE LIMIT 55
FIRST DETAIL LINE 6.
LAST LINE IS 65.

01 HEAD1 TYPE PH.
03 LINE 1.
05 COL 1 VALUE 'DATE: '.
05 COL 8 PIC 9(2) SOURCE WS-CD-MONTH.
05 COL 10 VALUE '/'.
05 COL 11 PIC 9(2) SOURCE WS-CD-DAY.
05 COL 13 VALUE '/'.
05 COL 14 PIC 9(2) SOURCE WS-CD-YEAR.
05 COL 18 VALUE SPACE.
05 COL 19 VALUE
' MASTER PRODUCT LIST '.
05 COL 69 VALUE SPACE.
05 COL 70 VALUE 'PAGE:'.
05 COL 75 PIC ZZ9 SOURCE WS-HL1-PAGE-NUMBER.

01 HEAD2 TYPE PH.
03 LINE 2.
05 COL 1 VALUE 'TIME: '.
05 COL 9 PIC 9(2) SOURCE WS-CD-HOURS.
05 COL 11 VALUE ':'.
05 COL 13 PIC 9(2) SOURCE WS-CD-MINUTES.
05 COL 15 VALUE SPACE.
05 COL 72 VALUE 'PRODLIST'.

01 BLANKLN TYPE PH.
03 LINE 3.
05 COL 1 VALUE SPACE.

01 HEAD3 TYPE PH.
03 LINE 4.
05 COL 1 VALUE 'CODE: '.
05 COL 8 VALUE 'TYPE: '.
05 COL 18
VALUE 'DESCRIPTION: '.
05 COL 63 VALUE 'PRICE:'.

01 DASHES TYPE PH.
03 LINE 5.
05 COL 80 VALUE ALL '='.

01 PRODLINE TYPE DE.
05 COL 1 SOURCE PRODCODE.
05 COL 6 VALUE SPACE.
05 COL 8 SOURCE PRODTYPE.
05 COL 16 VALUE SPACE.
05 COL 18 PIC X SOURCE PRODDESC.
05 COL 50 VALUE SPACE.
05 COL 66 PIC $ZZZ,ZZZ,ZZ9 SOURCE PRODCOST.
*
PROCEDURE DIVISION.
*
PERFORM 0100-INITIALIZE.
PERFORM 0200-MOVE-DATA
UNTIL NO-MORE-RECORDS.
PERFORM 0400-FINAL-ROUTINE.
STOP RUN.
*
0100-INITIALIZE.
OPEN INPUT PRODIN
OUTPUT PRODOUT
READ PRODIN
AT END SET ENDOFFILE TO TRUE
END-READ.
INITIATE PRODUCT-REPORT.
PERFORM 0200-PRINT-PRODUCT-REPORT
UNTIL ENDOFFILE.
TERMINTATE PRODUCT-REPORT.
CLOSE PRODIN, PRODOUT.
STOP RUN.
0200-PRINT-PRODUCT-REPORT.
GENERATE PRODLINE.
READ PRODIN
AT END SET ENDOFFILE TO TRUE
END-READ.
David Larochette (11-07-18, 09:23 PM)
Le 07-11-2018, redscofield <redscofield> a écrit :
> On Wednesday, November 7, 2018 at 10:12:20 AM UTC-6, docd...@panix.com wrote:
> Certainly! z/OS 2.1 I'm unable to compile with with my JCL as this version of z/OS does not support Report Writer code. Code posted below in case you'd like to see that. IBM's report writer cobol extension ship as an external precompiler.


If it is installed on your build system, you must enable it by adding
specific parameters to your cobol compiler invocation (IGYCRCTL for
example).

You can also invoke it as a standalone command (named SPCRWCOB) which
will generate a precompiled cobol source.

more info here :
<ftp://ftp.software.ibm.com/software/websphere/awdtools/cobolreportwriter/c2643023.pdf>
Bill Gunshannon (11-07-18, 10:05 PM)
On 11/7/18 11:12 AM, docdwarf wrote:
> In article <bc26a220-1391-4032-9def-c4ce399f4616>,
> <redscofield> wrote:
>> I have written a program in Cobol report writer programming, only to
>> discover the the version of z/OS we have will not precompile this.

> Please post z/OS versions and errors. This may assist in a diagnosis.


I have never seen a precompiler for Report Writer. It is
either in your COBOL or not.

bill
Clark F Morris (11-08-18, 01:26 AM)
On Wed, 7 Nov 2018 08:02:44 -0800 (PST), redscofield wrote:

>I have written a program in Cobol report writer programming, only to discover the the version of z/OS we have will not precompile this. Is there any way for me to compile this or convert it to basic Cobol? Or will I have to rewrite the whole thing?


Report writer was removed from IBM COBOl starting either with VS COBOL
1.4 or before and has not been in the various iterations since. VS
COBOL 1.4 was the first to support the 1985 standard. There is a
separate Report Writer pre-compiler (5798-DYR) that will accept code
containing Report Writer statement that is otherwise compatible with
Enterprise COBOL V4.2 and probably with V6.2 and produce COBOL code
that can be used as input to the COBOL compiler. This pre-compiler is
a separately licensed option so the z/OS installation where you are
trying to run your program may not have it. Check with applications
support.

Clark Morris
(11-08-18, 01:32 AM)
In article <g4gut6F6i44U1>,
Bill Gunshannon <bill.gunshannon> wrote:
>On 11/7/18 11:12 AM, docdwarf wrote:
>I have never seen a precompiler for Report Writer. It is
>either in your COBOL or not.


Quick... somebody call Armonk!

<https://www.ibm.com/support/knowledgecenter/en/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/MG/igymapxc023.htm>

DD
(11-08-18, 01:37 AM)
In article <e9s6udp1mq618qqtqct6oh8jpa9te0c8ab>,
Clark F Morris <cfmpublic> wrote:
>On Wed, 7 Nov 2018 08:02:44 -0800 (PST), redscofield wrote:
>discover the the version of z/OS we have will not precompile this. Is
>there any way for me to compile this or convert it to basic Cobol? Or
>will I have to rewrite the whole thing?
>Report writer was removed from IBM COBOl starting either with VS COBOL
>1.4 or before and has not been in the various iterations since. VS
>COBOL 1.4 was the first to support the 1985 standard.


This was a cause for my wondering 'for what reason would anyone write a
program in a feature that hasn't been supported in several decades?'

DD
(11-08-18, 01:48 AM)
In article <104145dd-96cc-44de-9862-c52f6b436ccf>,
<redscofield> wrote:
>On Wednesday, November 7, 2018 at 10:12:20 AM UTC-6, docd...@panix.com wrote:
>Certainly! z/OS 2.1 I'm unable to compile with with my JCL as this
>version of z/OS does not support Report Writer code.


Not only does that version not support Report Writer code... IBM no longer
supports that version of z/OS.

<https://www-01.ibm.com/software/support/lifecycleapp/PLCDetail.wss?q45=Z966844T77753Y85>

Are you able to locate the system library containing a copy of IKFCBL00?

(some people might think me merciless... some people might see me as
otherwise)

DD
(11-08-18, 01:55 AM)
In article <slrnpu6eta.9h4.david>,
David Larochette <david> wrote:

[snip]

>You can also invoke it as a standalone command (named SPCRWCOB) which
>will generate a precompiled cobol source.


Vous ete tres genereux, Monsieur Larochette.

(I don't know how to generate accented characters in pico 5.09)

DD
Bill Gunshannon (11-08-18, 03:08 AM)
On 11/7/18 6:32 PM, docdwarf wrote:
> In article <g4gut6F6i44U1>,
> Bill Gunshannon <bill.gunshannon> wrote:
> Quick... somebody call Armonk!
> <https://www.ibm.com/support/knowledgecenter/en/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/MG/igymapxc023.htm>


I guess if anyone could get away with something that obtuse it
would be IBM.

bill
pete dashwood (11-10-18, 11:21 PM)
On 8/11/2018 2:08 PM, Bill Gunshannon wrote:
> On 11/7/18 6:32 PM, docdwarf wrote:
> I guess if anyone could get away with something that obtuse it
> would be IBM.
> bill Yeah, they pre-compile embedded SQL as well...


In fact, pre-compilation and pre-processing of COBOL source is a pretty
wide spread practice across various platforms.

Sometimes it is integrated as just one of several passes the compiler
makes over your code, sometimes it is a separate "job step", but it has
been accepted practice for decades.

How is it "obtuse"?

Pete.
pete dashwood (11-10-18, 11:25 PM)
On 8/11/2018 12:37 PM, docdwarf wrote:
> In article <e9s6udp1mq618qqtqct6oh8jpa9te0c8ab>,
> Clark F Morris <cfmpublic> wrote:
> This was a cause for my wondering 'for what reason would anyone write a
> program in a feature that hasn't been supported in several decades?'
> DD

Maybe for the same reason someone would write software to translate
Latin into Klingon...

The endless quest to try difficult/unknown things and grow by trying them.

Pete.
(11-11-18, 02:06 AM)
In article <g4p0msFisbU1>,
pete dashwood <dashwood> wrote:
>On 8/11/2018 12:37 PM, docdwarf wrote:
>> In article <e9s6udp1mq618qqtqct6oh8jpa9te0c8ab>,
>> Clark F Morris <cfmpublic> wrote:
>>> On Wed, 7 Nov 2018 08:02:44 -0800 (PST), redscofield wrote:
>>>> I have written a program in Cobol report writer programming, only to
>>> discover the the version of z/OS we have will not precompile this.


[snip]

>Maybe for the same reason someone would write software to translate
>Latin into Klingon...


May be that... or might be another, perhaps Mr Scofield - in exchange for
the Good Assistance rendered here - might be kind enough to elaborate.

DD
Bill Gunshannon (11-11-18, 04:32 AM)
On 11/10/18 4:21 PM, pete dashwood wrote:
> On 8/11/2018 2:08 PM, Bill Gunshannon wrote:
> Yeah, they pre-compile embedded SQL as well...


All Embedded SQl is pre-copmpiled as it was never a part of
the language. Report Writer on the other hand was.

> In fact, pre-compilation and pre-processing of COBOL source is a pretty
> wide spread practice across various platforms.


Well, it definitely is at IBM as they also pre-complie for CICS.
But other than SQL i have never had to precompile anything else
on any of the COBOL systems I have used.

> Sometimes it is integrated as just one of several passes the compiler
> makes over your code, sometimes it is a separate "job step", but it has
> been accepted practice for decades.


Well, I see a big difference between pre-compilers and compiler
passes.

> How is it "obtuse"?


As I stated above, Report Writer is a recognized part of
the language. Handling in the same manner as CICS and
SQL just strikes me as rather strange. Pre-compiling,
at least to me, has always been something needed to take
non-COBOL embedded in a COBOL program and convert it to
COBOL. Pre-compiling to convert COBOL to COBOL seems
obtuse. I wonder what they convert it into? Unless,
of course, the input to the Report Writer pre-compiler
isn't Report Writer at all but some wierd syuntax used
only by IBM. And that wouldn't surprise me either.

bill

Similar Threads