How to write Signed Numeric fields in Syncsort?



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

How to write Signed Numeric fields in Syncsort?

Postby pjagathis » Fri Jun 22, 2012 10:22 am

Hi,

I have read the signed numeric fields and rollup the records based on first 2 bytes.

Again I have to write in same format.

My Input File:

02 00000000{
01 00000000{
04 00000001E
01 00000000{
02 00000000{
14 00000000{
13 00000000{
13 00000000{
14 00000000{




Required Output File:


02 00000000{
01 00000000{
04 00000001E
14 00000000{
13 00000000{



Code Used:

Sort Fields=(1,2,CH,A)
 Sum Fields=(3,9,ZD)
Outrec Fields=(001:001,002,
003:X,
004:004,009,ZD,DIV,+10,EDIT=(SIIIIIIIIIT))


Please any one help me. Since writing in unpack format but i need as it is in input format.
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: How to write Signed Numeric fields in Syncsort?

Postby BillyBoyo » Fri Jun 22, 2012 12:23 pm

If you want the same format as the input, you have no need of the OUTREC at all. If that is not what you want, you'll have to explain better.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to write Signed Numeric fields in Syncsort?

Postby dick scherrer » Fri Jun 22, 2012 7:18 pm

Hello,

Your code shows SORTing the file on the "key" but your "Required output" is not in that order. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to write Signed Numeric fields in Syncsort?

Postby pjagathis » Wed Jul 04, 2012 11:51 am

Hi d.sch.,

I have manually created the output.. as you said.. it should be in sorted order based on key fields.

Hi BillyBoyo,

I will check on this and let you know soon...
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: How to write Signed Numeric fields in Syncsort?

Postby dick scherrer » Thu Jul 05, 2012 8:40 am

Hello,

If you want the output in the same format as the input, do not use EDIT. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to write Signed Numeric fields in Syncsort?

Postby pjagathis » Thu Jul 05, 2012 10:22 am

Hi dick,

I tried without giving the OUTREC, but it doen't works...

Input:

111111111111100006561{
111111111111100000000{
111111111111100000000{
111111111111100000218G



output :

1111111111111000067797



Code Used:

**                             
    SORT FIELDS=(01,13,CH,A)   
**                             
  SUM FIELDS=(14,9,ZD)         



But i require the output in same as input format..


Could you please help me.....

thanks in advance....
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: How to write Signed Numeric fields in Syncsort?

Postby BillyBoyo » Thu Jul 05, 2012 1:25 pm

If you look in your documentation, you might find ZDx for a field type which preserves the sign. I don't have Syncsort documentation.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to write Signed Numeric fields in Syncsort?

Postby dick scherrer » Thu Jul 05, 2012 7:23 pm

Hello,

It appears that the output is exactly as specified. Try ZDC and if this does not do what you want try ZDF (both are supported by Syncsort).

If anything is not what you want, post your code and the result here and we can continue.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post