View previous topic :: View next topic
|
Author |
Message |
balajikarthikeyan
New User
Joined: 26 Feb 2008 Posts: 1 Location: Chennai
|
|
|
|
Hi,
I need to write a rexx tool to open a file in a specified format. I mean, I have the copybook of a dataset , and the dataset, now i need to design a tool, which will take the dataset and the copybook, and then open it against that layout as a dataset. Something like what file-aid does. Can anyone suggest how do i go about it?
Thanks. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Search the forums for "REXX AND COPYBOOK". Your's isn't the first time this issue has been raised. I don't recall anyone offering a specific solution, but maybe you'll get some ideas for a starting point. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
/rant on
Let me make a general point ...
Suddenly somebody wakes up with the need to build a tool
the specifications are not clear, maybe they are, or at least they are expressed in a confusing way
but this somebody does not have the slightest idea on how to satisfy this need
tool writers should be aware that it takes more skill, research, ingenuity, creativity,
to write a tool than to write a plain stupid application program
the technologies implied are a much wider set than those used in plain application programming
/rant off
I do not see any problem at all
1- write a parser for the copy book in order to provide the appropriate mapping ( offset, lenght, type, output format )
-- the parser could be a hand written parser or could be build by using a freely available parser/generator
-- check the family of yacc/bison parser in their different flavors
-- there are variants which generate parsers written in c or java
-- but then You would have to learn how to write a grammar for such tools
-- You are lucky, here is a cobol grammar ready made...
-- http://www.cs.vu.nl/grammars/vs-cobol-ii/
-- the parser should also take into account different mappings due to different record types
-- if You feel more comfortable in handling xml then You might just take a look at.....
-- http://sourceforge.net/projects/cb2xml/
2- read the dataset, applying to each record the appropriate mapping and output formatting
3- display the output record using an Ispf panel providing vertical and horizontal scrolling
4- ....
99999- .....
et voila le jeux sont fait
at the end it will be cheaper to satisfy this compelling need by just buying a proper third party tool |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
The first requirement would be several years of experience working in REXX. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
The first requirement would be several years of experience working in REXX. |
And maybe some amount of experience working on a cobol or cobol-like compiler. . . |
|
Back to top |
|
|
|