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 

Zero out every record in file using SYCSORT

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


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Wed Nov 23, 2005 12:03 pm    Post subject: Zero out every record in file using SYCSORT Reply with quote

Hi ,

I need to zero out out-rec starting from Pos : 43 to Pos :250..

Can any one let me know the syntax for this using SYNCSORT?

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


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

PostPosted: Wed Nov 23, 2005 1:10 pm    Post subject: Reply with quote

tattva,

Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.

What kind of zeroes? Binary zeroes or character '0' ?

Kolusu

PS: Please post in the right forum. This should be posted in the utilities forum. I am moving it there
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tattva
Beginner


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Wed Nov 23, 2005 2:03 pm    Post subject: Reply with quote

Hi kolusu,

Some are COMP-3 and some are COMP.

The problem am facing here is there 17 comp FILEDS which need to be zeroed out and 12 COMP fields.

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


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

PostPosted: Wed Nov 23, 2005 2:09 pm    Post subject: Reply with quote

Tattva,

For comp-3 fields you need to populate the Sign also. Assuming that you have a 4 byte comp-3 field you need to code
Code:

X'0000000C'


And for a 4 byte binary(COMP) fields you can simply code
Code:

4Z


Z is x'00'

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
tattva
Beginner


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Wed Nov 23, 2005 3:28 pm    Post subject: Reply with quote

Hi Kolusu,

Thanks a lot for the reply..

I have one more ques..

say i have a COMP-3 field which is 100 byte in length.. then do we have to insert 000... ( 100 times) to zero out this field?

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


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

PostPosted: Wed Nov 23, 2005 7:15 pm    Post subject: Reply with quote

Quote:

say i have a COMP-3 field which is 100 byte in length.. then do we have to insert 000... ( 100 times) to zero out this field?


tattva,

I guess it is NOT single field of 100 bytes. May be it is a series of comp-3 fields. Clarify that and I will show you a way to do it.

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
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Nov 24, 2005 8:45 am    Post subject: Reply with quote

Tattva,

I guess you got what Kolusu is trying to say. You cannot have any numeric field in mainframe which is greater than 18 bytes (in extended more - 32 bytes). When you take up a COMP-3 field, the last half bit of it would be sign-bit. So you cannot force it to be a Zero.

So, show us the split up of fields in the 100 bytes and we can get back to you where to put zeroes and where to put sign.

Thanks,
Phantom
Back to top
View user's profile Send private message
tattva
Beginner


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Tue Nov 29, 2005 12:57 pm    Post subject: Reply with quote

Hi Kolusu,

Sorry for the dealy in replying..

I was just giving any example over there..

Here's exactly what i want.

I have 20 COMP-3 fields length :- 10 bytes and

12 COMP fileds :- length 4 bytes.

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


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

PostPosted: Tue Nov 29, 2005 1:04 pm    Post subject: Reply with quote

tattva,

For 20 comp-3 fields of 10 bytes length, you can code

Code:

20X'0000000000000000000C'


for 12 comp fields of 4 bytes length, you can code

Code:

48Z

_________________
Kolusu
www.linkedin.com/in/kolusu
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