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
 

 

CSV versus cobol copybook

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
zacharti

New User


Joined: 15 Jun 2006
Posts: 13

PostPosted: Tue Apr 03, 2012 5:55 am    Post subject: CSV versus cobol copybook
Reply with quote

Hi,

I have a architect question

My online cobol program currently receives the data in cobol copybook format. Where ESB (Enterprise service bus ) converts XML to COBOl copybook format. We are having a redesign on the data and there is an argument whether data from ESB should come in CSV format versus COBOL Copybook. Can anyone help me understand the pros and cons of each of the format, as to me I think COBOl copybook format is easier to understand versus CSV. Please advise.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Apr 03, 2012 4:22 pm    Post subject: Reply to: CSV versus cobol copybook
Reply with quote

Why doesn't the designer work out how the fewest conversions from one format to another will be carried out, and compare that with the processing necessary for the to/from conversion.

I'd find it unlikely that CSV would be a good way to hold the data for mainframe processing, as you would have considerable code running to convert and after updating reconvert back to a CSV, and you'd be doing that in each mainframe program that was processing a record.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 964
Location: Richmond, Virginia

PostPosted: Tue Apr 03, 2012 5:24 pm    Post subject:
Reply with quote

CSV is certainly harder for humans to read, as we need to know exactly how many delimiters precede a datum to know what it is.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 03, 2012 6:09 pm    Post subject:
Reply with quote

As they say, if a machine is working fine, don't distrub it. Said that, if you already have a system using COBOL-coybook formats -- what do you gain using CSV? If the 'system' is still to produce the "same" output, why there is a discussion about CSV, at first place?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Apr 03, 2012 6:18 pm    Post subject:
Reply with quote

I just read your post again and possibly this is the answer of what I've asked for
Quote:
redesign on the data
. I'll vote in to use cobol-copybook.

As Bill indicates, if you use CSV - either you change every program to deal with new CSV format or you write-up new program to convert it to in acceptable format by the existing code. Unless, those CSV data-files have some other business significance, which is not told here, the answer is same - use copybooks.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Apr 03, 2012 6:47 pm    Post subject:
Reply with quote

The biggest headache that come in to play is that when the copybooks change (and they do) you have to rebuild the XML/JAVA/other code to put it in the right positions.

The JAVA kids don't want to be tied to the mainframe schedules. And the change control stuff is never really integrated anyway, so it becomes something someone has to remember to do.

My opinion is that you may want to create some middleware programs on the mainframe side to read in the data and convert it to copybook format. This gives you a single point to maintain when the formats change. it also gives you some isolation between the outside world and the mainframe.

You may even consider letting them send in XML. That way, you can watch the same XSD they are using to see if it changes. better yet, take ownership of the XSD and you won't ever get surprised. Yes, the overhead is a lot higher, but the maintainability goes up quite a bit.
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Thu Apr 12, 2012 8:12 am    Post subject:
Reply with quote

Or just write java code to parse the copybooks and map the file, voila easy peasy. First time I wrote that code it was in C, I've written at least twice more for other companies.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


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