home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 2800
Discussions: 188,381, Posts: 2,243,477, Members: 232,610
Old June 10th, 2008, 09:05 PM   Digg it!   #1 (permalink)
Ultimate Member
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 2,792
Send a message via AIM to Rootstonian
Yo, Programming Guys

Yeah, I need a little help if possible (I know, I know, the all powerful programmer is asking for help!) ROFL

Compiling a MicroFocus COBOL program and getting a "too many subscripts" error....weird stuff.

I've recoded the program and still get error. Funny thing is, it's in a COBOL paragraph that is exactly the same as one above it (I call it based on some criteria). One goes ok, the second one bombs with that COMPILER error; note that this isn't runtime; it's a "compiler thang".


Last edited by Rootstonian : June 10th, 2008 at 09:08 PM.
Rootstonian is online now   Reply With Quote
Old June 10th, 2008, 09:12 PM     #2 (permalink)
Ultimate Member
 
Join Date: Oct 2001
Posts: 21,019
appears a 'subscript' is an array in COBOL
do you possibly have an infinite loop that is causing the array to go out of bounds?

vass0922 is online now   Reply With Quote
Old June 10th, 2008, 09:22 PM     #3 (permalink)
Ultimate Member
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 2,792
Send a message via AIM to Rootstonian
Nope...remember, this is a compiler error; the program never runs and therefore the index would not go "out of bounds". And the SAME code above it doesn't error-out.

Here is code...I call it 2 times based on a value I find...second COBOL paragraph bombs on the "COMPUTE OTH-PAY" with the "too many subscripts" error

Oh, I love my job! LOL <edit...kids, do not try this at home! >

Code:
                                                                                
           PERFORM VARYING PLAN-IDX  FROM  1  BY  1                             
              UNTIL PLAN-IDX  >  PLAN-COUNT OF PARTC                            
                                                                                
             IF PLAN-TYPE OF PLAN-DATA OF PARTC(PLAN-IDX)                       
                 = PLAN-TYPE OF APAY-DATA OF PARTC(APAY-IDX)                    
               AND COVERAGE-ELECT-ELECT OF PLAN-DATA OF PARTC(PLAN-IDX)         
               PERFORM VARYING COST-IDX  FROM  1  BY  1                         
                   UNTIL COST-IDX  >  COST-COUNT OF PARTC                       
                   IF COST-TYPE-PRICE OF PARTC(COST-IDX)                        
                       AND PLAN-TYPE OF COST-DATA OF PARTC(COST-IDX)            
                           = PLAN-TYPE OF APAY-DATA OF PARTC(APAY-IDX)          
                       AND OPTION-ID OF COST-DATA OF PARTC(COST-IDX)            
                           = OPTION-ID OF PLAN-DATA OF PARTC(PLAN-IDX)          
                                                                                
                                                                                
                           IF OTH-PAY OF PARTC(APAY-IDX) >                      
                               DEDN-AMT-B-TAX OF COST-DATA                          
                                          OF PARTC(COST-IDX)                    
                                                                                
                               COMPUTE OTH-PAY OF PARTC(APAY-IDX)               
                                   = OTH-PAY OF PARTC(APAY-IDX)                 
                                   - DEDN-AMT-B-TAX OF COST-DATA                    
                                                OF PARTC(COST-IDX)              
                                                                                
                           ELSE                                                 
                                DISPLAY ' '                                     
                                DISPLAY 'Check Medical Additional Pay'          
                                DISPLAY 'for EMPLID = ' EMPLID OF PARTC         
                                DISPLAY ' '                                     
                           END-IF                                               
                   END-IF                                                       
               END-PERFORM                                                      
             END-IF 
            END-PERFORM


Last edited by Rootstonian : June 10th, 2008 at 09:36 PM.
Rootstonian is online now   Reply With Quote
Old June 10th, 2008, 10:39 PM     #4 (permalink)
Super F@D Folder
 
Join Date: Jun 2004
Posts: 5,004
Send a message via AIM to sr71000
did you copy/paste the code? Maybe it's an issue with character encoding or non printing characters somewhere in there?
sr71000 is offline   Reply With Quote
Old June 10th, 2008, 11:06 PM     #5 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,549
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
Heh COBOL, have fun with that Unfortunately I have zero COBOL experience and hope to keep it that way.
__________________
Signatures blow hard
If your signature contains an ad of any kind, congratulations, you're on my ignore list.
jkrohn is offline   Reply With Quote
Old June 10th, 2008, 11:10 PM     #6 (permalink)
Ultimate Member
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 2,792
Send a message via AIM to Rootstonian
Oh, gee thanks, that'll be fun

Worth a look, but I'll have to FTP the program up to our mainframe and then go into it's editor and look at it in HEX....oh boy That will be a "last resort" check!!

It does have something to do with the nesting level of subscripts; I do think I've found that our compiler will handle 16 deep. I just don't see where I'm over that.

Alas, tomorrow is another day in the cube/cell. That's why I get the big bucks, right? ROFL


Hmmm...small light bulb on..."Note to Self: Dave, check out the Perform varying loops; see if those may cause the subscript nesting error..." "But, why doesn't it bomb on the first one?"
Rootstonian is online now   Reply With Quote
Old June 10th, 2008, 11:58 PM     #7 (permalink)
Ultimate Member
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 2,792
Send a message via AIM to Rootstonian
Quote:
Originally Posted by jkrohn View Post
Heh COBOL, have fun with that Unfortunately I have zero COBOL experience and hope to keep it that way.
Yeah, it was part of my first degree.

I still support a COBOL program written in 1976...believe it or NOT! LOL
Rootstonian is online now   Reply With Quote
Old June 11th, 2008, 12:40 AM     #8 (permalink)
Thaumaturge Member
 
howste's Avatar
 
Join Date: Oct 2001
Location: West Haven, Utah
Posts: 12,671
I last programmed in COBOL in the late 80's. I admire your problem, but I don't think I can help...
howste is offline   Reply With Quote
Old June 11th, 2008, 08:18 AM     #9 (permalink)
Ultimate Member
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 2,792
Send a message via AIM to Rootstonian
LOL @ HOWSTE; Yes, an "artist" does appreciate this problem
Rootstonian is online now   Reply With Quote
Old June 11th, 2008, 09:42 AM     #10 (permalink)
27
Ultimate Member
 
27's Avatar
 
Join Date: Jun 2004
Location: England
Posts: 1,377
Quote:
Originally Posted by Rootstonian View Post
Yo, Programming Guys
Shouldn't that be Yo, Programming Cats?
27 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with programming please andy1984 Webmastering and Programming 55 August 12th, 2005 11:07 AM
programming sunny22 Webmastering and Programming 44 June 19th, 2005 01:47 AM
C++ programming HELP! TechKnickle Webmastering and Programming 3 September 19th, 2004 02:49 AM
Programming quantumlight Webmastering and Programming 22 September 10th, 2004 07:38 PM
Need help with C programming Lemon[H]ead Webmastering and Programming 9 July 8th, 2002 07:57 PM

Most Active Discussions
Is It Just Me? (2887)
The United States Debt (20)
Looks like Burris will get his Sena.. (8)
I think I just killed my computer w.. (24)
Upgrading RAM (5)
hp compaq nc6000 problems (138)
Folderchat Weekday thread (439)
Antec 300 bulk purchase? (11)
Worth the upgrade?? (14)
Recent Discussions
CPU wont boot (4)
Help with an Ati Radeon HD 4850.. (26)
2nd video card (1)
special characters in quarkxpre.. (3)
Need help removing my front usb.. (2)
Genuine Broadband Connection my.. (14)
BATCH FILE WONT OPEN!!! HELP!!! (3)
New Build ( Finally ) (2)
RCA 52Inch HDTV wont turn on (1)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 09:16 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28