How to CENTER align in SYNCSORT?



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

How to CENTER align in SYNCSORT?

Postby pjagathis » Thu Aug 25, 2011 12:41 pm

HI,

I need to center align the data in the file.

Eg,
If we want to left align we will give the following code...
SORT FIELDS=COPY                       
OUTREC FIELDS=(1,09,JFY=(SHIFT=LEFT))

If we wnat to right align we will give the following code...
SORT FIELDS=COPY                       
OUTREC FIELDS=(1,09,JFY=(SHIFT=RIGHT))

Please help me for CENTER align...

ThanX 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 CENTER align in SYNCSORT?

Postby BillyBoyo » Thu Aug 25, 2011 1:32 pm

I think you are asking a lot. This is not a word-processor. There are reasons for justifying left (character data) and right (numeric data). No reason to "centre" data in a general way.

As far as I know, CENTERing can only be done for any titles coming with reports for SORT. Look at your manuals to check.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to CENTER align in SYNCSORT?

Postby pjagathis » Thu Aug 25, 2011 2:29 pm

HI BillyBoyo,

I didn't find any syntax in manual.. I also searched but can't find the syntax for Center align..

Please advice...

ThanX 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 CENTER align in SYNCSORT?

Postby BillyBoyo » Thu Aug 25, 2011 3:16 pm

My point was, if there is nothing in the manual, why would you expect the functionality to be available in your SORT? There is no general-purpose "reason" to centre something in a field, whereas there is for justifying left/right.

So, if you can let us know about what your actual requirement is, maybe we can make some suggestions.

To prompt, are you having to sort the file anyway, or are you just thinking that sort should be able to do it, so bang it in there anyway with FIELDS=COPY?

If the latter, write something in some appropriate language that you know. If the former, you could consider writing a sort "exit", which is not as difficult as it may sound (if you don't know what an "exit" is, it might not even sound difficult :-) ).
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to CENTER align in SYNCSORT?

Postby pjagathis » Fri Aug 26, 2011 1:06 pm

HI BillyBoyo,

If all the options are availablr in manual, then y this forum is funtioning...

this forum is to discuss the possibilities.. not saying wat exactly present in the manual or any other material..

If ther is possiblities, then post your answer...
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 CENTER align in SYNCSORT?

Postby BillyBoyo » Fri Aug 26, 2011 3:14 pm

Well, I'm sorry, I've tried twice already. I don't think you'll find what you want in the manual, but I can't check for you as I don't have a SyncSORT manual. I don't think it will be there, because it is not a common thing to do for a piece of data. Only things I've ever centred are headings. That, you can probably do in SyncSORT, but I can't check (see earlier point).

To centre a field, you'd need to know the length of the field itself, and the length of the data (presumably variable per record). At this stage, I think, with nothing built-in, it would get tricky with a SORT.

If your data is fixed, then the centreing has been easy all along. You know how much space to leave at the left, and the right, and put your field in the middle.

If you really want to do it with SORT, you have to work out beforehand the spacing for treating each of the possible lengths of your field as a fixed-length item.

If your field is 10 bytes and you want to centre it in 10, then

10 bytes long, 0 left, 0 right, displacement in field 0.
9 bytes long, 1 left, 0 right, displacement in field 1.
8 bytes long, 1 left, 1 right, dispalcement in field 1.
7 bytes long. 2 left. 1 right, displacement in field 2.
etc
The field has to be relocated to start at the displacement. The left and right lengths have to be set to blank.

The size of your fields dictates how tedious and error-prone this is to code out. I suppose once it is done, it is done. If you go that way, please post back your solution, as it might help others.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to CENTER align in SYNCSORT?

Postby pjagathis » Fri Aug 26, 2011 5:15 pm

BillyBoyo,

ThanX for your valuable information...
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 CENTER align in SYNCSORT?

Postby NicC » Fri Aug 26, 2011 10:47 pm

If all the options are availablr in manual, then y this forum is funtioning...


a) because people do not read the manuals
b) they do not believe the manuals
c) because something they want is not in the manual but they believe the program can still do what they want.
d) etc.

Note: I want a program to wash my dishes - not in the manual? no problem the program can still do it - it just is not documented. Get real. The manuals define the scope of the program and how to use it. If it is not in the manual then the program cannot do it. period. full stop. (If it can do it but it is not documented then do not do it as the next release may remove that facility or it may be beta code)
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to CENTER align in SYNCSORT?

Postby dick scherrer » Sat Aug 27, 2011 12:22 am

Hello,

this forum is to discuss the possibilities.. not saying wat exactly present in the manual or any other material..
Who told you this. . . :?

This forum is to help beginners get their feet on the ground.

These days, the product manuals are quite comprehensive. There are few "undocumented features" and if you stumble on to one, it is best not to use it for anything other than a one-time shot. Most vendors have eliminated these with little or no warning. . .

"Discussing possibilities" should be left to rather senior people in a different envionment. If one is building a foundation, they are most likely not yet suited to discussing possibilities. . . Maybe different wording would have more clearly expressed your thought.
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 CENTER align in SYNCSORT?

Postby steve-myers » Sat Aug 27, 2011 1:31 am

pjagathis wrote:HI BillyBoyo,

If all the options are availablr in manual, then y this forum is funtioning...
Sometimes - not always - there are undocumented capabilities in a product that someone on a forum like this may know about. Sometimes - not always - there are documented ways to achieve some unexpected capability that someone on a forum like this may know about. Now pjagathis is disappointed that no one knows a way to achieve a capability that seems unlikely on a sort product, but my feeling (and I'm not a Syncsort user, so don't blame me) is he should move on, or try to figure out some other way to achieve his goal. This is a primary reason why sort products provide an E35 exit. Find out about this exit and use it.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post