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
 

 

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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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