View previous topic :: View next topic
|
Author |
Message |
pravin madoori
New User
Joined: 29 Jan 2007 Posts: 25 Location: Hyderabad
|
|
|
|
I have a varible used in a program C00, which is not initialized but declared like below:
03 BACK-CTR PIC S9(4) COMP-5 SYNC. This is a cobol stmt.
One strange thig is this varible is not initialized but used in program. It's working Fine is Test system. This BACK-CTR is also used in Called program by moving it to BACK-CNT, BACK-CNT is declared like below.
03 BACK-CNT PIC X(4) value '0000'.
Call to the program is like below:
EXEC CICS LINK PROGRAM('C03') COMMAREA(BACKL-AREA)
END-EXEC .
BACKL-AREA contains BACK-CNT as a field.
In C03 program , back-count is coming as a wrong value in production but working in Test system. What can be the reason for it. We had an environment changed[ some patch was applied] in production but not in test system. is this can be the problem? |
|
Back to top |
|
|
kgumraj2
New User
Joined: 01 Aug 2007 Posts: 42 Location: Hyderabad
|
|
|
|
Hi,
the reason difference between 2 regions are
1. version incompactability
2. data issue.
In your case it might be a data issue do check that and let us know thanks. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
First, the value defined in the called program is not looked at or used since the calling program overlays the called program's definition with its own values.
The two byte binary to four byte character is bad, though with the sync clause, the difference may be only one byte.....
The test vs prod values can arise from uninitialized storage where prod storage might be "dirty" and the less active test might still be "clean".... |
|
Back to top |
|
|
pravin madoori
New User
Joined: 29 Jan 2007 Posts: 25 Location: Hyderabad
|
|
|
|
Is the below declaration correct.
03 BACK-CTR PIC S9(4) COMP-5 SYNC VALUE ZERO.
In COBOL manual i have seen below stmt. it says for Group entries we can't used Value clause if sync is used. As above stmt is not a Group entry, i assume it's a correct stmt. Can any one confirm the same pls.
From COBOL manual:For group entries, the VALUE clause must not be specified if the entry
also contains any of the following clauses: JUSTIFIED, SYNCHRONIZED, or
USAGE (other than USAGE DISPLAY). |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
03 BACK-CTR PIC S9(4) COMP-5 SYNC VALUE ZERO.
Is not a group entry, it is an elementary entry...... |
|
Back to top |
|
|
Earl
Active User
Joined: 17 Jun 2007 Posts: 148 Location: oklahoma
|
|
|
|
please give example of BACKL-AREA in BOTH programs.
You will need to change 1 or both programs to have same field description. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
COMP-5 fields are binary, which means they can have any value between LOW-VALUES and HIGH-VALUES.
If the field is not initialized and contains garbage, for example, "0C3A", the COBOL program will still interpret this as a valid COMP-5 number (3130 in decimal). |
|
Back to top |
|
|
|