View previous topic :: View next topic |
Author |
Message |
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Wed Nov 23, 2005 12:03 pm Post subject: Zero out every record in file using SYCSORT |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Nov 23, 2005 1:10 pm Post subject: |
|
|
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 |
|
|
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Wed Nov 23, 2005 2:03 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Nov 23, 2005 2:09 pm Post subject: |
|
|
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
And for a 4 byte binary(COMP) fields you can simply code
Z is x'00'
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Wed Nov 23, 2005 3:28 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Nov 23, 2005 7:15 pm Post subject: |
|
|
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 |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Nov 24, 2005 8:45 am Post subject: |
|
|
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 |
|
|
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Tue Nov 29, 2005 12:57 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Nov 29, 2005 1:04 pm Post subject: |
|
|
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
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|