|
View previous topic :: View next topic
|
| Author |
Message |
yuvan
New User
Joined: 10 Jan 2006 Posts: 23 Location: India
|
|
|
|
Hi Team ,
I am having issues in synscsort for below record
My Input record
-0172
-1613
-0161
+1872
My output should be
17.2
-161
-16.1
187.2
I used the below sort card
Sort fields=copy
outrec fields=(1,5,SFF,EDIT=(SIT.T),SIGNS=(,-),LENGTH=5)
but I am getting
-17.2
-61.3
-16.1
87.2
First character in record 2 and record 3 is truncated , Could you please help me to retain the left most characters.
I am not able to copy the code to here , Just typed the code from mainframe.
Please bear with me. |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
1 - Why post in JCL & VSAM - this is not a JCL or VSAM problem but a Syncsort problem?
2 - Why not post in the Syncsort section of the forum as it is a Syncsort question?
3 - Why - after 14 years as a member, do you not use the code tags for your code?
4 - topic moved. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1436 Location: Bamberg, Germany
|
|
|
|
Why not just updating the EDIT mask?
| Code: |
| OUTREC BUILD=(1,5,SFF,EDIT=(SIIT.T),SIGNS=(,-),LENGTH=5) |
| Code: |
-17.2
161.3
-16.1
187.2 |
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2275 Location: USA
|
|
|
|
| Joerg.Findeisen wrote: |
Why not just updating the EDIT mask?
| Code: |
| OUTREC BUILD=(1,5,SFF,EDIT=(SIIT.T),SIGNS=(,-),LENGTH=5) |
| Code: |
-17.2
161.3
-16.1
187.2 |
|
The possible max number of digits in the input value is 5. Only 4 of them will be displayed, the high order digit just silently disappears...
Instead of 12345 you’ll get: 234.5 |
|
| Back to top |
|
 |
yuvan
New User
Joined: 10 Jan 2006 Posts: 23 Location: India
|
|
|
|
Hi Team ,
Apologies for not tagging the question against syncsort .
Used the OUTREC BUILD=(1,5,SFF,EDIT=(SIIT.T),SIGNS=(,-),LENGTH=5)
But ,second record sign is removed ,
Code:
-17.2
161.3
-16.1
187.2
It should be
-161 or -161. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2275 Location: USA
|
|
|
|
| yuvan wrote: |
Hi Team ,
Apologies for not tagging the question against syncsort .
Used the OUTREC BUILD=(1,5,SFF,EDIT=(SIIT.T),SIGNS=(,-),LENGTH=5)
But ,second record sign is removed ,
Code:
-17.2
161.3
-16.1
187.2
It should be
-161 or -161. |
Two solutions are possible:
1) prohibit entering input values which do not fit the output field, or
2) adjust the output field to enough number of possible input digits, plus optional sign.
You can choose any of those options. |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
change the offsets accordingly.
| Code: |
//S1 EXEC PGM=SORT
//SORTIN DD *
-0172
-1613
-0161
+1872
//SORTOUT DD DSN=YOUR DSN
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC OVERLAY=(10:1,5,SFF,EDIT=(SIIT.T),SIGNS=(,-),LENGTH=6,
10:10,6,SQZ=(SHIFT=LEFT)) |
|
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|