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 

Inserting Zero using SORT

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


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Fri Feb 11, 2011 9:38 am    Post subject: Inserting Zero using SORT Reply with quote

Hi All,
Gud mrg!!

Can anyone tell me how to insert ZERO in file for S9(9) COMP-3 variable using SORT condition.

Thanks!!

Rgds,
Puttu
Back to top
View user's profile Send private message Send e-mail
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Fri Feb 11, 2011 11:26 am    Post subject: Reply with quote

S9(9) COMP-3 is a 5-byte PD value. So you could use BUILD or OVERLAY with:

+0,TO=PD,LENGTH=5

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
_________________
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
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Fri Feb 11, 2011 1:00 pm    Post subject: Reply with quote

Frank,

Thanks a lot.

I am getting a small error. Kindly find the below details & suggest me.
My requirement is, I need to copy the records from one VSAM to another VSAM file.
I have a input VSAM file with 220 record length and Output VSAM file record length of 320.

Now from input VSAM file i need data from 1,209 and from 210 t0 214 (S 9(9) COMP-3 variable) i need to insert ZERO and rest of the data should be spaces or zeros.

Kindly can you send me the syntax.

Rgds,
Puttu
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Feb 11, 2011 1:27 pm    Post subject: Reply with quote

Puttu,


Use following DFSORT Control cards.

Code:

//SYSIN    DD *                                 
  SORT FIELDS=COPY                             
  RECORD TYPE=F                                 
  INREC BUILD=(1,209,+0,TO=PD,LENGTH=5,320:X)   
//*

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


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Sun Feb 13, 2011 2:41 am    Post subject: Reply with quote

Thanks a lot to all of you.
I got results correctly.

Rgds,
Puttu
Back to top
View user's profile Send private message Send e-mail
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