Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort Question - Reformat Data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sort Question - Reformat Data
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 Moderator


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

PostPosted: Thu Feb 08, 2007 9:29 pm    Post subject:
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    Post subject:
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us