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
 

 

Checking for changed and non changed values

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

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Mon Feb 26, 2007 11:11 am    Post subject: Checking for changed and non changed values
Reply with quote

Hi All,

I would like to know how to check if the fields 1-5 of all the records in the input file are the same using DFSORT.The fields have no particular value,the check shud be generic.I jus want to check if the values remain the same.If yes,write those records to the output file.
Back to top
View user's profile Send private message

sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Mon Feb 26, 2007 1:31 pm    Post subject:
Reply with quote

Hi,
Could you plesse put some Example of the i/p and o/p of your requirement?

Thanks
Krishy
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Mon Feb 26, 2007 1:52 pm    Post subject:
Reply with quote

i/p

11111111
11111222
11111222
22222111
33333123

In this input file i wanna check if the first 5 chracters of all the records are same.The check has to be done in a general manner.I dont have any particular values as such.Is this information enof??
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: Mon Feb 26, 2007 9:28 pm    Post subject:
Reply with quote

Quote:
Is this information enof??


No, it isn't. What do expect for the output records? It really isn't clear what you want to do based on your "check". Are the records already in sorted order as shown? Do you want to just write the duplicate records to the output file or do you want to do something else? And what is the RECFM and LRECL of the input file?
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Tue Feb 27, 2007 10:13 am    Post subject:
Reply with quote

I have an input file.It contains 'x' number of records.I want to sort it based on certain conditions which iam able to do.after that this is wat i have to do whcih iam not able to implement.The fields 1-5 of all the records contain the policy number.All i wanna know is how to check if all records contain the same policy number.i donot know wat the policy number is but i jus wanna know if i can check if they are all the same.For eg.the easytrieve eauivalent of this program does this:
IF POLICY NUMBER NOT CHANGED
CALL ABORT.
I wanna know how this can be done thru dfsort/icetool.
These are the properties of the file
Record format . . . : FB
Record length . . . : 39
Block size . . . . : 27963
Back to top
View user's profile Send private message
appu.venkat

New User


Joined: 29 Jan 2007
Posts: 22
Location: India

PostPosted: Tue Feb 27, 2007 12:13 pm    Post subject:
Reply with quote

In other words,I would like to check if the fields 1-5 of all the records in the input datatset match.How can i do this??
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 Feb 27, 2007 10:09 pm    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. It will set RC=12 if there's only one policy number, otherwise RC=0.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=...  input file
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD SYSOUT=*
//TOOLIN   DD    *
* Get first record with each key.
SELECT FROM(IN) TO(T1) ON(1,5,CH) FIRST
* If one policy number, set RC=12.
* If > one policy number, set RC=0.
COUNT FROM(T1) EQUAL(1)
/*
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 BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


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