Identifying COBOL load modules only
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Application Programming

#1: Identifying COBOL load modules only Author: Misha786Location: India PostPosted: Wed Oct 22, 2025 8:11 am
    —
Hello All -
I have a load library that has hundreds of load modules. Some are PL1, some are Assembler and some are COBOL. I need to find only the COBOL load modules from these hundred of load modules. Is there any specific keyword that can be searched to find only the COBOL load modules in the load library. Please let me know if there is any such thing.

Thanks,
Misha

#2:  Author: kolusuLocation: San Jose PostPosted: Sat Oct 25, 2025 8:01 am
    —
Misha786,

You can try the following

1. Use AMBLIST to list the load modules

2. Use the output of AMBLIST and check the translator Value. Here is a link to different Translator versions of COBOL. Look under Product Identifier (PID) column
https://www.ibm.com/docs/en/cobol-zos/6.5.0?topic=overview-cobol-compiler-versions-required-runtimes-support-information

This might cover most of the load modules, but you have to test out with the different load modules.

you can also add the names of the compilers based on the PID if you want in the output
Code:

//**********************************************************   
//* List the load module information                       *   
//**********************************************************   
//LISTLOAD EXEC PGM=AMBLIST                                     
//SYSLIB   DD DISP=SHR,DSN=Your.load.library             
//SYSPRINT DD DSN=&&LINFO,DISP=(,PASS),SPACE=(CYL,(300,100),RLSE)
//SYSIN    DD *                                                 
  LISTLOAD                                                     
/*                                                             
//**********************************************************   
//* Extract the cobol load module names                    *   
//**********************************************************   
//EXTRCOBL EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DISP=(OLD,DELETE),DSN=&&LINFO                     
//SORTOUT  DD SYSOUT=*,RECFM=FB                                         
//SYSIN    DD *                                                 
  OPTION COPY                                                   
  INREC IFTHEN=(WHEN=GROUP,                                     
               BEGIN=(06,12,CH,EQ,C'MEMBER NAME:'),             
                PUSH=(125:20,08)),                             
        IFTHEN=(WHEN=GROUP,                                     
               BEGIN=(12,10,CH,EQ,C'TRANSLATOR'),               
                PUSH=(135:ID=08,                               
                      145:SEQ=1),RECORDS=2)       

  OUTFIL REMOVECC,NODETAIL,                             
   INCLUDE=(145,01,CH,EQ,C'2',AND,                     
           (012,07,CH,EQ,C'5740CB1',OR,                 
            012,07,CH,EQ,C'5668958',OR,                 
            012,07,CH,EQ,C'5688197',OR,                 
            012,07,CH,EQ,C'5648A25',OR,                 
            012,07,CH,EQ,C'5655G53',OR,                 
            012,07,CH,EQ,C'5655S71',OR,                 
            012,07,CH,EQ,C'5655W32',OR,                 
            012,07,CH,EQ,C'5697ECV',OR,                 
            012,07,CH,EQ,C'5697EC6',OR,                 
            012,07,CH,EQ,C'5697V61')),                 
  SECTIONS=(125,08,                                     
  TRAILER3=(125,08,                                     
            ' | ',                                     
            012,07))                                   
/*                                                                                                             



MVSFORUMS.com -> Application Programming


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group