Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Indent cobol code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Renato Zangerolami

New User


Joined: 06 Dec 2019
Posts: 26
Location: Brazil

PostPosted: Thu Feb 13, 2020 12:53 am    Post subject: Indent cobol code
Reply with quote

Can anyone tell me if there is any resource where it is possible to indent Cobol code or is it necessary to create a program for that?
Back to top
View user's profile Send private message

sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 825
Location: Maryland

PostPosted: Thu Feb 13, 2020 1:13 am    Post subject:
Reply with quote

Formatting COBOL code elements

Why does COBOL have to be indented?
Back to top
View user's profile Send private message
Renato Zangerolami

New User


Joined: 06 Dec 2019
Posts: 26
Location: Brazil

PostPosted: Thu Feb 13, 2020 1:30 am    Post subject: Reply to: Indent cobol code
Reply with quote

where I work there are some rules, eg:
Pic, section, exit .. starts at column 40
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2407
Location: Hampshire, UK

PostPosted: Thu Feb 13, 2020 2:25 am    Post subject: Reply to: Indent cobol code
Reply with quote

Googling "COBOL SOURCE CODE BEAUTIFIER" gives some possible options.
Back to top
View user's profile Send private message
Renato Zangerolami

New User


Joined: 06 Dec 2019
Posts: 26
Location: Brazil

PostPosted: Thu Feb 13, 2020 2:28 am    Post subject: Reply to: Indent cobol code
Reply with quote

Thank you Nic.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1010
Location: Richmond, Virginia

PostPosted: Fri Feb 14, 2020 9:31 am    Post subject:
Reply with quote

Just a side note on indentation.

COBOL doesn't give you room to indent too much.

But when I used the PL/I Optimizing compiler (1980's and 90's, but most likely still the same), the max compiler input record length was 100, with just column 1 reserved for carriage control, so 99 characters for source code allowed for very deep indentation.

Another side note - I had an intern (rising college senior in systems engineering) working with me on one one job around 2014, and while working with text files I asked her if she knew what a carriage was. All she knew was the horse drawn vehicle. lol.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1220
Location: Vilnius, Lithuania

PostPosted: Fri Feb 14, 2020 5:12 pm    Post subject:
Reply with quote

I think Enterprise PL/I has been changed fairly recently to allow an input LRECL=200 for source. I personally don't see why it's really necessary, having been used to breaking up lines since forever.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Missing Negative sign in COBOL jzhardy COBOL Programming 0 Sat Sep 26, 2020 11:32 am
No new posts Easytrieve EZABX007 with error code 0... Carol Schablow CA Products 7 Thu Sep 24, 2020 3:30 am
No new posts COBOL reading from SYSIN jzhardy COBOL Programming 1 Mon Sep 21, 2020 2:37 pm
No new posts how to read accounting information in... jzhardy COBOL Programming 1 Mon Sep 21, 2020 9:57 am
No new posts NOT IN clause in COBOL pgm mramvivek COBOL Programming 8 Thu Aug 20, 2020 4:48 am

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us