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

How can we generate sequence no. by using easytrieve


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

Moderator Emeritus


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

PostPosted: Sat Aug 09, 2014 2:37 pm
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Sat Aug 09, 2014 3:32 pm
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
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: 2481
Location: Netherlands, Amstelveen

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

36_2_18.gif
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: Sun Aug 10, 2014 4:43 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts Count the number of characters in a f... CA Products 1
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
Search our Forums:

Back to Top