Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
INCLUDE COND for Comp-3 field

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

New User


Joined: 01 Mar 2010
Posts: 3
Location: LA

PostPosted: Mon Mar 01, 2010 11:47 pm    Post subject: INCLUDE COND for Comp-3 field
Reply with quote

Hi,

I have a date field defined as S9(9) comp-3

I want to include records in the outfile with dates GE 20080101 so I defined the SYSIN as

Code:

  SORT FIELDS=COPY
  INCLUDE COND=(1,5,PD,GE,20080101)


This is not working and is copying all the records.
I think I need to conver the PD to ZD but not sure how.

Pleae advice a way to convert & include in the same SYSIN

Thanks,
Archana
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 Mar 02, 2010 12:50 am    Post subject:
Reply with quote

That's the correct INCLUDE statement for what you described. So I can only guess that your S9(9) comp-3 field does NOT actually start in position 1. Does your input file have RECFM=VB? If so, then the field starts in position 5 after the RDW so the INCLUDE statement should be:

Code:

  INCLUDE COND=(5,5,PD,GE,20080101)


If that's not it, then tell me the RECFM and LRECL of your input file and show me an example of the values in positions 1-5 of your input records.

Quote:
I think I need to conver the PD to ZD but not sure how.


No, you don't need to do that.
Back to top
View user's profile Send private message
archana_ssy

New User


Joined: 01 Mar 2010
Posts: 3
Location: LA

PostPosted: Tue Mar 02, 2010 1:03 am    Post subject:
Reply with quote

Thanks Frank.
Below are further details -
LRECL=2007,RECFM=VB

Date Filed # 1 starts @904 position
Date field # 2 starts @912

Code:
904      912       <- Position
20080101 99999999  <- Data
20080101 99999999
20071012 99999999

SYSIN
SORT FIELDS=COPY                           
INCLUDE COND=((904,5,PD,GE,20080101),OR,   
             ((912,5,PD,GE,20080101),AND,   
              (912,5,PD,NE,99999999)))     


Thanks,
Archana
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Mar 02, 2010 1:48 am    Post subject:
Reply with quote

archana_ssy wrote:
Thanks Frank.
Below are further details -
LRECL=2007,RECFM=VB

Date Filed # 1 starts @904 position
Date field # 2 starts @912


Did you consider the RDW when calculated the position 904? If not you need to add 4 bytes to the actual position as the actual data in a VB file starts at position 5. The first 4 bytes will be the RDW
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 Mar 02, 2010 2:04 am    Post subject:
Reply with quote

If 904 and 912 are the data positions, then you need to add 4 to each to account for the RDW in positions 1-4.

Code:

  SORT FIELDS=COPY                           
  INCLUDE COND=((912,5,PD,GE,20080101),OR,   
             ((916,5,PD,GE,20080101),AND,   
              (916,5,PD,NE,99999999)))


However, what you are showing in your example are ZD values, not PD values. You'd have to show the values in hex for us to verify that they are actually PD values.
Back to top
View user's profile Send private message
archana_ssy

New User


Joined: 01 Mar 2010
Posts: 3
Location: LA

PostPosted: Tue Mar 02, 2010 2:27 am    Post subject:
Reply with quote

After considering the RDW and adding 4 bytes to the positions, it's working fine.

Thank you.
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us