IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SYNCSORT: OUTREC Numeric edited field


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dipakgoyal
Warnings : 1

New User


Joined: 02 Aug 2007
Posts: 18
Location: Kolkata

PostPosted: Mon Jan 10, 2011 4:54 pm
Reply with quote

I have an input-file, with a field
IN-AMT PIC S9(05)V999 SIGN IS LEADING SEPARATE CHARACTER.

The first 2 values are:
+00112.738
+00024.119

When I used the SYNCSORT to download it to a output file, using:

OUTREC FIELDS=(001:197,08,ZD,
010:C';',

The output I get is:

112730-;
24110-;

i.e.
1. Decimal is not printed
2. Negative sign coming in the end
3. LSB is truncated


Please note that increasing the input-field length , i.e using
OUTREC FIELDS=(001:197,09,ZD,
results in S0C7

Is there any way, apart from using EDIT=TTT.TTT
using which I can get the same output as input
like the way we use ZD,M4?
Back to top
View user's profile Send private message
nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Mon Jan 10, 2011 6:31 pm
Reply with quote

Try this out.....


SORT FIELDS=COPY
OUTREC FIELDS=(1:1,10,SFF,EDIT=(STTTTT.TTT),SIGNS=(+,-))
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jan 11, 2011 11:30 am
Reply with quote

nareshdacha,

The field under question occupies ONLY 9 bytes and NOT 10 bytes as in your post.

dipakgoyal,

I believe this would work for you.
Code:
OUTREC FIELDS=(1:197,9,ZD,EDIT=(STTTTT.TTT),SIGNS=(+,-))
Back to top
View user's profile Send private message
dipakgoyal
Warnings : 1

New User


Joined: 02 Aug 2007
Posts: 18
Location: Kolkata

PostPosted: Thu Jan 13, 2011 4:10 pm
Reply with quote

Thanks Arun
It solves the purpose
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Jan 14, 2011 11:05 pm
Reply with quote

Youre welcome. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top