Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT: OUTREC Numeric edited field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SYNCSORT: OUTREC Numeric edited field
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    Post subject: Reply to: SYNCSORT: OUTREC Numeric edited field
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: 2284
Location: @my desk

PostPosted: Tue Jan 11, 2011 11:30 am    Post subject:
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    Post subject:
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: 2284
Location: @my desk

PostPosted: Fri Jan 14, 2011 11:05 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us