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
 

 

help,how to control sequence number after sort?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Mon Feb 13, 2012 3:09 pm    Post subject: help,how to control sequence number after sort?
Reply with quote

Code:

SEQ-NO  ID          CCY       AMT
1       A123456XXX  USD$    10.00
2       B123456XXX  USD$    15.00
3       C123456XXX  USD$    25.00
                    USD$    50.00
1       A123456XXX  GBP$     5.00
2       B123456XXX  GBP$     5.00
3       C123456XXX  GBP$   102.00
                    GBP$   112.00
1       A123456XXX  xxx     10.00
2       B123456XXX  xxx     15.00
3       C123456XXX  xxx     25.00
                    xxx     50.00
1       A123456XXX  aaa      5.00
2       B123456XXX  aaa      5.00
3       C123456XXX  aaa    102.00
                    aaa    112.00
1       A123456XXX  sss     10.00
2       B123456XXX  sss     15.00
3       C123456XXX  sss     25.00
                    sss     50.00
1       A123456XXX  ccc      5.00
2       B123456XXX  ccc      5.00
3       C123456XXX  ccc    102.00
                    ccc    112.00




Dear guys,

I wanna have a report like above, anybody let me know how to control the sequence? I tried before line and report-in to add 1 to seq-no but didn't effective. I sorted the input records by CCY in report SEQUENCE control.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Mon Feb 13, 2012 3:20 pm    Post subject: Re: help,how to control sequence number after sort?
Reply with quote

Please use the Code tags to preserve spacing for data requiring that.

In a general forum area like this one, it would be good to indicate you are talking about Easytrieve Plus.

What order do you want these in within currency?
Back to top
View user's profile Send private message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Mon Feb 13, 2012 5:00 pm    Post subject:
Reply with quote

thanks Bill Woodger.

Actually I cannot get the right sequence number like in the code. The sequence no is 1,2,3,4....and after the CCY break, it restart begin with 1,2,3,4...like that. now I don't how to control that sequence number.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Mon Feb 13, 2012 5:11 pm    Post subject: Reply to: help,how to control sequence number after sort?
Reply with quote

Still not sure I'm following.

Code:
SEQUENCE +
         CCY +
         SEQ-NO


Will cause the report to be sequence on currency followed by sequence number. You can SEQUENCE on as many fiedls as necessary.

Or are you asking something else?
Back to top
View user's profile Send private message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Mon Feb 13, 2012 5:43 pm    Post subject:
Reply with quote

Code:

                                   
SEQ NO   CUST NO   BR NO           
------  ---------  -----  ---------
000008  000116930  00061  HAHA     
000078  000116930  00061  HAHA     
000050  000116930  00061  HAHA     
000036  000116930  00061  HAHA     
000064  000116930  00061  HAHA     
                                   
REPORT ID:   MDRLCB01             
REPORT DATE:  2/13/2012           
                                   
                                   
                                   
SEQ NO   CUST NO   BR NO           
------  ---------  -----  ---------
000000  000114630  08001  JIANG YI
000082  000114630  08001  JIANG YI
000054  000114630  08001  JIANG YI
000040  000114630  08001  JIANG YI
000068  000114630  08001  JIANG YI


I wanna to:

Code:

                                   
SEQ NO   CUST NO   BR NO           
------  ---------  -----  ---------
000001  000116930  00061  HAHA     
000002  000116930  00061  HAHA     
000003  000116930  00061  HAHA     
000004  000116930  00061  HAHA     
000005  000116930  00061  HAHA     
                                   
REPORT ID:   MDRLCB01             
REPORT DATE:  2/13/2012           
                                   
                                   
                                   
SEQ NO   CUST NO   BR NO           
------  ---------  -----  ---------
000001  000114630  08001  JIANG YI
000002  000114630  08001  JIANG YI
000003  000114630  08001  JIANG YI
000004  000114630  08001  JIANG YI
000005  000114630  08001  JIANG YI


Which means I wanna the SEQ-NO can re-calculate from 1 and add 1 by 1 after each break.thanks!
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Mon Feb 13, 2012 5:53 pm    Post subject: Reply to: help,how to control sequence number after sort?
Reply with quote

You need to define your sequence field as type S not W. Then you can amend it in report procedures to receive your expected results.

See this for fuller explanation.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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