Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

getting problem with variable initialization.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
pravin madoori

New User


Joined: 29 Jan 2007
Posts: 25
Location: Hyderabad

PostPosted: Tue Sep 18, 2007 12:45 pm    Post subject: getting problem with variable initialization.
Reply with quote

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
View user's profile Send private message

kgumraj2

New User


Joined: 01 Aug 2007
Posts: 42
Location: Hyderabad

PostPosted: Tue Sep 18, 2007 1:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 1:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
pravin madoori

New User


Joined: 29 Jan 2007
Posts: 25
Location: Hyderabad

PostPosted: Tue Sep 18, 2007 9:04 pm    Post subject: Reply to: getting problem with variable initialization.
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Sep 18, 2007 11:35 pm    Post subject:
Reply with quote

03 BACK-CTR PIC S9(4) COMP-5 SYNC VALUE ZERO.
Is not a group entry, it is an elementary entry......
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Wed Sep 19, 2007 12:24 am    Post subject:
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Wed Sep 26, 2007 3:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us