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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm

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