MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quick Copy of an Empty ESDS cluster

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Thu Jul 22, 2004 4:05 am    Post subject: Quick Copy of an Empty ESDS cluster Reply with quote

Any utility (apart from IDCAMS/ADRDSSU) will help me copy an empty ESDS to a PS and give me a zero return code if the file is empty ?

Cheers
Brian
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Jul 22, 2004 4:13 am    Post subject: Reply with quote

Brian,

You can use SORT utility to copy an empty vsam cluster using the parm VSAMEMT . This parm determines how an empty VSAM input data set will be processed. If VSAMEMT=YES, an empty VSAM data set will be processed as legitimate data set contain 0 records, and Sort will end with a return code of 0.

Code:

//STEP0100 EXEC PGM=SORT,PARM='VSAMEMT=YES'                         
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD DSN=YOUR ESDS.VSAMFILE,                                 
//            DISP=SHR                                             
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *                                                     
   SORT FIELDS=COPY                                                 
/*                 


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Thu Jul 22, 2004 5:23 am    Post subject: Reply with quote

Kolusu,

Thanks for the suggestion. I did try ICEMAN for the copy but the logical record length of the VSAM file is 32760 and i want my output as a VB 32756. I tried a OUTFIL OUTREC=(5,32756),VLFILL=X'40' but looks like ICEMAN cannot process a VB whose record length is greater than 32752.

Is this correct ?
Any way out of this ?

Cheers
Brian
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Jul 22, 2004 6:01 am    Post subject: Reply with quote

Brian,

For DFSORT , the limitations are

  • Variable-length records are limited to 32756 bytes.
  • VSAM variable-length records are limited to 32752 bytes.
  • Fixed-length records are limited to 32760 bytes.
  • Variable block-spanned records are limited to 32767 bytes.


Quote:

I did try ICEMAN for the copy but the logical record length of the VSAM file is 32760 and i want my output as a VB 32756.


If your input vsam file is of FB format, then if you wanted the output as VB File you should use FTOV parm. You need DFSORT PTF UQ99331 for FTOV to work

See the "FB to VB conversion" Smart DFSORT Trick for more information on DFSORT's FTOV parameter:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

You don't need VLFILL as it only applies to VB input records and is not needed with FTOV (FB input records to VB output records). If you specify VLFILL with FTOV, you'll get an error message.

Try the following Control cards and see if it works

Code:

//SYSIN DD *
   OUTFIL FTOV,OUTREC=(5,32752)


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Thu Jul 22, 2004 6:56 am    Post subject: Reply with quote

Kolusu,
No luck or am i missing something. My input is a ESDS with lrecl=32760 and i want an output PS with VB LRECL=32756.

I coded a OPTION COPY with a OUTFIL FTOV OUTREC=(5,32752) but still am getting the reformatting error.

any clues plz

Cheers
Brian
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Jul 22, 2004 7:13 am    Post subject: Reply with quote

Brian,

It would be nice if you had posted the error messages. Post the messages from sysout

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Thu Jul 22, 2004 7:23 am    Post subject: Reply with quote

Kolusu,

Appreciate your help. This is my sysout.
Code:

ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0
           OPTION COPY                                       
           OUTFIL FTOV,OUTREC=(5,32752)                     
                                 $                           
ICE111A E REFORMATTING FIELD ERROR                           
ICE052I 3 END OF DFSORT                                                     

Cheers
Brian
Back to top
View user's profile Send private message
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Thu Jul 22, 2004 8:51 am    Post subject: Reply with quote

Kolusu,

Thanks again for your help.

I dont know if what i did was correct but this is what i did. I had a ESDS VSAM input file with a max lrecl=32760 and i had to create a VB PS out of this which has a lrecl of 32756.

Code:

 OPTION COPY
  OUTFIL FTOV,OUTREC=(5,32748)


I had my output dataset coded with a DCB=(RECFM=VB,LRECL=32756) and the contents were copied.

Cheers
Brian
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Jul 22, 2004 9:38 am    Post subject: Reply with quote

Brian,

OUTREC=(5,32752) specified a position+length greater than 32752 - that's why you got the ICE111A error. OUTREC=(5,32748) does not specify a position+length greater than 32752, so that's ok. It gives you 32748 bytes of your input file starting at position 5.

You set LRECL=32756 - that's the maximum length for your records. Your actual maximum record length will be 32748, but it's ok to have the LRECL greater than the maximum record length.

I'm assuming you wanted to skip the first four bytes of your input records. If not, you could use OUTREC=(1,32752).
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group