Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
using LMDLIST in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: using LMDLIST in COBOL
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 19, 2009 3:35 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Sun Jun 21, 2009 5:27 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Jun 22, 2009 7:30 pm    Post subject: Reply to: using LMDLIST in COBOL
Reply with quote

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

Senior Member


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

PostPosted: Tue Jun 23, 2009 12:39 am    Post subject: Reply to: using LMDLIST in COBOL
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us