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

Reformat the fields in Output file (without effecting i/p )


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

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Feb 24, 2010 5:34 pm
Reply with quote

Dear Experts,

My rquirement is as follows:

I/P File Length = 65
O/P File Length = 65
Targeted Column position (tcol) = 45 to 48 (4 char)

If the value in targeted column = 'AB '
then change it to 'ABCD'
all the other records remain constant.

I wrote the sort card as follows:

Code:
SORT FIELDS=COPY                                         
OUTREC IFTHEN=(WHEN=(45,4,CH,EQ,C'AB  '),OVERLAY=(45:C'ABCD'))


With the above sort card, I achieved my desired output file.
But please advice whether this sort card is efficient or is there any other way to write the same in performance point of view.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Feb 24, 2010 8:33 pm
Reply with quote

Hello,

Suggest you run a simple experiment of
1. a copy with no overlay
2. the same copy with the overlay

The resources required will be very similar. . .
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Feb 25, 2010 12:20 pm
Reply with quote

mkk157 wrote:
But please advice whether this sort card is efficient or is there any other way to write the same in performance point of view.

This looks straight forward.
Does your job is taking longer time?
if so how many records job is processing?
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Feb 25, 2010 4:51 pm
Reply with quote

Hi Dick / Sambhaji,

Yes. File contains 20 Million records.
Without Overlay command, its taking 55 sec.
With Oerlay command, its taking 2.28 sec
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Feb 25, 2010 5:14 pm
Reply with quote

I don't have any good reasons but can you give stats for this..
Code:

SORT FIELDS=COPY                                         
OUTREC IFTHEN=(WHEN=(45,4,CH,EQ,C'AB  '),OVERLAY=(47:C'CD'))

Some shooting practice in air icon_rolleyes.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Feb 25, 2010 9:27 pm
Reply with quote

Hello,

Quote:
Without Overlay command, its taking 55 sec.
With Oerlay command, its taking 2.28 sec
Typo?

What are these "times"?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Feb 26, 2010 12:52 am
Reply with quote

IFTHEN and OVERLAY do add CPU time. That's the "penalty" you pay for "doing something".

Things you could try to possibly reduce the CPU time (although you won't know without trying them):

Use INREC instead of OUTREC

Use BUILD instead of OVERLAY

You could also try NOT using IFTHEN and instead just use CHANGE and NOMATCH without IFTHEN.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Feb 26, 2010 2:17 am
Reply with quote

Hi Frank,

Quote:
IFTHEN and OVERLAY do add CPU time. That's the "penalty" you pay for "doing something".
Which is why i guessed there might be a typo with the "stats". . .

Maybe some clarification will be posted?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Feb 26, 2010 2:28 am
Reply with quote

Dick,

I just assumed he meant 55 sec and 2.28 min.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri Feb 26, 2010 5:49 pm
Reply with quote

Hi Dick & Frank,

I'm sorry for not posting. Yesterday, I was not online

Without Overlay command, its taking 55 sec.
With Oerlay command, its taking 2.28 min
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Feb 26, 2010 9:22 pm
Reply with quote

Thank you for the clarification icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts IGYPG3178-I when compiling a pgm read... COBOL Programming 6
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts To Populate Trailer cnt in the file w... SYNCSORT 1
Search our Forums:


Back to Top