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
 

 

How to check a underscore occurence in a field of 3 length.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
krishna_ragav

New User


Joined: 29 Oct 2010
Posts: 10
Location: Chennai

PostPosted: Thu Mar 29, 2012 3:44 pm    Post subject: How to check a underscore occurence in a field of 3 length.
Reply with quote

Hi all,

I have a field

Field1 W 03 A

There may be a case that Field1 contains

Field1 = '_XX' or
Field1 = 'XX_' or
Field1 = 'X_X' or
Field1 = '___' or
Field1 = 'X__' or
Field1 = '__X' or
Field1 = 'ABC'

X can be spaces. ABC is a valid value.

I have to check a condition where Field1 may consist of underscore in any of 3 position. That is i have to perform something in first 6 situations when Field1 contains underscore.

How to check it in easytrieve. Please help.

Thanks in advance.
Ashirwad
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2429
Location: Netherlands, Amstelveen

PostPosted: Thu Mar 29, 2012 4:15 pm    Post subject:
Reply with quote

What did you try yourself. It could be done by indexing or redefines.
Everything can be found in the manual. Or do you want me to write your code?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7307

PostPosted: Thu Mar 29, 2012 7:20 pm    Post subject: Reply to: How to check a underscore occurence in a field of
Reply with quote

To add to Peter's advice, and you'll probably still have to look at the manual, so make sure you cover everything...

I would do this by defining an "instream table" with the possible values for your combinations of space and underscore.

To check for one of those values, you'd "search" the table. If present on the table, then you have your condition for processing the field with underscores.

Read the manual. Code it up. Run it. If you can't get it to work, post the code and the evidence of the problem. Explain how else you could do it from your reading of the manual...
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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