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
 

 

Getting Sequential file attribute

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

New User


Joined: 28 May 2008
Posts: 30
Location: India

PostPosted: Wed May 28, 2008 6:17 pm    Post subject: Getting Sequential file attribute
Reply with quote

Hi all,

How to check in rexx for file attributes,especially block count!!
My requirement is to find out whether the file is empty or not before opening it in browse mode.LISTDS is not giving block count.
If somehow I can getthe block count in the current utilization part as in the attachement, with that I can decide whether the file is empty or not.

Thanks in advance,
Ceema Rajith
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed May 28, 2008 6:28 pm    Post subject: Reply to: Getting Sequential file attribute
Reply with quote

Did LISTDSI do anything for you?
Back to top
View user's profile Send private message
Ganesh.Deokar

New User


Joined: 30 Sep 2005
Posts: 26
Location: Buffalo,NY

PostPosted: Wed May 28, 2008 6:43 pm    Post subject: Reply to: Getting Sequential file attribute
Reply with quote

Try this:

Code:
/*rexx*/                                   
address tso                                 
list1 = listdsi("'XXXXX.XXXXX.XXXXXX'")     
say sysused             
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed May 28, 2008 6:56 pm    Post subject: Reply to: Getting Sequential file attribute
Reply with quote

why bother...
did You test opening in BROWSE an empty dataset ??

check this thread an You will see why You do not have to test it beforehand

http://www.ibmmainframes.com/viewtopic.php?t=24912&highlight=ispf+browse
Back to top
View user's profile Send private message
cma rajith

New User


Joined: 28 May 2008
Posts: 30
Location: India

PostPosted: Thu May 29, 2008 12:36 pm    Post subject:
Reply with quote

Yeah,LISTDSI gave me the block count, thanks a lot!!

HOw do we suppress the message generated from the LISTDSI?
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu May 29, 2008 1:15 pm    Post subject:
Reply with quote

OUTTRAP
Back to top
View user's profile Send private message
cma rajith

New User


Joined: 28 May 2008
Posts: 30
Location: India

PostPosted: Thu May 29, 2008 1:45 pm    Post subject:
Reply with quote

I tried with this
CALL OUTTRAP "ATR."
LISTDS "'" || DSN || "'"

MSG= OUTTRAP('OFF')

Still the mesages are coming
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu May 29, 2008 2:15 pm    Post subject:
Reply with quote

x = OUTTRAP("ATR.")
ADDRESS TSO "LISTDS ('"DSN"')"
X = OUTTRAP("OFF')
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu May 29, 2008 2:16 pm    Post subject:
Reply with quote

Corrected
X = OUUTRAP("OFF")
Back to top
View user's profile Send private message
cma rajith

New User


Joined: 28 May 2008
Posts: 30
Location: India

PostPosted: Thu May 29, 2008 2:44 pm    Post subject:
Reply with quote

This is also not working
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu May 29, 2008 3:43 pm    Post subject:
Reply with quote

Ok now from the start.

First
Quote:
Yeah,LISTDSI gave me the block count, thanks a lot!!

I am not sure it did, and I am not sure what you exactly mean by "block count".

Quote:
HOw do we suppress the message generated from the LISTDSI?
You cannot ask to LISTDSI to not generate message and as well to ask to receive information from it !!!

So give us the kind of message you want to avoid.

Also, do you run this in background or in foreground ?

Finally do you just want to know if a file is empty or not? If so, LISTDSI is not convenient.

Use IDCAMS, or EXECIO and test the return code, ...

Please clarify

Cheers

Pierre
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: Thu May 29, 2008 3:43 pm    Post subject:
Reply with quote

cma rajith wrote:
This is also not working

Perhaps, just maybe if you follow the instructions below

Post your code, and the messages that you wish to dispose of

then we might actually be able to help you.
Back to top
View user's profile Send private message
cma rajith

New User


Joined: 28 May 2008
Posts: 30
Location: India

PostPosted: Thu May 29, 2008 5:42 pm    Post subject:
Reply with quote

My code is

FATTR = LISTDSI("'"DSN"'")
IF FATTR == 0 THEN
IF SYSUSED == 0 THEN
SAY "EMPTY FILE"
ELSE
DSNCAT = 'YES'


Here I'm checking for a empty datset..so in the screen i'm expecting only 'EMPTY FILE' but what is comming

"IKJ56712I INVALID KEYWORD, "AX.IOLDI.G.DATA.AUSTRIA.G0146V00"
EMPTY FILE

Please guide me to avoid the first line from the screen
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu May 29, 2008 6:03 pm    Post subject:
Reply with quote

Should work !!!
How is DSN filled in ?
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu May 29, 2008 6:29 pm    Post subject:
Reply with quote

Also you can submit this online with a "trace i" option at the begining to follow the instructions step by step.
Back to top
View user's profile Send private message
cma rajith

New User


Joined: 28 May 2008
Posts: 30
Location: India

PostPosted: Thu May 29, 2008 6:30 pm    Post subject:
Reply with quote

DSN is AX.IOLDI.G.DATA.AUSTRIA.G0146V00 , it filled properly.

My problem is the message "IKJ56712I INVALID KEYWORD, "AX.IOLDI.G.DATA.AUSTRIA.G0146V00"

which is generated by LISTDSI.I want the customized display only
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu May 29, 2008 6:35 pm    Post subject:
Reply with quote

Yes, but something is running wrong. Try the trace option : it will show you all info.

Because you cannot avoid message IKJ type.

You did not respons to that : batch or online?

Pierre
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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