SET LIST BY SUBSCRIPT command (COBOL)
Controls whether z/OS® Debugger displays elements in an array as they are stored in memory.
The default setting is OFF.
- ON
- Indicates that z/OS Debugger displays elements of a COBOL array as they are stored in memory.
- OFF
- Indicates that z/OS Debugger displays elements of a COBOL array ordered by element.
Usage Notes
For Enterprise COBOL for z/OS Version 5, the SET LIST BY SUBSCRIPT setting is ignored. The elements of a COBOL array are always displayed as they are stored in memory.
- You can use this command in remote debug mode.
- For the remote debugger, you cannot change the setting of
SET LIST BY SUBSCRIPTwhile monitoring expressions. If you want to change the setting ofSET LIST BY SUBSCRIPT, remove the monitored expressions from the Monitor and Variables Views.
Examples
- Assume you declare the following structure in your program:
If you monitor01 TEAM. 05 MyTeam OCCURS 3 TIMES. 10 Name. 15 LastName PIC X(20). 15 FirstName PIC X(15). 10 Phone PIC X(12). 10 IBMLab PIC X(20)TEAMby usingSET LIST BY SUBSCRIPT OFF(the default setting), z/OS Debugger displays the following output in the monitor window for the remote debugger, when you expand all values:
If you monitorTEAM MYTEAM NAME LASTNAME SUB(1) = 'Smith ' SUB(2) = 'Johnson ' SUB(3) = 'Williams ' FIRSTNAME SUB(1) = 'Eva ' SUB(2) = 'Francisco ' SUB(3) = 'Randy ' PHONE SUB(1) = '408-463-1111' SUB(2) = '408-463-2222' SUB(3) = '408-463-3333' IBMLAB SUB(1) = 'Silicon Valley Lab ' SUB(2) = 'Silicon Valley Lab ' SUB(3) = 'Lexington, Ky 'TEAMafter running theSET LIST BY SUBSCRIPT ONcommand, z/OS Debugger displays the following output in the monitor window for the remote debugger:TEAM MYTEAM MYTEAM(1) NAME LASTNAME = 'Smith ' FIRSTNAME = 'Eva ' PHONE = '408-463-1111' IBMLAB = 'Silicon Valley Lab ' MYTEAM(2) NAME LASTNAME = 'Johnson ' FIRSTNAME = 'Francisco ' PHONE = '408-463-2222' IBMLAB = 'Silicon Valley Lab ' MYTEAM(3) NAME LASTNAME = 'Williams ' FIRSTNAME = 'Randy ' PHONE = '408-463-3333' IBMLAB = 'Lexington, Ky ' Assume you declare the same structure as in the above example:
01 TEAM. 05 MyTeam OCCURS 3 TIMES. 10 Name. 15 LastName PIC X(20). 15 FirstName PIC X(15). 10 Phone PIC X(12). 10 IBMLab PIC X(20).If you issue
MONITOR LIST (TEAM)withSET LIST BY SUBSCRIPT OFF(the default setting), z/OS Debugger displays the following output in the Monitor window in MFI:MONITOR -+----1----+----2----+----3----+----4----+----5----+----6 LINE: 1 OF 19 ******************************* TOP OF MONITOR ******************************** ----+----1----+----2----+----3----+----4---- 0001 1 01 TEAM 0002 02 MYTEAM 0003 03 NAME 0004 04 LASTNAME 0005 SUB(1) 'Smith ' 0006 SUB(2) 'Johnson ' 0007 SUB(3) 'Williams ' 0008 04 FIRSTNAME 0009 SUB(1) 'Eva ' 0010 SUB(2) 'Francisco ' 0011 SUB(3) 'Randy ' 0012 03 PHONE 0013 SUB(1) '408-463-1111' 0014 SUB(2) '408-463-2222' 0015 SUB(3) '408-463-3333' 0016 03 IBMLAB 0017 SUB(1) 'Silicon Valley Lab ' 0018 SUB(2) 'Silicon Valley Lab ' 0019 SUB(3) 'Lexington, Ky ' ****************************** BOTTOM OF MONITOR ******************************If you issue
MONITOR LIST (TEAM)withSET LIST BY SUBSCRIPT ON, z/OS Debugger displays the following output in the Monitor window in MFI:MONITOR -+----1----+----2----+----3----+----4----+----5----+----6 LINE: 1 OF 20 ******************************* TOP OF MONITOR ******************************** ----+----1----+----2----+----3----+----4---- 0001 1 01 TEAM 0002 02 MYTEAM 0003 02 MYTEAM(1) 0004 03 NAME 0005 04 LASTNAME 'Smith ' 0006 04 FIRSTNAME 'Eva ' 0007 03 PHONE '408-463-1111' 0008 03 IBMLAB 'Silicon Valley Lab ' 0009 02 MYTEAM(2) 0010 03 NAME 0011 04 LASTNAME 'Johnson ' 0012 04 FIRSTNAME 'Francisco ' 0013 03 PHONE '408-463-2222' 0014 03 IBMLAB 'Silicon Valley Lab ' 0015 02 MYTEAM(3) 0016 03 NAME 0017 04 LASTNAME 'Williams ' 0018 04 FIRSTNAME 'Randy ' 0019 03 PHONE '408-463-3333' 0020 03 IBMLAB 'Lexington, Ky ' ****************************** BOTTOM OF MONITOR ******************************
