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

How to find Length of data for perticuler field in a file?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
babu_hi

New User


Joined: 11 Apr 2006
Posts: 93

PostPosted: Thu Dec 28, 2006 7:11 pm
Reply with quote

I have a file with 4 fields Like Empid(6),lastmane(10),salary(10),city(12),now i want to find length of each employee lastname?How can i do it?

If i code Length(lastname) it will work?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Dec 28, 2006 7:15 pm
Reply with quote

Found this
Quote:
mmwife wrote:
You can try something like this:
Code:
INSPECT FUNCTION REVERSE(TEXT1) TALLYING L FOR LEADING SPACES
COMPUTE L = LENGTH OF TEXT1 - L
here http://www.ibmmainframes.com/posting.php?mode=quote&p=56082
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
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
Search our Forums:

Back to Top