Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

LISTDSI error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
MARINA JOSEPH

New User


Joined: 11 Jun 2009
Posts: 61
Location: chennai

PostPosted: Tue Oct 27, 2009 1:54 pm    Post subject: LISTDSI error
Reply with quote

Hi,

I am trying to obtain the RECFM of a file.



Code:
IF SYSDSN("'"FILEIN"'") = 'OK' THEN   

 DO                                   

   DSINFO = LISTDSI(FILEIN)           

                                     

   SAY 'REASON' SYSREASON             

   IF DSINFO == 0 THEN               

   DO                                 

                                     

    SAY 'RECFM' SYSRECFM             

   END                               

END                                   


It throws error code as 16, and the REASON code is 5 which mean file is not cataloged.



But the file does exist. Its Volume serial . . . is : TSO006.


Thanks.
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: Tue Oct 27, 2009 2:11 pm    Post subject:
Reply with quote

Make sure that the input dataset is within quotes
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Oct 27, 2009 2:17 pm    Post subject:
Reply with quote

if you used quotes for SYSDSN, you need them also in LISTDSI. Both functions use the same method to access datasets info.

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

New User


Joined: 11 Jun 2009
Posts: 61
Location: chennai

PostPosted: Tue Oct 27, 2009 2:19 pm    Post subject:
Reply with quote

Thanks for all you replies, it worked.
Back to top
View user's profile Send private message
MARINA JOSEPH

New User


Joined: 11 Jun 2009
Posts: 61
Location: chennai

PostPosted: Mon Nov 02, 2009 1:56 pm    Post subject: FETCHING A VARIABLE
Reply with quote

Hi,


I have a record as below:-



10 ACT-POL-APPL-NAME PIC X(18)



Code:
POS2 = POS('PIC',REC.I)

LN1 = WORD(STRING,POS2-2)



Can I give statement like this to fetch the word ‘10’?

Currently I am not able to fetch the same by giving this statement.

Thanks.
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: Mon Nov 02, 2009 2:49 pm    Post subject:
Reply with quote

POS and WORD are two seperate functions whose results should not be mixed up.

POS gives a physical position of the search argument within the string to be searched, whilst word gives a relative word number within the string to be searched.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us