MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

INSYNC -How to serach for comp-3 values matching a criteria

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Mon Jun 30, 2014 10:31 am    Post subject: INSYNC -How to serach for comp-3 values matching a criteria Reply with quote

I have a s9(5)v(4) comp-3 field say this field starts at 313 bytei want to select records with value > 5.582 say how to mention this both in unformatted & formatted manner

And i have another s9(5)v(4) comp field and it starts at 383 byte In this case also i want to select records with value > 5.582 say how to mention this both in unformatted & formatted manner
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jun 30, 2014 12:07 pm    Post subject: Re: insync how to serach for comp-3 values matching a criter Reply with quote

deepa12 wrote:
have a s9(5)v(4) comp-3 field say this field starts at 313 byte
i want to select records with value > 5.582 say how to mention this
both in unformatted & formatted manner



If I remember correctly you can use the format "P" or "PS" for specifying packed decimal numbers. s9(5)v(4) comp-3 is a 5 byte packed decimal field.

Code:

//STEP0100 EXEC PGM=INSYNC                     
//#LOG     DD SYSOUT=*                         
//#PRINT   DD SYSOUT=*                         
//#INDD    DD DISP=SHR,DSN=YOUR INPUT DATASET   
//#OUTDD   DD SYSOUT=*                         
//#PARM    DD *                                 
FUNCTION=COPY                                   
INDD=#INDD                                     
OUTDD=#OUTDD                                   
ADDTOOUTPUT=YES                                 
REPLACEDUPS=NO                                 
SEARCHDATA=(313,5,GT,P'55820')                 
//*


deepa12 wrote:

And i have another s9(5)v(4) comp field and it starts at 383 byte
In this case also i want to select records with value > 5.582 say how to mention this both in unformatted & formatted manner


s9(5)v(4) comp is a 4 byte BInary field, so you use "B" format instead of "P" in the searchdata condition.
Code:

SEARCHDATA=(383,4,GT,B'55820')                 

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Mon Jun 30, 2014 12:27 pm    Post subject: Reply with quote

Thanks Yes it automatically generates this in batch mode
But i would like to know how to give the condition in online e.g. GT 0
but if i want it to filter the records having value > 5.582 , then how to do this
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jun 30, 2014 12:34 pm    Post subject: Reply with quote

deepa12 wrote:
Thanks Yes it automatically generates this in batch mode
But i would like to know how to give the condition in online e.g. GT 0
but if i want it to filter the records having value > 5.582 , then how to do this


deepa12,

Specify the cobol/pli layout and give the condition on the fieldname
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group