View previous topic :: View next topic
|
Author |
Message |
vickey_dw
New User
Joined: 10 Jun 2015 Posts: 51 Location: India
|
|
|
|
Hi All
In my file i have records in HEX format.But when it is read in 9(2) variable.
Now i have to retrieve records with code as "98" which looks like below in the file at position 14.
I tried below include cond but they are not working to retrieve these records.
Code: |
INCLUDE COND=(14,1,PD,EQ,62)
INCLUDE COND=(14,1,PD,EQ,98) |
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
As you show, the field is not packed decimal (PD). What do you think should specify instead? |
|
Back to top |
|
|
vickey_dw
New User
Joined: 10 Jun 2015 Posts: 51 Location: India
|
|
|
|
Actually i am not very sure if the record in file are Packed decimal or hex.
Its appearing as in input file.
As i need to find code as "98" i converted it to hex and got 62.
I am not sure now how to peel the records using include cond. |
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
Code: |
INCLUDE COND=(14,1,CH,EQ,X'98') |
. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
vickey_dw,
You also can't have multiple INCLUDE COND statements (or OMIT COND, or a mixture). Or, you can have them, but it won't do what you think.
Look at using OR, and in other cases AND, to have multiple conditions. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Quote: |
Code:
INCLUDE COND=(14,1,CH,EQ,X'98') |
actually,
Code: |
Code:
INCLUDE COND=(14,1,CH,EQ,X'62') |
Garry |
|
Back to top |
|
|
vickey_dw
New User
Joined: 10 Jun 2015 Posts: 51 Location: India
|
|
|
|
Yes Garry you are correct.It worked for me.
Thanks Garry,Rahul and Bill !!!! |
|
Back to top |
|
|
|