Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Editing fields through SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Aug 11, 2011 4:42 pm    Post subject: Editing fields through SORT
Reply with quote

Hi,
I have one file (FB,RECL=80) which has one field whose value is in the format like 999,999.99
I wanted to do summation of this field before which I wanted to convert that to 99999999. I used below in sort but it is giving error S0C7

INREC FIELDS=(02,11,ZD,EDIT=(IIIIIIIIIIT))
SORT FIELDS=COPY

Anybody know how to do this?
Back to top
View user's profile Send private message

sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Thu Aug 11, 2011 5:32 pm    Post subject:
Reply with quote

Shriram Jogdand,
Please show us sample input and if possible input field's declaration as well. Looks like your input is assumed decimal.

Thanks,
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Aug 11, 2011 5:58 pm    Post subject: Reply to: Editing fields through SORT
Reply with quote

The input field looks like

19,738.10
10.00
19,559.00
7,198.72
0.00

This file is created through sort and had edited this in outrec as (III,III,III.IT)
I wanted to revert back to have without comma and decimal.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Aug 11, 2011 6:21 pm    Post subject:
Reply with quote

Maybe UFF to ZD
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Aug 11, 2011 6:38 pm    Post subject: Reply to: Editing fields through SORT
Reply with quote

It worked. Thanks.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Thu Aug 11, 2011 7:02 pm    Post subject:
Reply with quote

Shriram Jogdand,
My 2 cents... If you are creating input file for this process,using SORT and OUTREC, why not use OUTFIL FNAMES to save one pass? Something like below for 80 byte fb file. All you have to do is replace OUTREC with OUTFIL FNAMES and add another OUTFIL FNAMES with fields you want.

Code:
//SYSIN    DD *                                                       
 OPTION COPY                                                         
 OUTFIL FNAMES=OUT1,BUILD=(1,1,                                       
                           2,11,ZD,EDIT=(III,III,III.IT),LENGTH=14,    --> File created from previous step 
                           13,68)                                     
 OUTFIL FNAMES=OUT2,BUILD=(1,80)                                       --> File that you need in the original post.
/*                                                                   

Thanks,
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us