View previous topic :: View next topic
|
Author |
Message |
bashir ahmad
New User
Joined: 11 May 2013 Posts: 6 Location: canada
|
|
|
|
I'm getting data fro user throgh EXCEL sheet. every field is in single quote. some fields had comma also with in text. comma is after every field. e.g
'abcd','main, area','23456','','','abcdef,klm'
I want to handle thsi through JCL or cobol program only in mainframe.
Can anyone has solution??? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
1. JCL cannot handle this. JCL does nothing but execute programs. If you had wanted to do this with SORT or IEBGENER or one of the other utility programs that can be executed with JCL, that may have been possible.
2. COBOL can handle the data although you may have to use reference modification since there are commas in the data as well as being used as delimiters. Find a quote mark and everything until the next quote mark belongs to the data variable you are handling. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
What should the output corresponding to this input look like? |
|
Back to top |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
Assuming 'through JCL' means with JCL and commonly installed utility programs, and you have dfsort installed, I suggest you skim through srttrck.pdf from ftp.software.ibm.com/storage/dfsort/mvs/
In particular look for 'findrep', how to process delimited files, and how to process variable width files.
I also wrote a cobol program to do this but find that often dfsort is more appropriate.
bashir ahmad wrote: |
I'm getting data fro user throgh EXCEL sheet. every field is in single quote. some fields had comma also with in text. comma is after every field. e.g
'abcd','main, area','23456','','','abcdef,klm'
I want to handle thsi through JCL or cobol program only in mainframe.
Can anyone has solution??? |
|
|
Back to top |
|
|
|