IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Extracting a file based on a copybook


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balajikarthikeyan

New User


Joined: 26 Feb 2008
Posts: 1
Location: Chennai

PostPosted: Wed Feb 27, 2008 5:14 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Feb 27, 2008 5:18 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 27, 2008 5:53 pm
Reply with quote

/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 icon_cool.gif

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 icon_razz.gif

at the end it will be cheaper to satisfy this compelling need by just buying a proper third party tool
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Feb 27, 2008 6:24 pm
Reply with quote

The first requirement would be several years of experience working in REXX.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Feb 27, 2008 11:21 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top