View previous topic :: View next topic
|
Author |
Message |
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
Hello,
I am trying to figure out a way to access the first number for the PD value but without converting the data into ZD format.
For eg.
I just want to use include condition on the first number i.e. 3 without converting the PD value to ZD. Any suggestions, please.
Regards,
Rajat |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
rajatbagga wrote: |
Hello,
I am trying to figure out a way to access the first number for the PD value but without converting the data into ZD format.
For eg.
I just want to use include condition on the first number i.e. 3 without converting the PD value to ZD. Any suggestions, please.
Regards,
Rajat |
Hello,
In addition to the earlier requirement, I also want to figure out a way to access the last 2 numbers of the PD value. 01 in this case without converting the data into ZD.
Regards,
Rajat |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
For your first condition, can't you check for
Code: |
1,3,PD,GE,30000,AND,1,3,PD,LE,39999 |
OR
Code: |
1,1,CH,GE,X'30',AND,1,1,CH,LE,X'39' |
assuming data starts at position-1?
It is not so clear what you want to do with the last digit here. If you could show some sample input records and what you expect out of it, it might help. |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
Thanks Arun,
Yes, I did the same what you suggested. Thanks for that.
Coming on the second aspect
Input
I want to only include the data with the last 2 digits of the number equal to 00 to satisfy the condition without converting the data into ZD.
output
Regards, Rajat |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Apply similar check here |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
Arun Raj wrote: |
Apply similar check here |
I can certainly have the GE 3000 LT 4000 condition with the first requirement. But how do I apply the similar logic as I cannot address to the last two digits in one go.
You mean to say check for '0C' for the last digit and then X'10' X'20' X'30' ...X'90' for second last digit?
Regards,
Rajat |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10879 Location: italy
|
|
|
|
why waste time on a complex solution when converting to ZD into a temporary field would be so much simpler ? |
|
Back to top |
|
|
rajatbagga
Active User
Joined: 11 Mar 2007 Posts: 199 Location: india
|
|
|
|
enrico-sorichetti wrote: |
why waste time on a complex solution when converting to ZD into a temporary field would be so much simpler ? |
I thought maybe there is a simpler way to directly address the digits in the PD value .. But after exploring the options I agree with you.. better approach would be to convert the data into ZD in INREC and latter covert it back to PD.
Thanks for the suggestions
Regards
Rajat |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10879 Location: italy
|
|
|
|
Quote: |
convert data into ZD in INREC and latter covert it back to PD.
|
why the double jump, extend the input record with thr PD converted to ZD and after that just drop the useless bytes |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
I cannot address to the last two digits in one go |
I think I did n't pay attention you mentioned - 2 digits. Enrico has already given a clear hint on what you need to do. Read on the 'OVERLAY' parameter if you are not familiar with that. Good luck. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1310 Location: Vilnius, Lithuania
|
|
|
|
Use "BI" and bit positions!!! |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2115 Location: USA
|
|
|
|
rajatbagga wrote: |
Coming on the second aspect
Input
I want to only include the data with the last 2 digits of the number equal to 00 to satisfy the condition without converting the data into ZD.
output
|
Code: |
INCLUDE COND=(2,2,CH,BZ,B'0000111111110000') 'BZ' = "bits are zeroes"
|
or
Code: |
INCLUDE COND=(2,2,BI,BZ,X'0FF0') 'BZ' = "bits are zeroes"
|
|
|
Back to top |
|
|
|