IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

using LMDLIST in COBOL


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Fri Jun 19, 2009 2:52 pm
Reply with quote

I am trying to get a list of datasets from a mask by using ISPF LMDLIST in batch.

Problem

My program as below - LMDLIST is giving a RC=8.
(The DSLIST ID was not created).
========================
Code:

IDENTIFICATION DIVISION.                 

PROGRAM-ID. TEST1234.                   

DATA DIVISION.                           

WORKING-STORAGE SECTION.                 

01 WS-MASK       PIC X(06) VALUE 'WSMASK'.

01 WSMASK        PIC X(11) VALUE 'VENO80.T* '

01 WS-DSVAR     PIC X(06) VALUE 'WSVAR '.   

01 WSVAR           PIC X(08).                 

01 WS-DSNAME   PIC X(06) VALUE 'DSNAME'.   

01 DSNAME         PIC X(30).                     

01 WS-LMDINIT    PIC X(08) VALUE 'LMDINIT '.

01 WS-LMDLIST    PIC X(08) VALUE 'LMDLIST '.

01 WS-LIST          PIC X(08) VALUE 'LIST    '.   

01 WS-YES           PIC X(08) VALUE 'YES     '.   

01 WS-FREE         PIC X(08) VALUE 'FREE    '.   

01 WS-VDEFINE   PIC X(08) VALUE 'VDEFINE '.

01 WS-CHAR       PIC X(08) VALUE 'CHAR    '.

01 W020-ISPF-L8  PIC 9(6) COMP VALUE 8. 

01 W020-ISPF-L11 PIC 9(6) COMP VALUE 11.

01 W020-ISPF-L30 PIC 9(6) COMP VALUE 30.

PROCEDURE DIVISION.                     

   CALL 'ISPLINK' USING WS-VDEFINE     

                         ,WS-DSVAR     

                         ,WSVAR         

                         ,WS-CHAR       

                         ,W020-ISPF-L8 

 

   CALL 'ISPLINK' USING WS-VDEFINE     

                         ,WS-MASK       

                         ,WSMASK       

                         ,WS-CHAR       

                         ,W020-ISPF-L11

 

   CALL 'ISPLINK' USING WS-VDEFINE     

                         ,WS-DSNAME     

                         ,DSNAME       

                         ,WS-CHAR       

                         ,W020-ISPF-L30

   

   CALL 'ISPLINK' USING WS-LMDINIT     

                         ,WS-DSVAR     

                       ,WSMASK           

 DISPLAY 'RETURN CODE = ' RETURN-CODE     

 DISPLAY 'WS-DSVAR ' WSVAR               

 CALL 'ISPLINK' USING WS-LMDLIST         

                       ,WSVAR             

                       ,WS-LIST           

                       ,DSNAME           

 DISPLAY 'RETURN CODE = ' RETURN-CODE     

 DISPLAY 'DSNAME = ' DSNAME           

 CALL 'ISPLINK' USING WS-LMDLIST         

                       ,WSVAR             

                       ,WS-FREE           

 DISPLAY 'RETURN CODE = ' RETURN-CODE     

 DISPLAY 'FREE'                           

 STOP RUN.                               



Output i am getting

RETURN CODE = 0000

WS-DSVAR ISR00001

RETURN CODE = 0008

DSNAME =

Would appreciate any help on this.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jun 19, 2009 3:35 pm
Reply with quote

Were there any error codes or messages displayed / returned from ISPF.

Also, please learn to use the correct tags in your post as it does make reading so much easier for those trying to help you. I have now shown you how to do this, please remember and use it.

Code:

[code]
Your code here
[/code]
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jun 21, 2009 5:27 pm
Reply with quote

You can use Dialog Trace (option 7 in my ISPF main menu) or ISPVCALL to trace ISPF dialog components.

O.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Jun 22, 2009 7:30 pm
Reply with quote

Show us your JCL.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Jun 23, 2009 12:39 am
Reply with quote

Do your VDEFINEs get Rc=0?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top