MAINFRAME - TIP OF THE DAY :
Q. If there is a situation, where we need to code more than 255 steps in a JOB?
A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Wed Feb 08, 2006 3:54 pm Post subject: How to get the actual storage of a cobol varibale
Im new to this group.
I have a scenario like, one varibale whose length is X(16).
Suppose if the variable has value 'IBM' means I want to get the value as 3.
Suppose if the variable has value 'MAINFRAMES' means 10 and so on......
Actually there are many ways we can do this, one way is as follows.
Use REVERSE function to reverse the string then use the INSPECT tallying
to count the number of spaces at the begining of the reversed string.
Now substring length = actual length of variable - number of spaces.
MOVE 0 TO Count
INSPECT FUNCTION REVERSE(Str) TALLYING Count
FOR LEADING SPACES
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