Mainframes, MVS, zOS and Related Languages Support Forums Help & Support Forum for and by Mainframe Users 2013-08-24T18:55:32+00:00 http://www.ibm-mainframes.com/feed.php?f=12 2013-08-24T18:55:32+00:00 2013-08-24T18:55:32+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=183&p=926#p926 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: What is BDAM Dataset?]]>
Sorry for coming back late...

Statistics: Posted by Prakash Jha — Sat Aug 24, 2013 6:55 pm


]]>
2013-08-24T18:40:41+00:00 2013-08-24T18:40:41+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=182&p=925#p925 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: Generation and Version of GDG - and confusion?]]>

Statistics: Posted by Prakash Jha — Sat Aug 24, 2013 6:40 pm


]]>
2013-08-24T12:55:39+00:00 2013-08-24T12:55:39+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=360&p=921#p921 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: How can we calculate the total used space?]]>
For a sequential data set, there are three relevant pieces of information: the block size, the tracks allocated, and the tracks used. ISPF 3.4 can provide you with all three of these. 3390 track geometry is 56,664 bytes per track, 15 tracks per cylinder, and the number of cylinders for a volume depends upon the type of volume (common are mod 3 with 3335 cylinders and mod 9 with 10,050 cylinders but others are possible). However, not all 56,664 bytes can be used so merely multiplying tracks by 56664 will give you a rough estimate but that value can be quite far off (for example: an unblocked 80-byte data set can only hold 78 records per 3390 track which means over 50,000 bytes per track are not used or allocated).

Assuming the data set is blocked to half tracks (Google gx26-4577 to get the 3390 chart of how many blocks fit in a track for the various block sizes), take the block size times 2 times the number of allocated (or used) tracks to compute the allocated (or used) space in bytes. Note that some of the blocks may not be filled, so the actual bytes allocated (used) could be slightly lower, but rarely will that be more than 1 or 2% of the space.

If you want a precise answer for used bytes, write a program in the language of your choice to read each record and accumulate the record length (which is a fixed value for FB data sets but requires knowing how to retrieve if using VB data sets).

For VSAM, the HI-A-RBA and HI-U-RBA values in a LISTCAT provide you with the allocated and used bytes. Since VSAM data sets may have free space, the sequential data set calculations CANNOT be reliably used for VSAM. Plus you have to consider whether or not to add up the index data set space if using a KSDS.

Statistics: Posted by Robert Sample — Sat Aug 24, 2013 12:55 pm


]]>
2013-08-24T11:30:17+00:00 2013-08-24T11:30:17+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=360&p=920#p920 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • How can we calculate the total used space?]]>
How can we calculate the total used space, in bytes, of a data-set? The DASD Type is 3390. I've looked at some online references but I'm not sure if got all them correctly.

Thanks,

Statistics: Posted by Neeraj N — Sat Aug 24, 2013 11:30 am


]]>
2013-08-23T12:58:36+00:00 2013-08-23T12:58:36+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=358&p=915#p915 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: Get the last reference date of migrated dataset.]]> Statistics: Posted by Robert Sample — Fri Aug 23, 2013 12:58 pm


]]>
2013-08-23T12:26:57+00:00 2013-08-23T12:26:57+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=358&p=913#p913 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Get the last reference date of migrated dataset.]]>
Is there any way using which without recalling a migrated data-set we can get the "last reference date" of a migrated dataset?

I tried using LISTCAT, using this I'm getting only the Creation & Expiration dates.

I need to know if this can be done using REXX as well, but not sure if I should make a second topic for this? Please advise.

Statistics: Posted by Biden — Fri Aug 23, 2013 12:26 pm


]]>
2013-08-23T09:41:25+00:00 2013-08-23T09:41:25+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=323&p=912#p912 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: AIX in KSDS VSAM.]]> Statistics: Posted by Biden — Fri Aug 23, 2013 9:41 am


]]>
2013-08-16T14:23:32+00:00 2013-08-16T14:23:32+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=323&p=873#p873 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: AIX in KSDS VSAM.]]> Byte
1 - ESDS/KSDS indicator (X'00' for ESDS, X'01' for KSDS)
2 - X'04' for ESDS (length of RBA) and length of primary key for KSDS
3-4 - Binary count of key occurrences if NONUNIQUEKEY (X'0001' to X'FFFF'), X'0001' if UNIQUEKEY
5 - Length of alternate index key

Statistics: Posted by Robert Sample — Fri Aug 16, 2013 2:23 pm


]]>
2013-08-14T12:08:26+00:00 2013-08-14T12:08:26+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=335&p=863#p863 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: How to backup\restore a VSAM file?]]> Statistics: Posted by Robert Sample — Wed Aug 14, 2013 12:08 pm


]]>
2013-08-14T04:53:22+00:00 2013-08-14T04:53:22+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=335&p=854#p854 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: How to backup\restore a VSAM file?]]> Statistics: Posted by Anuj Dhawan — Wed Aug 14, 2013 4:53 am


]]>
2013-08-13T12:13:27+00:00 2013-08-13T12:13:27+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=270&p=843#p843 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: Can we initialize a BDAM file, if yes - how?]]> Statistics: Posted by Robert Sample — Tue Aug 13, 2013 12:13 pm


]]>
2013-08-13T10:54:38+00:00 2013-08-13T10:54:38+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=270&p=838#p838 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: Can we initialize a BDAM file, if yes - how?]]> Statistics: Posted by Subhash Chander — Tue Aug 13, 2013 10:54 am


]]>
2013-08-13T10:35:26+00:00 2013-08-13T10:35:26+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=335&p=837#p837 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: How to backup\restore a VSAM file?]]> Statistics: Posted by Robert Sample — Tue Aug 13, 2013 10:35 am


]]>
2013-08-13T05:21:40+00:00 2013-08-13T05:21:40+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=335&p=833#p833 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: How to backup\restore a VSAM file?]]>
To get you going - following Job creates a tape backup named VSAM.BACKUP.ALTNDX of the alternate index named VSAM.ALTNDX associated with the VSAM data-set. Both backups are kept on the same tape volume. The alternate index must be backed up first.

Code:
//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//BACKUP   DD DSN=USER.VSAM.BACKUP.ALTNDX,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=TAPE,VOL=(,RETAIN)
//SYSIN DD *
  EXPORT VSAM.ALTNDX -
  OUTFILE(BACKUP)
/*
//STEP2    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//BACKUP   DD DSN=USER.TEST.VSAM.BKUP,
//            DISP=(,CATLG,DELETE),
//            UNIT=TAPE,LABEL=(2,SL),VOL=(,,REF=*.STEP1.BACKUP)
//SYSIN DD *
  EXPORT USERID.TEST.VSAM -
  OUTFILE(RECEIVE)
/*


And you'd need IEFBR14 steps to define the backup files as Robert said and LearnMainframe shows.

Statistics: Posted by Anuj Dhawan — Tue Aug 13, 2013 5:21 am


]]>
2013-08-13T05:14:43+00:00 2013-08-13T05:14:43+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=335&p=832#p832 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: How to backup\restore a VSAM file?]]>
Code:
//STEP01   EXEC PGM=IEFBR14                 
//SYSUT1   DD  DSN=USER.TEST.VSAM.BKUP,
//             DISP=(MOD,CATLG,DELETE),     
//             UNIT=SYSDA,RECFM=FB,LRECL=80,
//             SPACE=(CYL,(1,1),RLSE)       
//*
//STEP02    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DD1      DD DSN=USER.TEST.VSAM.BKUP,UNIT=TAPE,
//            DISP=OLD,DCB=(appropriate parameters)
//DD2      DD DSN=USERID.TEST.VSAM,DISP=OLD
//SYSIN DD *
  REPRO -
  INFILE(DD2) -
  OUTFILE(DD1)
/*

Statistics: Posted by LearnMainframe — Tue Aug 13, 2013 5:14 am


]]>
2013-08-12T18:37:07+00:00 2013-08-12T18:37:07+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=335&p=829#p829 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: How to backup\restore a VSAM file?]]>
Quote:

like we do it on windows for a any normal files.
You need to learn, since you do not yet apparently know, that z/OS is not Windows and Windows is not z/OS. Things that are simple in Windows may be impossible in z/OS and things that are easy in z/OS may be impossible in Windows.

Is your .BKUP file supposed to be sequential or another VSAM file of the same type? If sequential, are you putting it on tape or disk? If on tape, does your site allow a tape data set to be overwritten (HINT: VERY FEW SITES ALLOW TAPE DATA SETS TO BE OVERWRITTEN)? Is the backup file only to be used internally or will it be used off site as well? If VSAM of the same type, how are you determining the type for the backup copy?

Your first job can best be implemented as two steps: an IEFBR14 step that specifies USER.TEST.VSAM.BKUP with DISP=(MOD,DELETE,DELETE) and provides the full DCB for the backup file, followed by a step using the backup tool of your choice (ADRDSSU would be preferred, but IDCAMS would work).

Your second job, if implemented using ADRDSSU, would require the REPLACEUNCONDITIONAL keyword on the RESTORE command.

Considering the easy access to IBM manuals, and the generally great variety of jobs previously written at most sites, I don't typically provide code (or JCL) except to make (or rebut) a point. If you write the JCL, and it doesn't work, I can point out where you went wrong -- but I"m not going to just give away my work product for free.

Statistics: Posted by Robert Sample — Mon Aug 12, 2013 6:37 pm


]]>
2013-08-12T17:49:42+00:00 2013-08-12T17:49:42+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=335&p=828#p828 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • How to backup\restore a VSAM file?]]>
Let's say the name of the VSAM file whose backup is to be taken is - USERID.TEST.VSAM - can be of any type of VSAM.
and the name of the backup file is - USERID.TEST.VSAM.BKUP

So, what I want is 2 JCL -->
1) JCL ready to be submitted to get the USERID.TEST.VSAM.BKUP created irrespective of existence of USERID.TEST.VSAM.BKUP.
2) JCL ready to be submitted to get the USERID.TEST.VSAM created back irrespective of existence of USERID.TEST.VSAM

Statistics: Posted by m4mainframe — Mon Aug 12, 2013 5:49 pm


]]>
2013-08-12T14:36:06+00:00 2013-08-12T14:36:06+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=333&p=826#p826 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: Alternate Index and ESDS.]]> Statistics: Posted by Robert Sample — Mon Aug 12, 2013 2:36 pm


]]>
2013-08-12T14:12:52+00:00 2013-08-12T14:12:52+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=333&p=824#p824 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Alternate Index and ESDS.]]>
Mostly I've worked with KSDS and AIX, however, I came to kwno that we can create AIX on ESDS also. I'm confused ESDS does not have any INDEX then how it supports AIX?

Thanks

Statistics: Posted by Anup Apte — Mon Aug 12, 2013 2:12 pm


]]>
2013-08-11T06:02:02+00:00 2013-08-11T06:02:02+00:00 http://www.ibm-mainframes.com/viewtopic.php?t=323&p=819#p819 <![CDATA[SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM. • Re: AIX in KSDS VSAM.]]> Statistics: Posted by Biden — Sun Aug 11, 2013 6:02 am


]]>