shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
Hi raghavendra_p_sarvade,
Quote: |
I have a VB file where a field is S9(9) comp-3 starting at byte 44 |
Including RDW, Is 44th column, the starting position for a field S9(9) comp-3?
Quote: |
I need to pull records based on the first 3 digits (of value 040) of the comp-3 variable. |
Please check with the following code for your requirement.
Code: |
// EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INFILE,DISP=SHR
//SORTOUT DD DSN=OUTFILE,DISP=....
//SYSIN DD *
OPTION COPY
INCLUDE COND=((44,5,PD,GE,+040000000,AND,44,5,PD,LE,+040999999),OR,
(44,5,PD,GE,-040999999,AND,44,5,PD,LE,-040000000))
/*
//
|
Thanks,
Shankar |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's an easier way to do it with DFSORT:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB)
//SORTOUT DD DSN=... output file (VB)
//SYSIN DD *
OPTION COPY
INCLUDE COND=(44,2,BI,EQ,B'000001000000....')
/*
|
|
|