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 COBOL sorting, with input GDG base COBOL Programming 7
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts Reflection 3270 screen shows only 23 ... Compuware & Other Tools 6
No new posts Get RECORD LENGTH, allocated space of... CLIST & REXX 7
No new posts Check if CICS is online in JCL CICS 10
Search our Forums:

Back to Top