View previous topic :: View next topic |
Author |
Message |
deepa12 Beginner
Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
|
Posted: Mon Jun 30, 2014 10:31 am Post subject: INSYNC -How to serach for comp-3 values matching a criteria |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Jun 30, 2014 12:07 pm Post subject: Re: insync how to serach for comp-3 values matching a criter |
|
|
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 |
|
 |
deepa12 Beginner
Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
|
Posted: Mon Jun 30, 2014 12:27 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Jun 30, 2014 12:34 pm Post subject: |
|
|
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 |
|
 |
|
|