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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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