Question

how can I map Cobol programs?

Asked by: cgdalex

Hello! I'm working in the migration project where I convert Cobol programs into SAS programs. I would like to know if anyone knows about a method less tedious to migrate Cobol programs. I'm currently using the Excel to map programs (files, tables). But I think is there another tool to do it. Any ideas? Thanks!!!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-11 at 08:48:32ID24802834
Tags

Cobol

Topics

COBOL Programming Language

,

SAS

Participating Experts
2
Points
500
Comments
2

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Cobol Q - nesting
    hi experts, problem 2 (day 1 - pretty good) I got a little program that holds these 'programs'. MenuBib.cbl (this it the head menu) Menuoptions : 1. Members 2. Books MenuMemb.cbl Menuoptions: 1. Add 2. Delete 3. End MenuBook.cbl Menuoptions 1. Add 2. Delete 3. End if ...
  2. How to map XML to COBOL (or flat-file) format?
    Dear XML Experts, What is the best way to map XML to a flat file readable by COBOL? Please don't worry about the "COBOL" part too much. Basically all I need to do is write out one fixed-length string containing fixed-length fields. Then I can pass the string to ...
  3. install soft font from cobol program
    I would like to download and install a soft font from a COBOL program. Has anyone done this?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: billprewPosted on 2009-10-11 at 10:21:54ID: 25546592

I don't know of a tool specific to SAS, and this suggestion may not work for you, but figured I'd share just in case.  A while back I was "mapping" some of the data definitions embedded in old COBOL programs to some import specifications for SQL and came across the utility below.  It's old and not perfect, but it still saved me some time.

http://www.flexus.com/ftp/cobfd.zip

(attaching the doc file...)

~bp

                Tal Systems' COBOL FD Analyzer - COBFD
                         Version 1.50 August 1999
                   by Michael Mattias dba Tal Systems
 
COBFD is a tool for COBOL programmers. Very simply, what it does is parse
a COBOL source file (either a copylib or complete source), identifies all
group and  elementary data items, then breaks down all '01' and subordinate
group items into their components and produces a report file showing the
size in bytes and the offset within the '01' record of every subordinate
data item. All group and elementary data items are included. The user has
an option to include the input file in the report output (follows analysis).
 
COBFD supports all levels of REDEFINES and OCCURS: REDEFINES which OCCUR,
OCCURS which OCCUR while REDEFINE'ing an item which OCCURS; OCCUR'ing
group items with mixed data types. These are typically the greatest
challenges to counting bytes "by hand".
 
COBFD runs on MS-DOS and compatible PC's and requires DOS 2.0 or higher.
It will run in a DOS session under Windows(r).It is a single user 
program; there is no provision for sharing files, but the program has 
been run on a network.
 
The program creates and deletes an internal workfile, COBFD@@.WRK, in
the  user's current directory.
 
Both the input and output files are user-specified at run time. The output
file is 80 bytes per record, formatted, with page headers (all text).
The user must provide a file viewer/printer for screen or printed output.
 
COBFD is not intended as a general-user-community product. It is provided
for COBOL programmers who have a need for detailed offset information about
datanames. Typical uses include writing reports in SyncSort, checking data
during conversions and adding new REDEFINES datanames into existing software.
 
It is also intended as advertising for the author.
 
To use the COBFD program interactively:
 
   COBFD <Enter>
 
You will be given a screen with boxes for input file and output file.
(The mouse is not enabled on this screen).
 
For the input file, the user may simply type the name of the input file.
Drive and/or path may be included in the filename. Pressing ALT+D will
bring up a pickbox of files; while in the pickbox, the user may "navigate"
directories by pressing <Enter> or clicking the mouse on a highlighted
directory entry.  The user's "current" directory is unaffected.
 
The user must type the name of the output file; drive and/or path are optional.
 
Processing is initiated by pressing F10. A brief "Processing" message is
displayed. 
 
After a source file is processed, the user will be asked if he wants to
do another file; if yes, the input and output files must be reentered.
 
The output file is always opened "new" and will erase any previous file
with that name. The presence of an existing file with the same name as
the user output file is NOT CHECKED.  To append to an existing output
file, you must run in command mode.
 
To use the COBFD program from the command line or in a batch file, enter
four parameters separated by semicolons, commas or spaces:
 
[drive]:[path]COBFD SourceFile;OutputFile;IncludeSource;Append;CompStorage
 
SourceFile     = Cobol input file, drive/path optional 
OutputFile     = Disk File for report, drive/path optional
IncludeSource  = Y or N (any other character is an error)
Append         = Y will append the report to the specified output file 
                 if found, or create a new output file if not found.
                 N will always open the report file OUTPUT, erasing
                 any previous report file.
CompStorage    = Used for COMP, COMP-4 and COMP-5 only. B is byte storage;
                 storage is based on the minimum bumber of whole bytes
                 required. W is Word storage; data sizes are rounded 
                 up to the next 2, 4 or 8 bytes.
                 For reference: IBM mainframe COBOL uses WORD storage;
                 Microfoucus Personal Cobol for MS-DOS uses BYTE storage.
                 Consult your COBOL system manual and/or compile scripts
                 for the option used with your programs.
 
                 For upgraders from versions of COBFD prior to 1.50:
                 Previous versions used BYTE storage only.
 
If drive and path are not specified, the current directory is used.
 
If any parameter is in error, COBFD exits with a return code (DOS errorlevel)
greater than zero. A return code of '8' indicates an error with the command line
 
COBFD /H   or COBFD /?
Displays the syntax for the command-line options.
 
Sample Batch files:
 
COBFD  File1.cbl;Report1.txt;Y;N;W
COBFD  File2.Cbl;Report1.txt;Y;Y:B
 
Reports on File1.cbl and file2.cbl. When doing file1.cbl, the append
option is "N" so the report file report1.txt is created new. Byte storage
is assumed.
When doing file2.cbl, the append option is "Y" so the report is appended
to file report1.txt. Word Storage for COMP items is assumed.
 
Another batch file:
 
IF exist LIBFILE.TXT del libfile.txt
FOR %%F IN (*.cbl) DO COBFD %%F;LIBFILE.TXT;Y;Y;W
 
Print one report file, LIBFILE.TXT, containing all *.cbl files in 
the current directory.(word storage)
 

What Tal Systems' COBFD COBOL FD Analyzer assumes:
 
A valid COBOL FD. If PICTURE clauses are missing or illegal, sentences are
not terminated with a period, or levels are inconsistent, the program
will return unreliable data, generally without a warning.
 
If column seven (7) of the input file is non-blank, the line is a comment.
 
All PICTURE, OCCURS, REDEFINES, USAGE DISPLAY|COMP|SIGN SEPARATE and other
COBOL keywords appear in columns 13-72 . These clauses may, however, span
multiple physical lines with comment lines interspersed. The order in which
keywords appear is immaterial. A COBOL sentence is not terminated until
a non-quoted period is found.
 
The QUOTE character is the first double-quote (") or apostrophe (') found
in a non-comment input record. The QUOTE character is redefined for each
file processed during a program run; i.e., the user can process multiple
files, some using quote and others using apostrophe as the literal delimiter.
 
A REDEFINES clause below the '01' level assumes that the area being
redefined is the same size as the redefined area. (Not an ANSI COBOL
requirement). If this is not true, the program will appear to finish
normally, but the data may be erroneous. REDEFINES is ignored at the
'01' dataname level.
 
When parsing the input file, if the first two words in a non-comment line
are PROCEDURE and DIVISION, the program stops looking for data; however,
if printing the input file, it prints the entire file.
 
RENAMES ('66-level') clauses are not supported
 
SYNC clauses are not supported.
 
PICTURE clauses containing "P" (scaled numeric) are not supported.
 
POINTER and PROCEDURE POINTER data items are not supported
 
USAGE BINARY is considered USAGE COMPUTATIONAL.
 
USAGE PACKED-DECIMAL is considered USAGE COMPUTATIONAL-3
 
COMP, COMP-4 AND COMP-5 are used for Binary integers. COMP-3 is
Binardy-coded-decimal, often called "packed."
 
Only EJECT, SKIP1, SKIP2, COPY and ++INCLUDE are recognized as
compiler directives (treated as comments). Other directives may
cause the program to insert an extra SYSTEM-GENERATED-01-DATANAME
in the output following the directive. The offset information should
not be affected unless the unsupported directive is contained within
the physical boundaries of an explicit or implicit '01' dataname.
 
No form of COPY is supported; but copylibs themselves may be analyzed.
 
If an '01' record is not found as the first COBOL data item, the system
creates one with the name SYSTEM-GENERATED-01-DATANAME. This allows the
program to be used with copylibs not containing an '01 -level' dataname.

A FEW EXTRA NOTES:
 
The mouse is enabled in the file pickoff box, but not in the input screen.
The mouse may not work under Windows 98; it appears to be sensitive to
when, if ever, an MS-DOS mouse driver is loaded during the Windows boot.
 
The file COBELEM.COB is included. This is an FD containing most of the possible
elementary numeric data types. In as much as the author does not have
access to all types of operating systems and/or COBOL compilers, he provided
this so that the user can see what the size of elementary items are. Should
some system(s) require additional numeric data types, notify the author
and they will be considered for a future release.
 
COBFD is a copyright product. It may be freely used and distributed without
payment or registration. However, it may not be distributed for monetary
consideration, either standalone or "bundled" with other utilities,
applications or instructional material without the permission of the
copyright owner.
 
Distribution to individual programmers is encouraged.
 
Copyright 1996, 1998 Michael C. Mattias dba Tal Systems, Racine WI USA.
 
HISTORY:
v 1.0  August 1996. Never released to the public.
v 1.1  September 1996. Never released to the public.
v 1.2  November 1996 (released).
v 1.21 December 1996 Fixed bug: bad offset when dataname level drops
       directly from, say, '07' to '03' and a dataname at an intervening
       level (e.g.,'05') since the last '03' had an OCCURS clause.
v 1.30 May 1997. Supports 15 character picture clauses, supports COMP at 
       the group item level, does not display each dataname, fixed bug
       I thought was fixed in 1.21, fixed limitation of 32767 maximum
       size of any data item, fixed data type of display numeric with "V"
       in PICTURE IS clause to be "numeric" rather than "numeric edited," 
       cosmetic output changes, update this document.
v 1.40 November 1998. Added support for command-line operation;
       updated this document.
v 1.41 March 1999. Added support for PACKED-DECIMAL (treated as COMP-3);
       updated this document. Not released to public pending beta tests.
v 1.50 August 1999. Added options for Byte and Word storage of COMP
       data items; minor cosmetic changes; updated this document.
 
The author would appreciate any comments, remarks, bug reports, or
desired enhancements be submitted to:
 
Michael C. Mattias dba Tal Systems
5329 Charles St. 
Racine, WI 53402-2119 USA
414-681-3895
EMail  michael.mattias@gte.net
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:

Select allOpen in new window

 

by: wigmeisterPosted on 2009-10-12 at 05:57:45ID: 25550800

For your file descriptors use COB2SAS:
http://support.sas.com/techsup/technote/ts620.html

But if you coverting lines of code from Cobol to SAS then I do not know of any software available to do it.  Reference this doc for some tips.

www2.sas.com/proceedings/sugi25/25/po/25p211.pdf

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...