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 

Problem when copy VSAM to sequential using ICETOOL

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


Joined: 09 Mar 2006
Posts: 5
Topics: 2

PostPosted: Fri Apr 21, 2006 5:02 am    Post subject: Problem when copy VSAM to sequential using ICETOOL Reply with quote

Hi,

I have a VSAM file of average record length of 30 and maximum record length of 50.

File:
pos 1............................................30........................50
dat 0000000000000000000000000000000000000
dat ...........data1..........................|..........blank........
dat ...........data2..........................|..........blank........
dat ...........data3..........................|..........blank........

If I use ICETOOL to copy the above file to sequential file zeros getting added instead of blanks

The sequential file record length is 50

Output:
pos 1............................................30........................50
dat 000000000000000000000000000000000000000
dat ...........data1..........................|000000000000000
dat ...........data2..........................|000000000000000
dat ...........data3..........................|000000000000000
The command I used:

COPY FROM(INFILE) TO(OUTFILE)

Please let me know the actual problem and solution if anyone knows.

Thanks in Advance,
Bishkel
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Apr 21, 2006 6:48 am    Post subject: Reply with quote

Biskhel,

I am not sure as to why you get those zeroes instead of spaces at the end.

Try this Job and see if you still got zeroes instead of blanks

Code:


//STEP0100 EXEC PGM=SORT                 
//SYSOUT   DD SYSOUT=*                   
//SORTIN   DD DSN=YOUR VSAM KSDS,     
//            DISP=SHR     
//SORTOUT  DD DSN=YOUR OUTPUT SEQ FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=PROD,
//            SPACE=(CYL,(X,Y),RLSE)
//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
Biskhel
Beginner


Joined: 09 Mar 2006
Posts: 5
Topics: 2

PostPosted: Fri Apr 21, 2006 7:44 am    Post subject: Reply with quote

Thanks Kolusu!

But logically that ICETOOL also doing the same thing you mentioned. Anyway I have tried what you suggested and also giving same result.

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


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

PostPosted: Fri Apr 21, 2006 8:11 am    Post subject: Reply with quote

Biskhel,

Ok then the data in the vsam file itself has zeroes. can you post your sysout from the job I gave?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Fri Apr 21, 2006 11:15 am    Post subject: Reply with quote

The VSAM input file is variable-length (30 to 50 bytes). I suspect you're treating it as fixed-length (F) in which case the missing bytes are padded with binary zeros. If you treated the input file as variable-length (V) then the output records would also be variable-length and not padded.

If you want the output file to have RECFM=FB and LRECL=50 with the short records padded with blanks, use these control statements:

Code:

//TOOLIN DD *
COPY FROM(INFILE) USING(CTL1) VSAMTYPE(V)
//CTL1CNTL DD *
   OUTFIL FNAMES=OUTFILE,OUTREC=(5,50)
/*

_________________
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
Biskhel
Beginner


Joined: 09 Mar 2006
Posts: 5
Topics: 2

PostPosted: Tue Apr 25, 2006 4:25 am    Post subject: Reply with quote

Thanks Frank,

Actually I am not using OUTFIL but I am using like this:

COPY FROM(INFILE) TO(OUTFILE) USING(CTL1)

CTL1:
OUTREC FIELDS=(1,50)

This method is not supporting the option VTOF.

How can I solve this problem?

Biskhel
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: Tue Apr 25, 2006 9:49 am    Post subject: Reply with quote

You can use VTOF on the OUTFIL statement with an OUTREC or BUILD parameter. (You cannot use VTOF on the OUTREC statement.) You probably want something like this:

Code:

//TOOLIN DD *
COPY FROM(INFILE) USING(CTL1) VSAMTYPE(V)
/*
//CTL1CNTL DD *
   OUTFIL FNAMES=OUTFILE,VTOF,OUTREC=(5,50)
/*


Note that 1,50 would include the RDW, whereas 5,50 starts with the first data byte.

For more information on DFSORT's VTOF operand, see the "VB to FB conversion" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
_________________
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