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

Sort w/OUTREC Question


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Keith Ahearn

New User


Joined: 21 May 2015
Posts: 2
Location: USA

PostPosted: Fri Jul 30, 2021 9:14 pm
Reply with quote

Hi all,

Long time since I posted here.

Question: I'm using a sort with OUTREC to replace decimals on a flat file with 0. I've got it working but at the end of each record, the sort is replacing the value in the field with a decimal ('.'). Not sure why this is happening.

Here's what I'm coding for the OUTREC (LRECL=117)
OUTREC FIELDS=(1,43,44,1,CHANGE=(1'.C',C'0'),NOMATCH=(44,1),45,72)

The sort is changing the field (44) as I want but like I said, it's also changing the last position (117) from the value in there (numeric) to a decimal point.

I'm not overly familiar with using OUTREC like this hence my question.

Appreciate any input!
Back to top
View user's profile Send private message
Keith Ahearn

New User


Joined: 21 May 2015
Posts: 2
Location: USA

PostPosted: Fri Jul 30, 2021 9:42 pm
Reply with quote

I figured it out. Works better with the right # of bytes coded for the rest of the record after the NOMATCH (73 instead of 72). icon_rolleyes.gif

Since I started this, is there anyway to concatenate 2 of these statements? I have it working now in 2 steps because I have decimals in 2 places on the records that I want to replace. Can you run this once in a single sort?

Thanks again.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Sat Jul 31, 2021 3:25 am
Reply with quote

There are many ways and if you do a SEARCH on this forum you will get examples too. You can use IFTHEN and OVERLAY feature as easy and flexible way.
Show us input data and expected output using code tags. I moved to DFSORT unless you tell me you got SYNCSORT.
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