IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help on validating string cases


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top