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
 

 

How can we generate sequence no. by using easytrieve

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

New User


Joined: 30 Jul 2014
Posts: 3
Location: india

PostPosted: Sat Aug 09, 2014 1:15 pm    Post subject: How can we generate sequence no. by using easytrieve
Reply with quote

How can we generate sequence no. by using easytrieve
here is my requirement

Input:
aaaaa
bbbbb
aaaaa
bbbbb
aaaaa
aaaaa
aaaaa
bbbbb

Output file should look like:
aaaaa 1
bbbbb 1
aaaaa 2
bbbbb 2
aaaaa 3
aaaaa 4
aaaaa 5
bbbbb 5


the seq no. should increase only when it is aaaaa.

Can any one have the code for the same.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Sat Aug 09, 2014 2:37 pm    Post subject: Reply to: How can we generate sequence no. by using easytrie
Reply with quote

You define a field to keep a count in, with an initial value of zero.

You test your input record for aaaa, and add one to the count if it is.

You assign the current value of the account to a field in the output record.

What problem is this giving you?

It is easy in SORT as well.,
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Sat Aug 09, 2014 3:32 pm    Post subject:
Reply with quote

Come on Bill, the TS is asking for the code.
Back to top
View user's profile Send private message
srinivasarao.gunja

New User


Joined: 30 Jul 2014
Posts: 3
Location: india

PostPosted: Sat Aug 09, 2014 5:01 pm    Post subject: Reply to: How can we generate sequence no. by using easytrie
Reply with quote

Bill.. is it possible to provide the code ..
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Sat Aug 09, 2014 9:32 pm    Post subject:
Reply with quote

36_2_18.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Sun Aug 10, 2014 4:43 am    Post subject: Reply to: How can we generate sequence no. by using easytrie
Reply with quote

I've provided the spec for the code. You have to do the typing. It is a massively simple thing.
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 Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts RACF Easytrieve Plus macro Susan Jackson CA Products 0 Fri Jun 03, 2016 8:25 pm
No new posts Generate Cohort report using SORT Indrajit_57 SYNCSORT 6 Wed Jun 01, 2016 9:41 am
No new posts How to map virtual printer in JCL, to... user_22 JCL & VSAM 6 Fri Apr 15, 2016 10:04 pm


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