IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Accessing first bit of PD value


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed May 03, 2017 6:03 am
Reply with quote

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.

Code:
321
00C


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
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed May 03, 2017 6:27 am
Reply with quote

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.

Code:
321
00C


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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed May 03, 2017 7:37 am
Reply with quote

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
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed May 03, 2017 8:30 am
Reply with quote

Thanks Arun,

Yes, I did the same what you suggested. Thanks for that.

Coming on the second aspect

Input

Code:
321
00C
320
00C

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:
320
00C


Regards, Rajat
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed May 03, 2017 9:23 am
Reply with quote

Apply similar check here
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed May 03, 2017 1:13 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed May 03, 2017 1:58 pm
Reply with quote

why waste time on a complex solution when converting to ZD into a temporary field would be so much simpler ?
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed May 03, 2017 2:14 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed May 03, 2017 3:20 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed May 03, 2017 5:42 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed May 03, 2017 9:49 pm
Reply with quote

Use "BI" and bit positions!!!
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2022
Location: USA

PostPosted: Thu May 04, 2017 12:22 am
Reply with quote

rajatbagga wrote:
Coming on the second aspect

Input
Code:
321
00C
320
00C

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:
320
00C

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Accessing ABENDCC in JCL JCL & VSAM 6
No new posts Accessing control blocks to retrieve ... COBOL Programming 5
No new posts VSAM - Accessing beyond record size JCL & VSAM 6
No new posts Accessing CICS tran with map from JCL... CICS 5
Search our Forums:

Back to Top