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

Sort Question - Reformat Data


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

New User


Joined: 16 Nov 2005
Posts: 23

PostPosted: Thu Feb 08, 2007 7:38 pm
Reply with quote

Hi,

I have a question on Sort the file

i/p datarecords:-

ABC COMPANY REPORT

12 GANGA 500
12 DHAR 1500
23 ABCD 1200
12 DEFG 1400

i want the update i/p data byusing the sort verb like
instead of
ABC COMPANY REPORT,it needs to change it as
XYZ COMPANY REPORT

and only number '12' it needs to change as '9E'

The outpuut look like as below

XYZ COMPANY REPORT

9E GANGA 500
9E DHAR 1500
23 ABCD 1200
9E DEFG 1400

Please help me how we can do it by sort.Thanks in advance.

Regards,
Ganga
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: Thu Feb 08, 2007 9:29 pm
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
ABC COMPANY REPORT

12 GANGA 500
12 DHAR   1500
23 ABCD  1200
12 DEFG   1400
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(5,18,CH,EQ,C'ABC COMPANY REPORT'),
         OVERLAY=(1:C'XYZ')),
        IFTHEN=(WHEN=(1,2,CH,EQ,C'12'),
         OVERLAY=(1:C'9E'))
/*
Back to top
View user's profile Send private message
ganga79

New User


Joined: 16 Nov 2005
Posts: 23

PostPosted: Fri Feb 09, 2007 8:07 am
Reply with quote

Hi Frank,
Thanks for you help.

Regards,
Ganga
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 How to split large record length file... DFSORT/ICETOOL 7
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top