Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us