Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Query to remove "comma" in a sort parm.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Yugaswaroopini

New User


Joined: 21 Dec 2007
Posts: 10
Location: India

PostPosted: Fri Dec 19, 2008 12:27 pm    Post subject: Query to remove "comma" in a sort parm.
Reply with quote

Hi All,

My input file has a name field which includes first name, middle name and last name which are separated by "commas(,)".. Please find below for details.
Input file:
**************************
PARIS, AND LILLIAN, et al
MS, AND CARRIE,
SIVAKS, ,
**************************

If there is no middle name and last name, my output file populates the name field as follows.

**************************
CLIENT NAME: SIVAKS, ,
**************************

My question - is there a way to suppress the "comma" in the ouput file??
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Dec 19, 2008 12:34 pm    Post subject:
Reply with quote

Hello,

Sure. Before you can implement somethng to supress some/all of the commas, the rules must be understood.

You need to set down which commas are to be deleted and which ones are to be retained. Once all of the rules are understood, code can be developed.

As you build "code" for your reuirement, people here will be able to help when there are questions.
Back to top
View user's profile Send private message
Yugaswaroopini

New User


Joined: 21 Dec 2007
Posts: 10
Location: India

PostPosted: Fri Dec 19, 2008 1:37 pm    Post subject:
Reply with quote

Hi,

My expected result should be as follows:

**************************
CLIENT NAME:PARIS, AND LILLIAN, et al
CLIENT NAME:MS, AND CARRIE
CLIENT NAME:SIVAKS
**************************
As per the program logic, a comma is inserted after the first name and before the third name.

->If second name and third name are spaces, there are two commas inserted in the output which needs to be removed in the succeeding sort program.
-> If the third name is spaces, the is a comma inserted after the second name which must be removed in the succeeding sort program.

Note: The name field is of length 150 which includes the first name, second name and last name.

Thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Fri Dec 19, 2008 2:51 pm    Post subject:
Reply with quote

Yugaswaroopini,

I think you can handle this in your program itself rather than doing another pass in SORT to remove the commas. Check the middle names/last names for spaces and process accordingly.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us