IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

help,how to control sequence number after sort?


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Feb 13, 2012 3:20 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Feb 13, 2012 5:11 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Feb 13, 2012 5:53 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top