modify dataset attributes 
Author Message
 modify dataset attributes

  Under MVS is there a way to modify a dataset's attributes,
  specifically the record format,   from say FB to VBS, the
  key points being:-

  (a)  The internal contents of the dataset are ok e.g, the
       BDW/RDW are 'correct'.  One could consider that this
       dataset was at one time a legitimate VBS file,   but
       has somehow had its attributes in the VTOC corrupted.

  (b)  It is required to modify the attributes, NOT to copy
       and convert the dataset.

  (c)  There are  no RACF restrictions  to  the  dataset in
       dataset in question  and the method used  to achieve
       the attribute modification must NOT rely the ability
       to be able to create a 'privileged' program.

   In my problem,  the dataset will  have been created on a
   UNIX system  and the binary conversions  taken  care  of
   along  with the RDW segment  descriptors and the correct
   blocking.   The dataset will then have been FTP'd to MVS
   in binary mode ( as a client on the IBM )  with suitable
   'locsite' commands to create the  target dataset with FB
   attributes.

   Any help or suggestions would be appreciated, thank you.

--
koshka



Thu, 26 Jul 2001 03:00:00 GMT  
 modify dataset attributes
Easiest way is to modify the VTOC entry, but that will require
what you call a "priveliged" program.  You could get around
that by using a system utility (ZAP) to do it for you.

I haven't tried this, but you might try running IEBGENER
to copy an empty data set into your data set.  Hardcode the
attributes you want on the DCB of the output DD statement,
and don't forget to specify DISP=MOD.

Hope this helps...

Sincerely,

Judy Anderson
Product Development
Advanced Software Technologies Company, Ltd.

Quote:

>  Under MVS is there a way to modify a dataset's attributes,
>  specifically the record format,   from say FB to VBS, the
>  key points being:-

>  (a)  The internal contents of the dataset are ok e.g, the
>       BDW/RDW are 'correct'.  One could consider that this
>       dataset was at one time a legitimate VBS file,   but
>       has somehow had its attributes in the VTOC corrupted.

>  (b)  It is required to modify the attributes, NOT to copy
>       and convert the dataset.

>  (c)  There are  no RACF restrictions  to  the  dataset in
>       dataset in question  and the method used  to achieve
>       the attribute modification must NOT rely the ability
>       to be able to create a 'privileged' program.

>   In my problem,  the dataset will  have been created on a
>   UNIX system  and the binary conversions  taken  care  of
>   along  with the RDW segment  descriptors and the correct
>   blocking.   The dataset will then have been FTP'd to MVS
>   in binary mode ( as a client on the IBM )  with suitable
>   'locsite' commands to create the  target dataset with FB
>   attributes.

>   Any help or suggestions would be appreciated, thank you.

>--
>koshka



Thu, 26 Jul 2001 03:00:00 GMT  
 modify dataset attributes
Hi Koshka,

You can do this with the public domain PDS program or its
successor, StarTool, from SERENA.  See WWW.SERENA.COM

With StarTool or PDS, use the FIXPDS subcommand -- it
supports sequential and partitioned data sets.  If you
wanted to change DCB from RECFM FB to VB, you would enter
FIXPDS RECFM(VB)
and respond YES to a confirmation prompt.

This actually just reopens the data set with DISP=MOD
using the new DCB attributes.

Quote:

>   Under MVS is there a way to modify a dataset's attributes,
>   specifically the record format,   from say FB to VBS, the
>   key points being:-

>   (a)  The internal contents of the dataset are ok e.g, the
>        BDW/RDW are 'correct'.  One could consider that this
>        dataset was at one time a legitimate VBS file,   but
>        has somehow had its attributes in the VTOC corrupted.

>   (b)  It is required to modify the attributes, NOT to copy
>        and convert the dataset.

>   (c)  There are  no RACF restrictions  to  the  dataset in
>        dataset in question  and the method used  to achieve
>        the attribute modification must NOT rely the ability
>        to be able to create a 'privileged' program.

>    In my problem,  the dataset will  have been created on a
>    UNIX system  and the binary conversions  taken  care  of
>    along  with the RDW segment  descriptors and the correct
>    blocking.   The dataset will then have been FTP'd to MVS
>    in binary mode ( as a client on the IBM )  with suitable
>    'locsite' commands to create the  target dataset with FB
>    attributes.

>    Any help or suggestions would be appreciated, thank you.

> --
> koshka



Thu, 26 Jul 2001 03:00:00 GMT  
 modify dataset attributes
Koshka:

I believe that you can modify the dataset attributes using a RDJFCB
macro along with an OPEN macro with the TYPE=J option.  RDJFCB stands
for Read Job File Control Block.  The JFCB is where MVS stores the
dataset information. The TYPE=J options tells the system that you intend
to modify the JFCB.  You do not have to be in any authorized state to
issue this macro request.

This is documented in:
7 3 Reading and Modifying a Job File Control Block
DFSMS/MVS V1R4 DFSMSdfp Advanced Services
SC26-4921-03

IBM's manuals are online at:
http://ppdbooks.pok.ibm.com:80/cgi-bin/bookmgr/bookmgr.cmd/Shelves
DFSMS/MVS V1R4 Bookshelf

From the IBM manual:

7 3 Reading and Modifying a Job File Control Block
To accomplish the functions that are performed as a result of an OPEN
macro instruction, the open routine requires access to information that
you have supplied in a data definition (DD) statement. This information
is stored by the system in a job file control block (JFCB).

In certain applications, you might find it necessary to modify the
contents of a JFCB (previously specified in the allocation parameters)
before issuing an OPEN macro instruction against a data set. For
example, suppose you are adding records to the end of a sequential data
set. You might want to add a secondary allocation quantity to allow the
existing data set to be extended when the space currently allocated is
exhausted. To assist you, the system provides the RDJFCB macro
instruction. This macro instruction causes a JFCB to be moved to an area
specified in an exit list. Use of the RDJFCB macro instruction with an
exit list is shown under "Example" in topic 7.3.1.1. When you
subsequently issue the OPEN macro instruction, you can specify the
TYPE=J operand to open the data set using the JFCB in the area you
specified. . OPEN TYPE=J normally moves your program's modified copy of
the JFCB, to replace the system copy. To ensure that this move is done,
your program must set bit zero of the JFCBMASK+4 field to 1.

Some of the modifications that can be made to the JFCB include:

Moving the creation and expiration date fields of the DSCB into the
JFCB

Modifying the number-of-volumes field in the JFCB

Moving the DCB fields from the DSCB into the JFCB

.

I hope that this helps you.

Best regards,

John Parke

Quote:

>   Under MVS is there a way to modify a dataset's attributes,
>   specifically the record format,   from say FB to VBS, the
>   key points being:-

>   (a)  The internal contents of the dataset are ok e.g, the
>        BDW/RDW are 'correct'.  One could consider that this
>        dataset was at one time a legitimate VBS file,   but
>        has somehow had its attributes in the VTOC corrupted.

>   (b)  It is required to modify the attributes, NOT to copy
>        and convert the dataset.

>   (c)  There are  no RACF restrictions  to  the  dataset in
>        dataset in question  and the method used  to achieve
>        the attribute modification must NOT rely the ability
>        to be able to create a 'privileged' program.

>    In my problem,  the dataset will  have been created on a
>    UNIX system  and the binary conversions  taken  care  of
>    along  with the RDW segment  descriptors and the correct
>    blocking.   The dataset will then have been FTP'd to MVS
>    in binary mode ( as a client on the IBM )  with suitable
>    'locsite' commands to create the  target dataset with FB
>    attributes.

>    Any help or suggestions would be appreciated, thank you.

> --
> koshka



Thu, 26 Jul 2001 03:00:00 GMT  
 modify dataset attributes

Quote:

>  Under MVS is there a way to modify a dataset's attributes,
>  specifically the record format,   from say FB to VBS, the
>  key points being:-

I'm pretty sure that all you have to do is open the dataset for
output, using the desired new attributes.  If you use DISP=MOD, you
will open for appending to the end (which avoids erasing the dataset
contents).  You should not have to actually write any new data.


Thu, 26 Jul 2001 03:00:00 GMT  
 modify dataset attributes

(Neil Rickert) said:

Quote:
>I'm pretty sure that all you have to do is open the dataset for output,
>using the desired new attributes.  If you use DISP=MOD, you will open for
>appending to the end (which avoids erasing the dataset contents).  You
>should not have to actually write any new data.

That's right, and you can use good ol' IEBGENER for that, like this:

 //SETDCB EXEC PGM=IEBGENER
 //SYSPRINT DD SYSOUT=*
 //SYSIN DD DUMMY
 //SYSUT1 DD DUMMY
 //SYSUT2 DD DSN=<your data set name>,DISP=MOD,RECFM=VBS  

If you're not too comfortable with this, you can copy your data with
IEBGENER ALSO, like this:

 //COPYVBS EXEC PGM=IEBGENER
 //SYSPRINT DD SYSOUT=*
 //SYSIN DD DUMMY
 //SYSUT1 DD DSN=<your data set name>,DISP=OLD,RECFM=VBS  
 //SYSUT2 DD DSN=<new data set name>,DISP=(,CATLG),
 // UNIT=SYSDA,SPACE=(TRK,(100,100),RLSE)

Hope this helps.




Thu, 26 Jul 2001 03:00:00 GMT  
 modify dataset attributes

Thanks to everyone who responded to my question, I will try
out the suggestions tomorrow.

--
koshka



Thu, 26 Jul 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. File Vi's and modifying file Attributes, listing by, etc

2. who to modify buttin attribute with C++

3. Attributes / User Defined Attributes

4. TIP #222: Add [wm attributes -alpha] Attribute on Windows

5. Class attribute or instance attribute?

6. Couple dataset access

7. Dataset existence

8. Current dataset in a concatenation?

9. How to find size of dataset

10. Editing a subset of columns in a DataSet

11. VW 7 dataset sorting

12. Dataset Information

 

 
Powered by phpBB® Forum Software