- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help with a decision
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 04:12 PM
02-06-2002 04:12 PM
I've have heard that this place is the best. I am fairly new to Unix (less than six months) but I am fairly proficient in the shell. I have been instructed to do some major improvements to several of our financial reports. The applications are written in COBOL and I can't modify that. I am supposed to take the text output and reformat it. I know that this is too complicated to do in a shell script. I have been trying to decide between using awk or perl. Basically, the data is all there. I just need to rearrange and regroup what is already on the page and add some totals. I'm not asking for help on the reports (yet) . I just want to hear some advice on which tools to use.
TIA, Neil
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 04:22 PM
02-06-2002 04:22 PM
SolutionI'm probably not the most objective person to ask but here goes. My answer is Perl; now what's your question?
I warn you that the learning curve is steeper but in the end you wind up with a tool that is basically the best of awk, sed, tr, and grep all rolled into one. The pattern matching is better than any language I know. I like to say that it's regular expressions on steroids. There's really nothing you can do in awk that you can't do in Perl. Moreover, because Perl compiles to very efficient pcode, it will blow the doors off awk in terms of performance.
In any event, I would get the O'reilly books 'Sed and Awk' and 'Learning Perl'. Play with both and then decide.
As a bonus, most carefully written Perl scripts will run on Windows boxes as well without modification. I really like the idea of a scripting language that let's me do sockets - and yes I do bi-directional sockets in Perl in real life.
Food for thought, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 04:28 PM
02-06-2002 04:28 PM
Re: Help with a decision
I agree with Clay. Although my programming
skills are definitely not expert level perl
does have some distinct advantages over the
rest. One thing good about all of the tools
is that they all come free.....
By all means buy books, but before you do, at
least have look on the various search engines
for detail information. There are even tutorial
sites that can be found. A good starting point would be on http://www.google.com
HTH
-Michael
BTW, Clay you new hat looks great!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 05:02 PM
02-06-2002 05:02 PM
Re: Help with a decision
After you choose Perl (and you will choose Perl, right?), if you really want to make impressive reports, you could then pipe the output through a product called UnForm.
http://www.unform.com With this product, you can do some really fancy things like multiple fonts, graphics, duplex printing, colors, barcodes, etc.
You're not ready yet but I would keep this in the back of my mind to impress the powers that be. You can download a fully-functional trial version to get a feel for what this puppy can do.
More food for thought, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 06:27 PM
02-06-2002 06:27 PM
Re: Help with a decision
I'm not even going to read anyone else's responses because the clear answer is perl. With perl you can do almost anything, and for speed, you can COMPILE your perl program into a true runtime program (don't look at the source though it's NASTY). Now, as for those dirty COBol programs:
find / -type f -name "*.[Cc][Bb][Ll]" -exec rm -f {} \;
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 06:55 PM
02-06-2002 06:55 PM
Re: Help with a decision
Are you allowed to change the cobol program at all? I was thinking that you would be much better off if you could modify the cobol programs to create new output files or at least remove the following from the reports:
(1) page breaks and blank line spacing
(2) totals of any type including sub totals
(3) headings and footings
(4) column headings
If you can create new output files, think about using field separators, like the pipe symbol "|". With cobol you can do this with a "FILLER" with a value of "|". And there should be a glob move, but I haven't done cobol in 14 years.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 01:19 AM
02-07-2002 01:19 AM
Re: Help with a decision
Having been a developer for 7 years before I moved up (I like to think so) to Sys Admin, I would use the Source Database as the primary repository for the information, and generate various reports in different formats based on that data.
Have been asked recently to write a similar function, and had to push the Issue back to the Developers. The short answer was 'If it aint working properly, fix it at the source'.
Trouble is with 'temporary' fixes is that they become permanent, and UNIX Sys Admins end up taking on programmatic support issues when things go wrong.
Sorry if I rant a bit! Remember, no-one expects the Spanish Inquisition!
Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 09:01 AM
02-07-2002 09:01 AM
Re: Help with a decision
Thank you for all the replies. Ian, I can't change the COBOL source because it is a commercial product. The vendor actually distributes the package as COBOL source but we are not allowed to modify the code in any way. I wish that we could throw the entire package away but that's out of my hands.
Neil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 09:19 AM
02-07-2002 09:19 AM
Re: Help with a decision
Oh dear, situation not very rosy. I guess you will be needing Perl then.
Cheers, Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 09:49 AM
02-07-2002 09:49 AM
Re: Help with a decision
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 01:35 PM
02-07-2002 01:35 PM
Re: Help with a decision
Neil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 01:49 PM
02-07-2002 01:49 PM
Re: Help with a decision
Good choice. (Or at least the less evil choice.) Let me give you one small bit of advice. Try not to get too 'cutesy' with your Perl. You are going to find many examples that try to cram as much as possible into one line of code. That may impress other programmers but it's no fun when 6 months later you look at this stuff and ask yourself what does this do?
I do encourage you to explore the Modules at http://www.perl.org/CPAN. If you are trying to do some task, chances are that someone has already done something very similar.
Regards, Clay