Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Extracting a file based on a copybook

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Extracting a file based on a copybook
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

Moderator Team Head


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

PostPosted: Wed Feb 27, 2008 5:18 pm    Post subject: Reply to: Extracting a file based on a copybook
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10257
Location: italy

PostPosted: Wed Feb 27, 2008 5:53 pm    Post subject: Reply to: Extracting a file based on a copybook
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    Post subject:
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

Site Director


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

PostPosted: Wed Feb 27, 2008 11:21 pm    Post subject: Reply to: Extracting a file based on a copybook
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us