# Need to set an environment variable in COBOL using net express 5.0



## Percey (Jul 3, 2007)

Hello.

I'm having some problems with a perform statement in COBOL. I keep getting an error that says "154 PERFORM nested too deeply". This is an odd error because the perform statement isn't nested whatsoever. It's right in my procedure division, not nested within any other perform.

I've done some research and apparently I've run out of stack space.... ...and need to set an environment variable called cobsw...

the command runs as 

```
SET COBSW=/s12000
```
...where do I put it...ive tried in the environment division but with no luck


----------



## Chicon (Jul 29, 2004)

Hi Percy,

According to the documentation related to the error you may find on this site, you have a *GO TO* statement inside the *PERFORM* routine and it jumps to a label outside the routine.



> This error usually results if you have used GO TO to jump out of the range of a PERFORM rather than to jump to an EXIT statement at the end of its range.


----------



## Percey (Jul 3, 2007)

yeah i looked at that site...I have no GO TO's...I have to avoid those because if I used them my prof. would destroy me for breaking college standards


----------



## Chicon (Jul 29, 2004)

Percey said:


> yeah i looked at that site...I have no GO TO's...I have to avoid those because if I used them my prof. would destroy me for breaking college standards


Nice, you've a good teacher.


----------



## Percey (Jul 3, 2007)

ha, actually she's atrocious... She just tells us what do to and we have to learn it from the book and other classmates lol...


----------



## BDACBT (Oct 13, 2007)

Percey said:


> ha, actually she's atrocious... She just tells us what do to and we have to learn it from the book and other classmates lol...


As an instructor of mine use to say as crap hit the fan, "Welcome to the real world.". I don't think a CS instructor can teach HOW to program. Basically just there to teach good practices and answer questions. If it's any consolation, once you can program well in one language, learning another language is MUCH easier. You're just learning syntax after the 1st one.


----------

