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 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: 2442
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: 7315

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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm

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