home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Yo, Programming Guys

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1647
Discussions: 200,933, Posts: 2,379,188, Members: 246,298
Old June 10th, 2008, 09:05 PM   Digg it!   #1 (permalink)
Caveat Emptor
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 3,241
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)
Not Really a Member
 
Join Date: Oct 2001
Posts: 25,385
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)
Caveat Emptor
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 3,241
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,083
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,552
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)
Caveat Emptor
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 3,241
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)
Caveat Emptor
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 3,241
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: 15,310
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)
Caveat Emptor
 
Rootstonian's Avatar
 
Join Date: Mar 2005
Location: Out of my mind
Posts: 3,241
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,407
Quote:
Originally Posted by Rootstonian View Post
Yo, Programming Guys

Shouldn't that be Yo, Programming Cats?
27 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2882)
California Passes Anti-Flat-HDTV Le.. (39)
Obama the Muslim (14)
Is the PSU I received dead? (10)
windows vista security holes (9)
Install XP pro and a Vista laptop ?.. (11)
HIS HD5770 graphic card question (15)
Print spooler problem (13)
Foreign voltage (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
EVGA 9800 gtx help with finding a g.. (8)
New Computer wont recognize XP disc (7)
Ideal cheap graph card for PC-Gamin.. (17)
Recent Discussions
Wireless Televisions. (4)
CPU fan stops spinning randomly (2)
World's largest Monopoly Game using G.. (332)
Ideal cheap graph card for PC-Gaming? (17)
BIOS won't read disk when I try to fl.. (0)
Install XP pro and a Vista laptop ?? (11)
Partition Magic caused HDD problem (2)
Graphics Card Upgrade Question (1)
favorit (1)
solutions for virtical white lines on.. (1)
Regular Build (3)
Fire in DVD (2)
Modern Warfare For the PC (33)
radeon x850xt platinum & shader 3 (3)
Have you switched yet? (84)
Wireless Router+Cable Modems and Much.. (0)
Optical Audio A-B Switch (1)
windows vista security holes (9)
The NTDVM CPU has encountered an ille.. (24)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (34)
Wireless speakers for PC? (11)
Print spooler problem (13)
Help getting around port 80 for camer.. (2)
Display shows 3x5 inch in middle of s.. (3)
monitor will not turn on at all, (1)


All times are GMT -4. The time now is 09:45 AM.
TechIMO Copyright 2009 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