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
 

 

Need help on validating string cases

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
srikanthdv

New User


Joined: 17 Mar 2006
Posts: 5
Location: pune

PostPosted: Sat Jul 11, 2009 1:33 pm    Post subject: Need help on validating string cases
Reply with quote

Hi guys,

Any body can help for the following request.

In the program at one situation I need to validate the following string cases in PLI.

Maximum length of the string is 200

1) If I given the single character as input value should accept.
like example 'Y' / 'N' / 'P'/ 'A' etc....

2) 'YES' / 'ABC'/ 'NO'.....should accept

For the following two conditions should throw error

3) 'Y ES' should throw error

4) 'N O' should throw error

I tried with substrings and Indexes, but unable to get the exact
results.

Thanks in advance.

Sri.....
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Jul 11, 2009 2:02 pm    Post subject:
Reply with quote

how about showing us your pseudo code.
this kind of validation is rather easier in any language.

and the rules: 'y es' is an error. is everything left justified? or is the data 'floating' anywhere within the string space.

what is the string delimiter, source of string length?
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm


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