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: 10210
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 Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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