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
 

 

Multiple 01 level in working storage

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Multiple 01 level in working storage
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jul 20, 2011 7:14 pm    Post subject:
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

Site Director


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

PostPosted: Wed Jul 20, 2011 8:36 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jul 20, 2011 8:40 pm    Post subject: Reply to: multiple 01 level in working storage-data not gett
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

Site Director


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

PostPosted: Wed Jul 20, 2011 9:18 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jul 20, 2011 10:01 pm    Post subject: Reply to: multiple 01 level in working storage-data not gett
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    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Jul 21, 2011 7:12 pm    Post subject: Reply to: multiple 01 level in working storage-data not gett
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Jul 21, 2011 7:14 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SCRNAME not working on my mainframe? mrsidhu12 TSO/ISPF 7 Thu Sep 01, 2016 2:17 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Multiple parameters Csongor All Other Mainframe Topics 16 Thu Jun 09, 2016 7:54 pm


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