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
 

 

remove single quotes from input data file using JCLs

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

New User


Joined: 11 May 2013
Posts: 6
Location: canada

PostPosted: Tue Jul 02, 2013 11:13 pm    Post subject: remove single quotes from input data file using JCLs
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8121
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jul 02, 2013 11:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1771
Location: Bloomington, IL

PostPosted: Tue Jul 02, 2013 11:23 pm    Post subject:
Reply with quote

What should the output corresponding to this input look like?
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Sun Jul 07, 2013 7:50 pm    Post subject: Re: remove single quotes from input data file using JCLs
Reply with quote

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://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
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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Paasing symbolic parameter to instrea... Anirudh Anand JCL & VSAM 1 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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