View previous topic :: View next topic
|
Author |
Message |
kumar1234
New User
Joined: 06 Nov 2007 Posts: 84 Location: bangalore
|
|
|
|
Hi All,
I am getting a soc7 error, in the program when i try to Xpediate, it is pointing to the variable as shown below
IF TOTAL-RCV-EXP-AMT-MST(1) = ZEROS
OR TOTAL-RCV-EXP-AMT-MST(2) = ZEROS
OR TOTAL-RCV-EXP-AMT-MST(3) = ZEROS
OR TOTAL-RCV-EXP-AMT-MST(4) = ZEROS
OR TOTAL-RCV-EXP-AMT-MST(5) = ZEROS
MOVE 'N' TO OT1-RCV-EXP-AMT-FLAG
ELSE
MOVE 'Y' TO OT1-RCV-EXP-AMT-FLAG
END-IF.in the procedure division.
This variable occurs 5 times in the copybk with pic s9(9)v99 comp-3.
When I try to run this program it is giving soc7, The input file for this field is showing spaces for some of the fields. Is it because of this I am getting soc7. Can anyone help me on this.This is really very important . Can anyone give me some solution to resolve this.
My input file in the jcl to run this prog having DCB=
Record format . . . : VB
Record length . . . : 940
Block size . . . . : 27260
And my output file is having DCB=
Record format . . . : FB
Record length . . . : 200
Block size . . . . : 27800
Thanks. In Advance. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Kumar,
Intialize the variable (group) before you start your actual process (start of procedure division). |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi kumar,
Quote: |
The input file for this field is showing spaces for some of the fields. Is it because of this I am getting soc7. |
Yes , U r right becoz field contain spaces thats why u r getting SOC7.
How u r populating this variables in program & As Murali suggest dont forget to initialize the variable as the first step in the program. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
If you are getting a SOC7 from fields on your INPUT file, you should not initialize. There is something very obviously wrong. Either your program defined fields are not in sync with the file (old copybook?). Take a look at the program that created this file. When you look at the input file, check for NOT NUMERIC in ALL 5 of these occurances - if not numeric, then you have the option of fixing the file and/or moving zeroes to the occurance of not numeric. Remember to check each occurance individually because if you check at the group level, you will be checking alpha-numeric. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Did you allow for the bytes at the beginning of the input file to determine record length? Are the occurances based on the length of the record? Perhaps they are at the end of the record? |
|
Back to top |
|
|
kumar1234
New User
Joined: 06 Nov 2007 Posts: 84 Location: bangalore
|
|
|
|
Thanks Sandy my problem is solved now. I had initalized with 'is not numeric' 5 times before the variable which gave me problem with soc7. And it has gone fine. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Kumar,
Thank you for posting that your problem has been resolved |
|
Back to top |
|
|
|