Get DSN SYSTEM in a Program COBOL

IBM's flagship relational database management system
minosubb
Posts: 1
Joined: Mon Apr 25, 2022 4:16 pm
Skillset: 25 years of Mainframe
Referer: google

Get DSN SYSTEM in a Program COBOL

Postby minosubb » Mon Apr 25, 2022 4:23 pm

Hi

When i execute a program cobol in the JCL i use
//SYSTSIN DD *
DSN SYSTEM(DB2P)
RUN PROGRAM(PROGNAME) PLAN(PLANNAME)
/*

i search to find a way to get the name of the DSN Connect in the program cobol (DB2P)
but i don't see how do this.
pearhaps by using a EXEC SQL SELECT ..........END-EXEC but i don"t know whet column or function use.


thank you to anyone will help me to do this.

Thank you.

Christophe

engh
Posts: 17
Joined: Fri Jul 08, 2022 7:29 pm
Skillset: leblesmoutilabiskouti
Referer: leblesmoutilabiskouti

Re: Get DSN SYSTEM in a Program COBOL

Postby engh » Fri Jul 08, 2022 7:31 pm

Hello

Do so :

SELECT GETVARIABLE('SYSIBM.SSID') FROM SYSIBM.SYSDUMMY1

;)


  • Similar Topics
    Replies
    Views
    Last post