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 OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


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