z/OS IGYWCL removing/ignoring periods and line breaks



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

z/OS IGYWCL removing/ignoring periods and line breaks

Postby bellmar » Sat Jul 07, 2018 4:33 am

I have the following COBOL program for Muller's recession:
https://drive.google.com/file/d/1sNhXcrCicnuTD1mxmoO1BcncRo9lSrsw/view?usp=sharing

Compiles and runs fine in GnuCOBOL, but I wanted to try it on z/OS. When I run a foreground job to compile it I get a series of errors that seem to suggest the compiler is ignoring line breaks and treating periods like non-COBOL valid characters. It seems to think the Program-ID section is on line 1 when it's on line 2 (for example)

https://drive.google.com/file/d/1CQ6Z_yhizxWRduUqrRpThFaRP78brS_0/view?usp=sharing

Any ideas?
bellmar
 
Posts: 4
Joined: Sat Jul 07, 2018 4:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: z/OS IGYWCL removing/ignoring periods and line breaks

Postby NicC » Sat Jul 07, 2018 4:54 am

How did you transfer the source code to the mainframe? It looks like whatever transferred the data did not remove the crlf (which is not used on the mainframe).
Why could you not simply cut and paste the stuff on those links into your post? Many people will not look at those links because they may not be allowed by their company's firewall or in case there is a virus or similar.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: z/OS IGYWCL removing/ignoring periods and line breaks

Postby bellmar » Sat Jul 07, 2018 5:09 am

It's a short program so I just retyped it into ISPF after I had created the data set.
bellmar
 
Posts: 4
Joined: Sat Jul 07, 2018 4:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: z/OS IGYWCL removing/ignoring periods and line breaks

Postby NicC » Sat Jul 07, 2018 3:53 pm

What are the data set characteristics? Do they conform to what the compiler expects as documented?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: z/OS IGYWCL removing/ignoring periods and line breaks

Postby bellmar » Sat Jul 07, 2018 5:33 pm

HA! Well to be honest I spent close to a week trying to find any documentation at all on what the characteristics of a data set should be for COBOL programs and came up with nothing.... so if you know of one that would be appreciated.

Otherwise, these are the characteristics I used working from this tutorial https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.ikjp100/pds.htm and adjusting to account for COBOL's 80 columns fixed width.

Volume serial : JASYS1
Device type: 3390
Organization: PO
Record format: VB
Record length: 80
Block size: 4000
1st extent blocks: 72
Secondary blocks: 20
bellmar
 
Posts: 4
Joined: Sat Jul 07, 2018 4:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: z/OS IGYWCL removing/ignoring periods and line breaks

Postby Robert Sample » Sat Jul 07, 2018 5:44 pm

The Enterprise COBOL documentation can be found at https://www-01.ibm.com/support/docview.wss?uid=swg27036733Bookmark this site and refer to as needed.

COBOL does not use a "80 columns fixed width" as your post indicates. COBOL uses columns 1 through 72 for specific purposes; traditionally (since punch cards were 80 columns and the length carried over) COBOL data sets are RECFM=FB,LRECL=80,BLKSIZE=(some multiple of 80). As long as columns 1 through 72 are available, I don't think the compiler cares if records are variable or fixed length. However, check your profile for your data set -- COBOL source code CANNOT be packed; if your ISPF profile specifies packed then that could cause the issue you had.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: z/OS IGYWCL removing/ignoring periods and line breaks

Postby bellmar » Sat Jul 07, 2018 5:47 pm

Okay I moved the program from a data set with a record type of VB to a data set with a record type of FB and that seemed to do the trick. It's compiling without errors now!
bellmar
 
Posts: 4
Joined: Sat Jul 07, 2018 4:13 am
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post