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
 

 

Getting the length of the input from an online screen

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Getting the length of the input from an online screen
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    Post subject:
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    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 Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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