Get DSN SYSTEM in a Program COBOL



IBM's flagship relational database management system

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
minosubb
 
Posts: 1
Joined: Mon Apr 25, 2022 4:16 pm
Has thanked: 0 time
Been thanked: 0 time

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

;)
engh
 
Posts: 10
Joined: Fri Jul 08, 2022 7:29 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post