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

LISTDSI error


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Oct 27, 2009 2:11 pm
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: 2358
Location: Israel

PostPosted: Tue Oct 27, 2009 2:17 pm
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
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Nov 02, 2009 2:49 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top