Home > Archive > Cobol > January 2006 > Would someone compile this for me?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Would someone compile this for me?
|
|
| William M. Klein 2006-01-19, 6:55 pm |
| I would like to know if IBM Enterprise COBOL and Micro Focus COBOL compile
"cleanly" (no warnings or even informational messages), the following source
code (snippet). Please put it into a valid program structure and let me know
the results.
Working-Storage Section.
01 A.
05 B.
10 C PIC X.
04 D.
05 E PIC X.
(Both of these compilers document an extension for "non-Standard level
numbers"). If easy, please compile both with and without FLAGSTD turned on.
(If you feel like it, email me - off-list - the compiler listings)
--
Bill Klein
wmklein <at> ix.netcom.com
| |
| Rick Smith 2006-01-19, 9:55 pm |
|
"William M. Klein" <wmklein@nospam.netcom.com> wrote in message
news:JcWzf.147631$Es3.139201@fe03.news.easynews.com...
> I would like to know if IBM Enterprise COBOL and Micro Focus COBOL compile
> "cleanly" (no warnings or even informational messages), the following
source
> code (snippet). Please put it into a valid program structure and let me
know
> the results.
>
> Working-Storage Section.
> 01 A.
> 05 B.
> 10 C PIC X.
> 04 D.
> 05 E PIC X.
>
> (Both of these compilers document an extension for "non-Standard level
> numbers"). If easy, please compile both with and without FLAGSTD turned
on.
> (If you feel like it, email me - off-list - the compiler listings)
>
> --
> Bill Klein
> wmklein <at> ix.netcom.com
-----
* Micro Focus COBOL Version 3.2.24 L2.5 revision 000 19-Jan-06 20:15 Page
1
* C:\CBL-CHAL\KLEIN.CBL
* Options: WB ERRQ EDITOR(MF) LIST() NOOSVS ANS85 NOVSC2 CSI ANIM ENSUITE(2)
CON
1$set ans85 flagstd"h"
2 identification division.
3 program-id. klein.
4 data division.
5 Working-Storage Section.
6 01 A.
7 05 B.
8 10 C PIC X.
* 554-VSC2 ---------- (
0)--
** Syntax is non-conforming non-standard ANS85
** Line: 8 Column: 21
** Level hierarchy wrong
9 04 D.
10 05 E PIC X.
11 procedure division.
12 begin.
13 stop run.
14 end program klein.
* Micro Focus COBOL Version 3.2.24 L2.5 revision 000
*
* Total Messages: 1
* Unrecoverable : 0 Severe : 0
* Errors : 0 Warnings: 0
* Informational : 0 Flags : 1
* Data: 500 Code: 59
-----
-----
* Micro Focus COBOL Version 3.2.24 L2.5 revision 000 19-Jan-06 20:18 Page
1
* C:\CBL-CHAL\KLEIN2.CBL
* Options: WB ERRQ EDITOR(MF) LIST() NOOSVS ANS85 NOVSC2 CSI ANIM ENSUITE(2)
CON
1$set ans85
2 identification division.
3 program-id. klein2.
4 data division.
5 Working-Storage Section.
6 01 A.
7 05 B.
8 10 C PIC X.
9 04 D.
10 05 E PIC X.
11 procedure division.
12 begin.
13 stop run.
14 end program klein2.
* Micro Focus COBOL Version 3.2.24 L2.5 revision 000
*
* Total Messages: 0
* Data: 500 Code: 59
-----
| |
|
| [posted & emailed]
In article <JcWzf.147631$Es3.139201@fe03.news.easynews.com>,
William M. Klein <wmklein@nospam.netcom.com> wrote:
>I would like to know if IBM Enterprise COBOL and Micro Focus COBOL compile
>"cleanly" (no warnings or even informational messages), the following source
>code (snippet). Please put it into a valid program structure and let me know
>the results.
>
>Working-Storage Section.
>01 A.
> 05 B.
> 10 C PIC X.
> 04 D.
> 05 E PIC X.
>
Compiler: IBM Enterprise COBOL for z/OS and OS/390 3.2.0.
Source code:
IDENTIFICATION DIVISION.
PROGRAM-ID. SKEL1.
ENVIRONMENT DIVISION.
DATA DIVISION.
Working-Storage Section.
01 A.
05 B.
10 C PIC X.
04 D.
05 E PIC X.
Procedure Division.
Goback.
First compile invocation:
//COB EXEC PGM=IGYCRCTL,
// PARM='SIZE(MAX),LIB,MAP,DYNAM,LIST,
// XREF,OPT,FLAG(I,I),NUMPROC(PFD),'
Return code: 0
Second compile invocation:
//COB EXEC PGM=IGYCRCTL,
// PARM='SIZE(MAX),LIB,MAP,DYNAM,LIST,
// XREF,OPT,FLAGSTD,NUMPROC(PFD),'
Return code: 0
Error message returned:
IGYOS4003-E Invalid option "FLAGSTD" was found and discarded.
Conclusion: await further information and leave diddling with compiler
options to the systems jockies.
DD
| |
| cblkid@yahoo.com 2006-01-20, 7:55 am |
| Bill,
This compiled with Fujitsu NetCOBOL for Windows Version 8. Gave a
warning about invalid hierarchy but it was a warning, not an error.
| |
|
| Rick Smith wrote:
> "William M. Klein" <wmklein@nospam.netcom.com> wrote in message
> news:JcWzf.147631$Es3.139201@fe03.news.easynews.com...
>
>
> source
>
>
> know
>
>
> on.
>
>
>
> -----
> * Micro Focus COBOL Version 3.2.24 L2.5 revision 000 19-Jan-06 20:15 Page
> 1
> * C:\CBL-CHAL\KLEIN.CBL
> * Options: WB ERRQ EDITOR(MF) LIST() NOOSVS ANS85 NOVSC2 CSI ANIM ENSUITE(2)
> CON
> 1$set ans85 flagstd"h"
> 2 identification division.
> 3 program-id. klein.
> 4 data division.
> 5 Working-Storage Section.
> 6 01 A.
> 7 05 B.
> 8 10 C PIC X.
> * 554-VSC2 ---------- (
> 0)--
> ** Syntax is non-conforming non-standard ANS85
> ** Line: 8 Column: 21
> ** Level hierarchy wrong
> 9 04 D.
> 10 05 E PIC X.
> 11 procedure division.
> 12 begin.
> 13 stop run.
> 14 end program klein.
> * Micro Focus COBOL Version 3.2.24 L2.5 revision 000
> *
> * Total Messages: 1
> * Unrecoverable : 0 Severe : 0
> * Errors : 0 Warnings: 0
> * Informational : 0 Flags : 1
> * Data: 500 Code: 59
> -----
With FLAGSTD"h", I get the same results with Server Express 4.0. Without
FLAGSTD"h", the source compiles cleanly (as per Rick's second listing).
SimonT.
| |
| Arnold Trembley 2006-01-21, 6:55 pm |
| Unfortunately, I did not capture all the compile-time options. I just
took the regular batch COBOL defaults. Unlike DocDwarf's shop, I
use NUMPROC(NOPFD), which is less efficient, but can fix some numeric
data errors.
I'm pretty sure we normally suppress all "Informational" messages, and
only retain "Warning" and higher level messages, so this probably
doesn't comply exactly with your request.
PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1
Invocation parameters:
XREF(FULL),NORENT,X(FULL)
LineID PL SL
----+-*A-1-B--+----2----+----3----+----4----+----5
000001 IDENTIFICATION DIVISION.
000002 PROGRAM-ID. HELLO3.
000003 ENVIRONMENT DIVISION.
000004 DATA DIVISION.
000005 WORKING-STORAGE SECTION.
000006 01 A.
000007 05 B.
000008 10 C PIC X.
000009 04 D.
000010 05 E PIC X.
000011 PROCEDURE DIVISION.
000012 0000.
000013 DISPLAY 'HELLO WORLD'.
000014 PERFORM 1234.
000015 GOBACK.
000016 1234.
000017 DISPLAY 'THIS IS PARAGRAPH 1234.'.
TGT LOCATED AT 0002F0 FOR 00000144 BYTES
SPEC-REG LOCATED AT 000438 FOR 00000008 BYTES
DSA WILL BE ALLOCATED FOR 00000148 BYTES
* Statistics for COBOL program HELLO3:
* Source records = 17
* Data Division statements = 5
* Procedure Division statements = 4
End of compilation 1, program HELLO3, no statements flagged.
Return code 0
William M. Klein wrote:
> I would like to know if IBM Enterprise COBOL and Micro Focus COBOL compile
> "cleanly" (no warnings or even informational messages), the following source
> code (snippet). Please put it into a valid program structure and let me know
> the results.
>
> Working-Storage Section.
> 01 A.
> 05 B.
> 10 C PIC X.
> 04 D.
> 05 E PIC X.
>
> (Both of these compilers document an extension for "non-Standard level
> numbers"). If easy, please compile both with and without FLAGSTD turned on.
> (If you feel like it, email me - off-list - the compiler listings)
>
--
http://arnold.trembley.home.att.net/
| |
| William M. Klein 2006-01-22, 9:55 pm |
| If any IBM user wants to try what I asked for, I would put
PROCESS FLAGSTD(H), FLAG(I,I)
just before the ID division header in the source code.
--
Bill Klein
wmklein <at> ix.netcom.com
"Arnold Trembley" <arnold.trembley@worldnet.att.net> wrote in message
news:6BxAf.282079$qk4.171247@bgtnsc05-news.ops.worldnet.att.net...
> Unfortunately, I did not capture all the compile-time options. I just took
> the regular batch COBOL defaults. Unlike DocDwarf's shop, I use
> NUMPROC(NOPFD), which is less efficient, but can fix some numeric data errors.
>
> I'm pretty sure we normally suppress all "Informational" messages, and only
> retain "Warning" and higher level messages, so this probably doesn't comply
> exactly with your request.
>
>
> PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1
> Invocation parameters:
> XREF(FULL),NORENT,X(FULL)
>
> LineID PL SL
> ----+-*A-1-B--+----2----+----3----+----4----+----5
> 000001 IDENTIFICATION DIVISION.
> 000002 PROGRAM-ID. HELLO3.
> 000003 ENVIRONMENT DIVISION.
> 000004 DATA DIVISION.
> 000005 WORKING-STORAGE SECTION.
> 000006 01 A.
> 000007 05 B.
> 000008 10 C PIC X.
> 000009 04 D.
> 000010 05 E PIC X.
> 000011 PROCEDURE DIVISION.
> 000012 0000.
> 000013 DISPLAY 'HELLO WORLD'.
> 000014 PERFORM 1234.
> 000015 GOBACK.
> 000016 1234.
> 000017 DISPLAY 'THIS IS PARAGRAPH 1234.'.
>
> TGT LOCATED AT 0002F0 FOR 00000144 BYTES
> SPEC-REG LOCATED AT 000438 FOR 00000008 BYTES
> DSA WILL BE ALLOCATED FOR 00000148 BYTES
> * Statistics for COBOL program HELLO3:
> * Source records = 17
> * Data Division statements = 5
> * Procedure Division statements = 4
> End of compilation 1, program HELLO3, no statements flagged.
> Return code 0
>
>
>
>
> William M. Klein wrote:
>
> --
> http://arnold.trembley.home.att.net/
>
| |
| Arnold Trembley 2006-01-24, 3:55 am |
|
William M. Klein wrote:
> If any IBM user wants to try what I asked for, I would put
>
> PROCESS FLAGSTD(H), FLAG(I,I)
>
> just before the ID division header in the source code.
>
Well, I can follow instructions eventually. This might be a little
more informative:
PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1
Invocation parameters:
XREF(FULL),NORENT,X(FULL)
PROCESS(CBL) statements:
PROCESS FLAGSTD(H),FLAG(I,I)
Options in effect:
NOADATA
ADV
APOST
ARITH(EXTEND)
AWO
BUFSIZE(27998)
NOCICS
CODEPAGE(1140)
NOCOMPILE(E)
NOCURRENCY
DATA(31)
NODATEPROC
NODBCS
NODECK
DIAGTRUNC
NODLL
NODUMP
DYNAM
NOEXIT
NOEXPORTALL
FASTSRT
FLAG(I,I)
FLAGSTD(H)
INTDATE(LILIAN)
LANGUAGE(EN)
LIB
LINECOUNT(60)
NOLIST
MAP
NONAME
NSYMBOL(DBCS)
NONUMBER
NUMPROC(NOPFD)
OBJECT
OFFSET
OPTIMIZE(FULL)
OUTDD(SYSOUT)
PGMNAME(COMPAT)
NORENT
RMODE(ANY)
NOSEQUENCE
SIZE(MAX)
SOURCE
SPACE(1)
NOSQL
NOSSRANGE
TERM
NOTEST
NOTHREAD
TRUNC(OPT)
NOVBREF
NOWORD
XREF(FULL)
YEARWINDOW(1900)
ZWB
PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1 HELLO3
Date
01
LineID PL SL
----+-*A-1-B--+----2----+----3----+----4----+----5----+----6---
000001 IDENTIFICATION DIVISION.
000002 PROGRAM-ID. HELLO3.
000003 ENVIRONMENT DIVISION.
000004 DATA DIVISION.
000005 WORKING-STORAGE SECTION.
000006 01 A.
000007 05 B.
000008 10 C PIC X.
000009 04 D.
=>000009.12 IGYDS8190 Non-standard level numbers: nonconforming
nonstandard,
ANS/ISO 1985.
000010 05 E PIC X.
000011 PROCEDURE DIVISION.
000012 0000.
000013 DISPLAY 'HELLO WORLD'.
000014 PERFORM 1234.
000015 GOBACK.
=>000015.12 IGYPS8193 "GOBACK" statement: nonconforming nonstandard,
IBM exte
1985.
000016 1234.
000017 DISPLAY 'THIS IS PARAGRAPH 1234.'.
TGT LOCATED AT 0002F0 FOR 00000144 BYTES
SPEC-REG LOCATED AT 000438 FOR 00000008 BYTES
DSA WILL BE ALLOCATED FOR 00000148 BYTES
PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1 HELLO3
Date
01
Line.Col Code FIPS message text
IGYSC8208 "APOST" compiler option: nonconforming
nonstandard,
IBM e
IGYSC8292 "FASTSRT" compiler option: nonconforming
nonstandard, IBM
IGYSC8227 "TRUNC(OPT)" compiler option: nonconforming
nonstandard,
9.12 IGYDS8190 Non-standard level numbers: nonconforming
nonstandard, IB
15.12 IGYPS8193 "GOBACK" statement: nonconforming nonstandard,
IBM
extens
FIPS Messages Total Standard Nonstandard Obsolete
5 0 5 0
* Statistics for COBOL program HELLO3:
* Source records = 17
* Data Division statements = 5
* Procedure Division statements = 4
End of compilation 1, program HELLO3, highest severity 0.
Return code 0
Wow, that was five warnings for a COBOL program of only 17 lines.
APOST has been the IBM style for decades. Double-quotes still look
odd to me. FASTSRT doesn't affect me, because I rarely use internal
sort. TRUNC(OPT) is convenient for my purposes. GOBACK has long been
common in IBM shops. And of course the non-standard level numbers get
a warning, but the program compiles and should execute cleanly.
Bill, does this answer your question?
With kindest regards,
--
http://arnold.trembley.home.att.net/
| |
| William M. Klein 2006-01-24, 3:55 am |
| Thanks Arnold.
FYI,
Both "APOST" and "GOBACK" are included as valid in the '02 Standard.
Well, APOST isn't QUITE standard.
It is "standard" to allow alphanumeric literals to be bounded by a "single
quote" (aka APOST).
However, the QUOTE figurative constant is STILL supposed to be a quotation
mark (unlike what IBM does with APOST specified).
P.S. With Enterprise COBOL, if you use the QUOTE compiler option, you can use a
"single quote" as a delimiter. This has been true since IBM COBOL for
this-and-that, as I recall.
--
Bill Klein
wmklein <at> ix.netcom.com
"Arnold Trembley" <arnold.trembley@worldnet.att.net> wrote in message
news:3WiBf.531978$zb5.453324@bgtnsc04-news.ops.worldnet.att.net...
>
>
> William M. Klein wrote:
>
> Well, I can follow instructions eventually. This might be a little more
> informative:
>
> PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1
> Invocation parameters:
> XREF(FULL),NORENT,X(FULL)
> PROCESS(CBL) statements:
> PROCESS FLAGSTD(H),FLAG(I,I)
> Options in effect:
> NOADATA
> ADV
> APOST
> ARITH(EXTEND)
> AWO
> BUFSIZE(27998)
> NOCICS
> CODEPAGE(1140)
> NOCOMPILE(E)
> NOCURRENCY
> DATA(31)
> NODATEPROC
> NODBCS
> NODECK
> DIAGTRUNC
> NODLL
> NODUMP
> DYNAM
> NOEXIT
> NOEXPORTALL
> FASTSRT
> FLAG(I,I)
> FLAGSTD(H)
> INTDATE(LILIAN)
> LANGUAGE(EN)
> LIB
> LINECOUNT(60)
> NOLIST
> MAP
> NONAME
> NSYMBOL(DBCS)
> NONUMBER
> NUMPROC(NOPFD)
> OBJECT
> OFFSET
> OPTIMIZE(FULL)
> OUTDD(SYSOUT)
> PGMNAME(COMPAT)
> NORENT
> RMODE(ANY)
> NOSEQUENCE
> SIZE(MAX)
> SOURCE
> SPACE(1)
> NOSQL
> NOSSRANGE
> TERM
> NOTEST
> NOTHREAD
> TRUNC(OPT)
> NOVBREF
> NOWORD
> XREF(FULL)
> YEARWINDOW(1900)
> ZWB
> PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1 HELLO3 Date
> 01
> LineID PL SL
> ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6---
> 000001 IDENTIFICATION DIVISION.
> 000002 PROGRAM-ID. HELLO3.
> 000003 ENVIRONMENT DIVISION.
> 000004 DATA DIVISION.
> 000005 WORKING-STORAGE SECTION.
> 000006 01 A.
> 000007 05 B.
> 000008 10 C PIC X.
> 000009 04 D.
>
> =>000009.12 IGYDS8190 Non-standard level numbers: nonconforming
> nonstandard,
> ANS/ISO 1985.
>
> 000010 05 E PIC X.
> 000011 PROCEDURE DIVISION.
> 000012 0000.
> 000013 DISPLAY 'HELLO WORLD'.
> 000014 PERFORM 1234.
> 000015 GOBACK.
>
> =>000015.12 IGYPS8193 "GOBACK" statement: nonconforming nonstandard,
> IBM exte
> 1985.
>
> 000016 1234.
> 000017 DISPLAY 'THIS IS PARAGRAPH 1234.'.
>
> TGT LOCATED AT 0002F0 FOR 00000144 BYTES
> SPEC-REG LOCATED AT 000438 FOR 00000008 BYTES
> DSA WILL BE ALLOCATED FOR 00000148 BYTES
> PP 5655-G53 IBM Enterprise COBOL for z/OS 3.3.1 HELLO3 Date
> 01
> Line.Col Code FIPS message text
>
> IGYSC8208 "APOST" compiler option: nonconforming nonstandard,
> IBM e
>
> IGYSC8292 "FASTSRT" compiler option: nonconforming
> nonstandard, IBM
>
> IGYSC8227 "TRUNC(OPT)" compiler option: nonconforming
> nonstandard,
>
> 9.12 IGYDS8190 Non-standard level numbers: nonconforming
> nonstandard, IB
>
> 15.12 IGYPS8193 "GOBACK" statement: nonconforming nonstandard, IBM
> extens
> FIPS Messages Total Standard Nonstandard Obsolete
> 5 0 5 0
> * Statistics for COBOL program HELLO3:
> * Source records = 17
> * Data Division statements = 5
> * Procedure Division statements = 4
> End of compilation 1, program HELLO3, highest severity 0.
> Return code 0
>
> Wow, that was five warnings for a COBOL program of only 17 lines. APOST has
> been the IBM style for decades. Double-quotes still look odd to me. FASTSRT
> doesn't affect me, because I rarely use internal sort. TRUNC(OPT) is
> convenient for my purposes. GOBACK has long been common in IBM shops. And of
> course the non-standard level numbers get a warning, but the program compiles
> and should execute cleanly.
>
> Bill, does this answer your question?
>
> With kindest regards,
>
>
> --
> http://arnold.trembley.home.att.net/
>
|
|
|
|
|