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
 

 

Remove some record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
salltm

New User


Joined: 21 Aug 2008
Posts: 8
Location: china

PostPosted: Tue May 17, 2011 3:27 pm    Post subject: Remove some record
Reply with quote

Hi. All, i have a problem:

file A:
Quote:
AAAA 10{ --- 10{ means '-100'
AAAA 10} --- 10} means '+100'
BBBB 23{
AAAA 33{


The first 4 bit is the KEY, and the next is the money.

my requirement is to remove some 'group record'
say: the 'AAAA 10{ ' and 'AAAA 10} ' . they have the same key. but the
money = -1 X money of other record.
in my requirement. i need to remove the two record.
and the output will have

Code:
BBBB 23{
AAAA 33{


i want to use 'SORT' to do it.

can anyone help me to design the sort card. thanks a lot.
Back to top
View user's profile Send private message

gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue May 17, 2011 4:26 pm    Post subject:
Reply with quote

This might help

SORT FIELDS=(1,4,CH,A)
SUM FIELDS=(6,3,ZD)
Back to top
View user's profile Send private message
salltm

New User


Joined: 21 Aug 2008
Posts: 8
Location: china

PostPosted: Tue May 17, 2011 5:01 pm    Post subject:
Reply with quote

gylbharat wrote:
This might help

SORT FIELDS=(1,4,CH,A)
SUM FIELDS=(6,3,ZD)


thanks for your reply.
but i don't want to do the Sum().

Code:
AAAA 10{
AAAA 10} 
BBBB 23{
AAAA 33{
BBBB 43{


The output shuld be:

Code:
BBBB 23{
AAAA 33{
BBBB 43{


because i just need to remove some record with same absolute value.
remove 100 and -100. if there is no any record matchs. just keep it.
say: the 'BBBB 43{', there is no record like 'BBBB 43}' , It should be kept.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 17, 2011 5:59 pm    Post subject:
Reply with quote

Will always absolute + - value will come consicutively like you have shown in the example?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 17, 2011 6:13 pm    Post subject:
Reply with quote

What is the expected output for below sample input?

Code:

AAAA 10{
AAAA 10} 
BBBB 23{
AAAA 33{
BBBB 43{
AAAA 10} 
BBBB 43} 
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: Tue May 17, 2011 11:04 pm    Post subject:
Reply with quote

salltm,

You need to do a much better job of explaining the complete rules for what you want to before anyone can help you.

10{ is X'F1F0C0' which is a ZD field of -100.
10} is X'F1F0D0' which is a ZD field of +100.

Do you have values that end with something other than { and } such as 10E = X'F1F0C5' = +105 and 10N = X'F1F0D5' = -105? If so, how do you want to handle those.

Can you only have two records with each key and +/- value, or can you have more. For example, could you have:

Code:

AAAA 10{
AAAA 10}
AAAA 10{
BBBB 10}
BBBB 10}
BBBB 10{
BBBB 10{
BBBB 10{


and if so, what would you want for output in that case based on what rules?

You need to show a better example of input that covers all possible cases of interest and the expected output for those cases. You need to explain the complete rules for getting from input to output. Also, give the RECFM and LRECL of your input file, and the starting position, length and format of all relevant fields.
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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm


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