MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unable to find the length of the Value in a VARIABLE

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
jyotika_anand
Beginner


Joined: 28 Nov 2005
Posts: 5
Topics: 3

PostPosted: Wed Nov 30, 2005 1:51 am    Post subject: Unable to find the length of the Value in a VARIABLE Reply with quote

Hi,

I do have an uncommon problem in finding the Length of the Value in the field. Let me explain this with an example

In the working storage I have declared a variable, like..

01 WS-FIELD-1.
03 WS-FIELD1-DATA PIC 9(6) VALUE 1234.
03 WS-FIELD1-LEN PIC 9 VALUE ZEROS.

Ideally if I use the following syntax

MOVE LENGTH OF WS-FIELD1-DATA TO WS-FIELD1-LEN,

then it should actually move the actual length of the DATA in the field instead of moving the length of the defined field. In this case, its moving

6 to WS-FIELD1-LEN instead of 4 to WS-FIELD1-LEN.

I have also tried other option of using the INSPECT with the TALLYING CAUSE, like the example below

INSPECT WS-FIELD1-DATA TALLYING WS-FIELD1-LEN FOR LEADING ZEROS.

Even the above syntax doesn't seem to solve my problem,,, Can anyone look into it and post a reply ASAP.....................

Regards,
Jyotika
Back to top
View user's profile Send private message
ANIL SARATHY
Beginner


Joined: 30 Aug 2005
Posts: 88
Topics: 3
Location: Syracuse,New york

PostPosted: Wed Nov 30, 2005 3:26 am    Post subject: Reply with quote

Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?p=21769#21769
_________________
Anil Sarathy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group