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

Editing fields through SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 577
Location: USA

PostPosted: Thu Aug 11, 2011 5:32 pm
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
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: 6966
Location: porcelain throne

PostPosted: Thu Aug 11, 2011 6:21 pm
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
Reply with quote

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

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Aug 11, 2011 7:02 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top