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
 

 

condition checking based on the part of PD value?

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

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Wed Jul 25, 2007 8:02 pm    Post subject: condition checking based on the part of PD value?
Reply with quote

Hi,

I need to select some records based on a check by the part of a PD value in a single step. how to do this.
for ex,
if the PD field has 8 digit value, i need to perform the check based on last 6 digit.
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jul 25, 2007 9:42 pm    Post subject:
Reply with quote

Could you INREC reformat it to ZD and compare against that?
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: Wed Jul 25, 2007 10:34 pm    Post subject:
Reply with quote

You can use DFSORT's PD0 format to check on the last 6 digits of a PD value. For example if you had a PD value in positions 1-5 with X'987123456C' and you wanted to check for 123456 as the last 6 digits you could use:

Code:

   INCLUDE COND=(2,4,PD0,EQ,X'123456') 


2,4 would be X'712346C'. Since PD0 ignores the first digit and the sign, you'd be checking for 123456 ignoring the 7 and the C. In general, the 2,4,PD0 value would be treated as X'iddddddi' where i is ignored and d is checked.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Jul 25, 2007 10:42 pm    Post subject:
Reply with quote

senjay

Quote:
i need to perform the check based on last 6 digit.

What sort of check you wanted to do? Please show an example
Because i feel that, you can use the MOD function of DFSORT and do the task in single step, by extracting only the last 6 digits of the 8digit i/p.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Jul 25, 2007 11:40 pm    Post subject:
Reply with quote

Ohh frank, you posted a simpler solution, much before than i had refreshed! icon_neutral.gif

However,
senjay, u can find some information about PD0 under DFSORT Data Formats at http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca20/C.1?ACTION=MATCHES&REQUEST=PD0&TYPE=FUZZY&SHELF=ICE1SH20.bks&DT=20060615185603&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Fri Jul 27, 2007 6:05 pm    Post subject: Re: condition checking based on the part of PD value?
Reply with quote

Thanks all.
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts RMM: scratching a volume that RMM thi... Hervey Martinez IBM Tools 0 Mon May 15, 2017 8:51 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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