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: 2435
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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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