Page 1 of 1

GSAM files in IMS

PostPosted: Mon Jul 28, 2014 10:27 pm
by venubhat
Hi Guys

I am new to IMS. So need to know regarding GSAM files. and how to access/browse an existing GSAM. Do we need to login to IMS to access them...?? basically all I want to know is starting from creating a GSAM till creating one and have records written onto it.

thanks
venu

Re: GSAM files in IMS

PostPosted: Tue Jul 29, 2014 12:26 am
by NicC
GSAM files are ordinary sequential files. You can create and read them like any other sequential file. To access them via IMs you need to provide IMS with information. I suggest you click the manuals link, select the IMS programming guide, search for GSAM and start reading.

Re: GSAM files in IMS

PostPosted: Tue Jul 29, 2014 5:59 pm
by Ed Goodman
To use with an IMS program, a GSAM needs to be in that program's PSB. That's the thing that tells a program which databases/segments it can use. A GSAM file needs to have DBD (database definition) so that it can be included in a PSB. The DBD will say something like "sequential file, lrecl=100, DDname for inut, DDname for output" The PSN definition will allow for read-only (Get Sequential) ((GS)) or for writing (Load Sequential)((LS)) by using the correct ProcOpt.

I've never used a GSAM file in the online region, I'm not even sure it's possible. I always use them in batch jobs. You SHOULD do an OPEN call and a CLOSE call when working with them. You use ISRT and GN to write/read them.

If you are doing a restart (XRST) call, make sure you DON'T do an OPEN call on the GSAM, because it will reset the pointer to the beginning of the file.

Re: GSAM files in IMS

PostPosted: Wed Jul 30, 2014 11:29 am
by venubhat
Hi Guys

Thanks for all info...I wanted another info. to browse the content of GSAM file.
In MF we access the normal flat/any other files with 3.4 opt and then browse(B) the file to see the content. like that, want to know how to browse a GSAM file and see the content in it.

thanks
venu

Re: GSAM files in IMS

PostPosted: Wed Jul 30, 2014 11:43 am
by enrico-sorichetti
the topic title reflects a misunderstanding ...

GSAM is NOT the dataset organization or a file type ( as seen from the zOS point of view ) ....
it is a DATABASE organization as seen by IMS to process it according to a subset of IMS DB rules
- mostly regarding data-integrity and checkpoint-restart

from the zOS point of view it is just a good old plain PS file and You can browse it using ISPF

Re: GSAM files in IMS

PostPosted: Wed Jul 30, 2014 11:10 pm
by NicC
Why have you not tried browsing it either through 3.4 and browse option or via option1 - Browse?