View previous topic :: View next topic |
Author |
Message |
shuko Beginner
Joined: 08 Nov 2005 Posts: 73 Topics: 20
|
Posted: Wed Aug 29, 2007 6:26 am Post subject: cobol to get dsname using ddname |
|
|
Is it possible using cobol code to get the DSN from a jcl using the DDNAME. I know this is possible in REXX, is there a possibility to do this in COBOL without calling an external REXX |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12383 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
shuko Beginner
Joined: 08 Nov 2005 Posts: 73 Topics: 20
|
Posted: Mon Sep 03, 2007 8:29 am Post subject: |
|
|
Phantom
I copied your cobol program GETDSN to get the dataset name.
I had compile error in line "SWA-V-ADDR" was not defined as a data-name so I commented out this line
in code and added a display after END EVALUATE and before END PERFORM
My display displayed the DD-NAME's but the WS-DSNAME-1 and 2 were low values. I am surely doing something wrong here. I called GETDSN program from another cobol module. I want to get the DSNAME for DD-NAME IFILE as seen in my display
[code:1:f6da6c36e5]**********************************
DD-NAME SYSDBOUT
WS-DSNAME-1 |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12383 Topics: 75 Location: San Jose
|
Posted: Mon Sep 03, 2007 3:40 pm Post subject: |
|
|
Quote: |
I had compile error in line "SWA-V-ADDR" was not defined as a data-name so I commented out this line
in code and added a display after END EVALUATE and before END PERFORM
|
Shuko,
hmmm Phantom's code did have the definition of swa-v-addr under TIOT-SEG.
Code: |
01 TIOT-SEG.
05 TIO-LEN PIC X(01).
05 FILLER PIC X(03).
05 DD-NAME PIC X(08).
05 SWA-V-ADDR PIC X(03).
|
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
shuko Beginner
Joined: 08 Nov 2005 Posts: 73 Topics: 20
|
Posted: Tue Sep 04, 2007 9:14 am Post subject: |
|
|
Kolusu
My mistake, I missed that definition. My problem with WS-DSNAME-1
and WS-DSNAME-2 still persists. Seems to be low values and not a dataset name.
Shuko |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12383 Topics: 75 Location: San Jose
|
Posted: Tue Sep 04, 2007 9:30 am Post subject: |
|
|
shuko,
The cobol program is expecting to be called as a sub-routine. Did you also invoke the cobol module in the same exact manner?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|