Page 1 of 1

Get DSN SYSTEM in a Program COBOL

PostPosted: Mon Apr 25, 2022 4:23 pm
by minosubb
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

Re: Get DSN SYSTEM in a Program COBOL

PostPosted: Fri Jul 08, 2022 7:31 pm
by engh
Hello

Do so :

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

;)