MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cobol to get dsname using ddname

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
shuko
Beginner


Joined: 08 Nov 2005
Posts: 73
Topics: 20

PostPosted: Wed Aug 29, 2007 6:26 am    Post subject: cobol to get dsname using ddname Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12383
Topics: 75
Location: San Jose

PostPosted: Wed Aug 29, 2007 6:57 am    Post subject: Reply with quote

shuko,

Please Search before posting. Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?p=16489#16489

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shuko
Beginner


Joined: 08 Nov 2005
Posts: 73
Topics: 20

PostPosted: Mon Sep 03, 2007 8:29 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12383
Topics: 75
Location: San Jose

PostPosted: Mon Sep 03, 2007 3:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
shuko
Beginner


Joined: 08 Nov 2005
Posts: 73
Topics: 20

PostPosted: Tue Sep 04, 2007 9:14 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12383
Topics: 75
Location: San Jose

PostPosted: Tue Sep 04, 2007 9:30 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group