Trying to Debug OS VS COBOL Programs



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Trying to Debug OS VS COBOL Programs

Postby ramkumar1992sp » Fri Jul 29, 2016 11:47 pm

Hello Experts,

We use CICS Explorer to debug COBOL programs at our shop.The ones that we normally do are the Enterprise COBOL programs.

Currently I'm working with OS VS COBOL programs and I feel that if I could get these programs tested via the debugger it would be faster than my manual testing.

I referenced the below document and was able to generate the EQALANGX file for my OS VS COBOL program.
https://www.ibm.com/support/knowledgece ... 1/osvs.htm

After generating the EQALANGX file,I referenced the below document and looked at some other notes too and made modifications to the run jcl as shown below and ran it,

http://www-01.ibm.com/support/docview.w ... 089&aid=13



//*                                                                
//STEP01     EXEC  PGM=MYPROG,COND=(9,EQ),TIME=1439,                
//            PARM='/TEST(,CMDS,;,TCPIP&MYIPADDRESS%PORT:*) TRAP(ON) ',
//            REGION=4M  



The program popped up on the debugger (CICS Explorer) but it was in Assembler format as shown below.

Debugger part
      0  00007000    90EC D00C       STM     R14,R12,12(R13)                    
       4  00007004    185D            LR      R5,R13                              
       6  00007006    05F0            BALR    R15,0                              
       8  00007008    4580 F010       BAL     R8,16(,R15)                        
       C  0000700C    C4D4 C9D8 E2F7  LGHRL   R13,*-1817066002                    
      12  00007012    F140 E5E2 D9F1  MVO     1506(5,R14),2545(1,R13)            
      18  00007018    0700            BCR     0,0                      
 

Can someone familiar with this process please tell what am I doing wrong here ? I have sent an email to my system programmer (who usually setup debug profiles) but he is out today and will be back on Monday.But I'm not sure if he is familiar with OS VS COBOL debugging.

Thanks,
Ram Kumar
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time

Re: Trying to Debug OS VS COBOL Programs

Postby BillyBoyo » Sat Jul 30, 2016 4:16 pm

Are you aware of the method by which the executing program is linked to the LANGX member you created? (I'm not, I'm just suggesting...)

Why, if you need to test the programs anyway, don't you just convert/compile as Enterprise COBOL?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Trying to Debug OS VS COBOL Programs

Postby ramkumar1992sp » Mon Aug 01, 2016 7:35 pm

Thanks BillyBoyo. I'm not familiar with linking langx file and the executing module.I was trying the method below that I found in the document below.I tweaked it a bit to give my IP Address and port # .

http://www-01.ibm.com/support/docview.w ... 089&aid=13

4. Run your program.
Start the program according to the program type as follows:

Program Type
Non-Language Environment
JCL EXEC

//STEP1 EXEC PGM=EQANMDBG,
// PARM='myprog,TEST(ERROR,*,;,*)/'
 


We have OS VS COBOL programs calling HLASM programs.These HLASM programs were converted to Enterprise COBOL and it seems to be working fine except for this particular step (the job has over 30 steps).We would convert all OS VS COBOL programs to Enterprise COBOL eventually but right now,I was trying to find out the issue with that particular step.

Thanks,
Ram Kumar
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time

Re: Trying to Debug OS VS COBOL Programs

Postby ramkumar1992sp » Mon Aug 01, 2016 9:31 pm

Hello,
I checked with my system programmer and was finally able to debug the OS VS COBOL programs through CICS explorer.

I had to make two changes.
1)I had to rename my LANGX file from myid.ADLAB.EQALANGX to myID.EQALANGX
2)I had to enter "LDD myprog" in the debug console This command to tells the Debug Tool that a compile
unit is a LangX COBOL compile unit and to load the debug information associated with that compile unit.


 1212  652266     IF  MSF-OFF                                                  
    1213  652523         MOVE BIN-10  TO DTF-KEY                      
    1214  652780         GO TO 0060-DISPLAY-MSG.                      
    1215  652909     MOVE KEY-01 TO MSF-KEY.                          
    1216  653037     PERFORM  0280-READ-MSF  THRU  0290-READ-MSF-EXIT.
    1217  653294     IF  CRF-XXXX-CODE  NOT =  MSF-XXXX-CODE          
    1218  653383         MOVE MSF-XXX-CODE TO PROG-NO                      
    1219  653551         MOVE BIN-21  TO DTF-KEY                                  
    1220  653808         GO TO 0060-DISPLAY-MSG.                  
 


But I do have some issues..The values in the variables look to be in hexadecimal format.I'm looking into that now.


Thanks,
Ram Kumar
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time

Re: Trying to Debug OS VS COBOL Programs

Postby Terry Heinze » Mon Aug 01, 2016 11:15 pm

I'd consider the suggestion by BillyBoyo concerning recompiling due to the following:
http://www.ibm.com/support/knowledgecen ... ch205.html
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Re: Trying to Debug OS VS COBOL Programs

Postby ramkumar1992sp » Mon Aug 01, 2016 11:34 pm

Will do Terry..Thank you..
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post