IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Multiple 01 level in working storage


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajfrnds

New User


Joined: 10 Oct 2006
Posts: 3

PostPosted: Wed Jul 20, 2011 6:05 pm
Reply with quote

Hi,

this is my 1st post.And i thank people in the forum a lot as it helped me with many questions that i required answer.Recently i was held up with a problem which i solved but i did not understand the logic behind it.I request you people to help me out with this.

i have a program(cobol-cics) which runs in multiple regions,i found that it works differently in different regions.Scenario is : it a menu driven program which displays various option to choose,once selected it throws the particular screen/program.We are storing the program name in WS variable and once the user selects the option on screen based on the selection(1- 10) the program is loaded and run.

Problem : in region A the selected pgm is picked and run(displays the coressponding screen),region B selected program gets lost from the variable it was stored(Wrkng Strage) and the screen throws err because no pgm name was presnt during the call.

solution :i found that the pgm name was stored in the 2nd 01 variable of WS,when i moved it to the 1st 01 variable it was working fine(the pgm name was not lost) i tried to search/find/analyse but in vain cound not understand the logic,as it was workign fine in one region and the same was not workign in another region.

working storage

exsisting -not working--
01 abc1 --
03 .
.
.
01 abc2
03 pgm name
.
.

changed --working--
01 abc2
03 pgm name
.
.
01 abc1 --
03 .
.
.

Can any one help me with the logic behind this ?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 20, 2011 7:14 pm
Reply with quote

Not much to go on.

If you are saying that all you did to fix this was put the program-name in a different place in working-storage, then I'd first think that in its existing position it was getting overwritten, and whatever is there now is being overwritten instead.

Show a bit more of the W-S. Is the program-name referenced other than in a call, either directly or at a higher group level?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 20, 2011 8:36 pm
Reply with quote

Hello,

Just as an experiment you might add a new (large) filler to the beginning of working-storage and put the other variables back in their origiinal order.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 20, 2011 8:40 pm
Reply with quote

...as part of the problem-solving task, not as your permanent fix...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 20, 2011 9:18 pm
Reply with quote

Hello,

Yup - only for problem-solving - not as a "keeper" icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 20, 2011 9:52 pm
Reply with quote

probable scenario:
  1. he will add the filler
  2. it will work
  3. he will take the filler out (WITHOUT CHANGING CODE) and it won't work
  4. he will put the filler back in and leave it.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 20, 2011 10:01 pm
Reply with quote

And later find what was causing it, because that code is not working properly, find out how much damage it has done and wish he'd fixed it now :-)
Back to top
View user's profile Send private message
rajfrnds

New User


Joined: 10 Oct 2006
Posts: 3

PostPosted: Thu Jul 21, 2011 6:11 pm
Reply with quote

hurray..solved it..tnx to bill,dick,tbz for replies..as dick said..the value was getting over written...it was due to one of the developers who had not compiled teh map used for this program..there was some modification done to the map..so wen i was receiving the values even other values were getting over ritten..so just compiled the map..and the pgm is workign fine now...thanks again..icon_smile.gif icon_smile.gif
Back to top
View user's profile Send private message
rajfrnds

New User


Joined: 10 Oct 2006
Posts: 3

PostPosted: Thu Jul 21, 2011 6:13 pm
Reply with quote

sorry..bill said.. icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 21, 2011 6:41 pm
Reply with quote

rajfrnds wrote:
sorry..bill said..

very important! thank you for clearing that up.

and congratulations for having the witherwithall to solve the problem.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 21, 2011 7:12 pm
Reply with quote

Good to hear it is working - thank you for letting us know the resolution icon_smile.gif

d
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jul 21, 2011 7:14 pm
Reply with quote

rajfrnds wrote:
hurray..solved it..tnx to bill,dick,tbz for replies..as dick said..the value was getting over written...it was due to one of the developers who had not compiled teh map used for this program..there was some modification done to the map..so wen i was receiving the values even other values were getting over ritten..so just compiled the map..and the pgm is workign fine now...thanks again..icon_smile.gif icon_smile.gif


Glad you got it. Thanks for the thanks. "tbz" is "dbz", but you were so exited you got a little mixed up?

We are hot on a problem like this because it is the sort that can be "fixed" by being swept under the carpet. Trouble is, it is bound to go mouldy and bite you back even harder at some point in the future.

Next you confirm that the problem doesn't exist in other environments up the line. You don't want a UAT query about something already fixed.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts How to load to DB2 with column level ... DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top