View previous topic :: View next topic
|
Author |
Message |
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
hi
i have a field like number lenght is 8 it is numeric
i am validate the field by one by one
for example
1 field is -9999999
then using i took the first field and *-1,but
now i am getting 9999999-(minus in last files)
so its - *-1 that means i got SOC7 error
i want to avoid this one also i want to check wheater all the digits have negaive or not |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
I really have no clue what are you talking about.
Could you make ur problem statement more simpler, in that what are you doing and what do you want to do ? |
|
Back to top |
|
|
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
hi
i have the proc like this
Code: |
ZERO-FILL. PROC
IND EQ 1
IND2 EQ 1
DO WHILE IND LE 10
IF DOL(IND) EQ '-'
MOVE '-' TO DOL(1)
MOVE '0' TO DOL(IND)
DOLR EQ DOLR * -1
END-IF |
this for we are validating if the record is '-' then we will multipuly into -1
for example the values are like
Code: |
-00000000
0-0000000
00-00000
000000- |
each and every digits we are multiply with zero when we tried to
do for last digit -*-1
we got soc07 |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
what is DOLR? |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
raviprasath_kp,
It doesn't look like a COBOL Code. lets have me trial.
First thing can you confirm the length of input string. One thing I noticed here is you are running DO WHILE LOOP for 10 times but the number of digits in the input string are 9. So do you want to try making DO WHILE run for 9 times, if yes probably LT would work in place of LE.
Could you give an expected output for all the four records you shown as an input. |
|
Back to top |
|
|
toddnugen
New User
Joined: 01 Nov 2006 Posts: 9
|
|
|
|
looks like you multiply dolr field containing hyphen result sc7. |
|
Back to top |
|
|
|