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
 
How to do the below String handling function

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

New User


Joined: 08 May 2006
Posts: 3

PostPosted: Fri Aug 24, 2007 2:01 am    Post subject: How to do the below String handling function
Reply with quote

Hi,

I have the following requirement, any suggestions would be greatly appreciated.

Case 1:

NAME1 - <TOWN OF LANGLADE>
NAME2 - <FIRE DEPARTMENT>
NAME3 - <TOWN OF LANGLADE FIRE DEPARTMENT CLAUDIA CLERK>

Case 2:

NAME1 - <TOWN OF LANGLADE>
NAME2 - <FIRE DEPARTMENT>
NAME3 - <TOWN OF LANGLADE FIRE DEPARTMENT CLAUDIA CLERK>

Case 3:

NAME1 - <TOWN OF LANGLADE>
NAME2 - <FIRE DEPARTMENT>
NAME3 - <TOWN OF LANGLADE FIRE DEPARTMENT CLAUDIA CLERK>

My requirement is to exclude the values of NAME1 & NAME2 from NAME3 and get the string "CLAUDIA CLERK" only.

Note : 1)NAME3 may have NAME1 & NAME2 values only. In this case the output should be spaces
2)NAME3 may have either of NAME1 or NAME2.
3)NAME3 may have more than one space between the NAME1 and NAME2 values.
4)NAME3 may have more than one space between the NAME2 and the required string.


Thanks In Advance,
Dheeraj
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Aug 24, 2007 3:01 am    Post subject:
Reply with quote

Wouldn't that just be something like
unstring name3 delimited by name1 or name2 or spaces into final-area?
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 Aug 24, 2007 3:22 am    Post subject:
Reply with quote

Hello,

There is only one case visable (i only see one set of data erpeated 3 times - unless there are embedded spaces that the system automagically deleted)? If you need to show embedded blanks, using the "Code" tab near the top of the Reply panel will keep multiple spaces intact.

What is the rule if name1 and name 2 "overlap"? What if name1, name2, or both is "empty"?

How many "nodes" might any of the names contain? Is there a limit? The example shows 3 & 2.

I believe you will need a bit more code than just an unstring. . .

If you post all of the rules, we may have suggestions.
Back to top
View user's profile Send private message
glsudhir

New User


Joined: 08 May 2006
Posts: 3

PostPosted: Fri Aug 24, 2007 10:27 pm    Post subject:
Reply with quote

Hello Dick,

What is the rule if name1 and name 2 "overlap"? What if name1, name2, or both is "empty"?
Comment: No overlapping and will exist atleast one Name field

How many "nodes" might any of the names contain? Is there a limit? The example shows 3 & 2.
Comment: yes, it may have 3 or 2 or 1.

Thanks in Advance,
Dheeraj[/code]
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Aug 24, 2007 11:26 pm    Post subject:
Reply with quote

Like William said,
unstring name3 delimited by name1 or name2 or spaces into final-area
should work, maybe multiple with multiple final-areas...
Give it a try, experiment with the CLAUDIA CLERK in different positions......
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: Sat Aug 25, 2007 1:05 am    Post subject:
Reply with quote

Hello,

If name1 or name2 has a different number of embedded spaces between nodes than there are embedded spaces between the correcponding nodes in name3, i believe the unstring will not work as wanted.

As CG suggests, and as William suggested, give it a try.

We'll be here when there are questions.
Back to top
View user's profile Send private message
glsudhir

New User


Joined: 08 May 2006
Posts: 3

PostPosted: Sat Aug 25, 2007 1:19 am    Post subject:
Reply with quote

Thank you guys, I'll give a try and appreciated all, for your support and help.

Dheeraj
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm
No new posts change string before sertan string anatol DFSORT/ICETOOL 8 Tue Aug 15, 2017 5:43 pm

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