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

Opening a VSAM file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ritesh pandey

New User


Joined: 09 Feb 2007
Posts: 11
Location: Pune

PostPosted: Wed Jul 23, 2008 2:38 pm
Reply with quote

Hi ,

Can anybody send me the syntax for opening a VSAM file through Print command .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 2:49 pm
Reply with quote

The PRINT command of what, IDCAMS, COBOL, SAS ???
Back to top
View user's profile Send private message
Rajesh Sampath

New User


Joined: 18 Jun 2008
Posts: 9
Location: Pune

PostPosted: Wed Jul 23, 2008 3:24 pm
Reply with quote

U mean Print statement.

print ids(/) ch ?
Back to top
View user's profile Send private message
ritesh pandey

New User


Joined: 09 Feb 2007
Posts: 11
Location: Pune

PostPosted: Wed Jul 23, 2008 4:01 pm
Reply with quote

Thanks Rajesh for quick reply, but i have already tried . It doesn't work.
Do you know any other option to open a VSAM file without File Aid .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 4:05 pm
Reply with quote

What is it that you want to do with the VSAM file, and what organisation is it, ESDS, KSDS, RRDS, Linear ?

Please post your errors from your abortive attempt - "It doesn't work" is hardly much for anyone else to go on ...........
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Jul 23, 2008 4:58 pm
Reply with quote

HI,

If its OPENed somehwere, then you will get open error 168.

If error code 168 occured for u then
Find out who else is using this dataset, get it closed, then type PRINT IDS command, you won't get 168 then.

Regards
R KARTHIK
Back to top
View user's profile Send private message
ritesh pandey

New User


Joined: 09 Feb 2007
Posts: 11
Location: Pune

PostPosted: Wed Jul 23, 2008 5:43 pm
Reply with quote

WE don't have any tool like file Aid .So anybody suugest me how can i see the content of the KSDS VSAM file ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 5:47 pm
Reply with quote

ritesh pandey wrote:
Thanks Rajesh for quick reply, but i have already tried . It doesn't work.
Do you know any other option to open a VSAM file without File Aid .


Will you please pay attention and do as asked and post the output from your failed job so that we have sufficient, well certainly MORE, information to be able to help you.

Unless you help us, all we can do is guess and may never get to a solution.
Back to top
View user's profile Send private message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 114
Location: India

PostPosted: Wed Jul 23, 2008 6:09 pm
Reply with quote

ritesh,
Can you please explain what you want and what you are trying to do ?

Have you already checked VSAM Manuals for your queries ?

Thanks.
Back to top
View user's profile Send private message
ritesh pandey

New User


Joined: 09 Feb 2007
Posts: 11
Location: Pune

PostPosted: Wed Jul 23, 2008 6:18 pm
Reply with quote

I am tring to see the content of the VSAM file through print statment ie print ids(/) ch . I am getting the error message
** VSAM OPEN RETURN CODE IS 160
NUMBER OF RECORDS PROCESSED WAS 0
LASTCC=12
Back to top
View user's profile Send private message
NitinP

New User


Joined: 12 May 2008
Posts: 3
Location: Chennai

PostPosted: Wed Jul 23, 2008 6:23 pm
Reply with quote

Hi Ritesh ,

The Command you are asking is PRINT IDS(/) CH , Type this command before your vsam file , I would not suggest using this because you have to keep pressing Enter until end of file reaches , Check if your shop uses FILEAID, INSYNC etc

Regards
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 6:24 pm
Reply with quote

Well, we are sort of getting there ................

1) Please post your code and JCL
2) Please post the complete message, including the message ID's - e.g. IDC3009I

Quick thoughts - are you using INDATASET rather than allocating the dataset via a DD and DISP=SHR then using INFILE in your control statements. Using DD name and INFILE is much safer and causes less enqueue problems
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 6:25 pm
Reply with quote

Run a LISTCAT on the VSAM file to see if it has data. One of the reasons for a return code 160 is that the file contains no records.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 23, 2008 6:26 pm
Reply with quote

and since your dd statements are correct,
your jcl syntax for the utility being invoked is correct,
and all the parms that you provided the utility are correct,
there can be only one answer: the computer made a mistake
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 6:28 pm
Reply with quote

Dick: icon_biggrin.gif If I posted something like that, I'd make sure I was in a well-grounded location because lightning just has to be on the way!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 23, 2008 7:01 pm
Reply with quote

Robert:

(might want to check out another thread - This isn't the first where I made 'questionable assumptions'.

17 posts in this thread, and we are finally getting around to what the OP would have said if he knew enough to do so.

He only wants to print some records from a vsam file. quite a leap from this:
Can anybody send me the syntax for opening a VSAM file through Print command?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Jul 23, 2008 7:05 pm
Reply with quote

i wish that everybody before posting had read
http://catb.org/~esr/faqs/smart-questions.html
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 23, 2008 8:06 pm
Reply with quote

Read? Read! Read?

most posters do not even read the preceding posts; why expect them to read a near document type thing? the whole (hole) idea of this forum is to try to find some eager-beaver to provide code for 'my' problem. Why read, when one can just continually type 'I NEED THIS or is it that, or that and this, or that that and this'?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Jul 23, 2008 8:10 pm
Reply with quote

and every time You say... never never again, and the next time....
You provide manual reading services as usual
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 8:27 pm
Reply with quote

Quote:
and every time You say... never never again, and the next time....
Hey, a little obsessive compulsion comes in handy when the gin & tonic comes out ....
Back to top
View user's profile Send private message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 114
Location: India

PostPosted: Thu Jul 24, 2008 10:47 am
Reply with quote

sometimes it reduces the interest to answer other questions... ;-)
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts how to eliminate null indicator value... DB2 7
No new posts VSAM LISTCAT INFORMATION JCL & VSAM 2
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
Search our Forums:

Back to Top