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

Getting the length of the input from an online screen


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sherkhan

New User


Joined: 26 Jun 2005
Posts: 1

PostPosted: Sun Jun 26, 2005 10:43 am
Reply with quote

Hi,

i wanted to know the method of getting the length of a field entered by the user on an online screen.
For eg.
i want the user to enter 6 digits mandatory in the field. I have done the validation for numerics..but i am unable to force the user to enter 6 digits...
Can we use the lenght function on the input field?


any help will be greatly appreciated.
Thanks
Back to top
View user's profile Send private message
PLPro

New User


Joined: 19 Jul 2005
Posts: 2

PostPosted: Tue Jul 19, 2005 2:01 am
Reply with quote

DCL IN_STR CHAR(6); /* This will limit the length to NO MORE than 6 chars */

[...your code here...]

IF INDEX(IN_STR, " ")> 0 THEN DO;
/* If there's a space, there's definitely a problem. Enter code to process */
END;

/* Enter code for other validation steps */
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top