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

CSV versus cobol copybook


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 03, 2012 4:22 pm
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

Senior Member


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

PostPosted: Tue Apr 03, 2012 5:24 pm
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

Superior Member


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

PostPosted: Tue Apr 03, 2012 6:09 pm
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

Superior Member


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

PostPosted: Tue Apr 03, 2012 6:18 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top