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

extract records based on Binary field


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Tue May 05, 2015 1:19 am
Reply with quote

Ok.. It says:
Quote:
WER238I POTENTIALLY INEFFICIENT USE OF INREC

So, you need to mention it as:
Code:
INREC BUILD(1,4,19,4,BI,TO=ZD,LENGTH=9,5,10500)                             
  SORT FIELDS=COPY                                                     
  OUTFIL INCLUDE=((13,1,CH,GE,C'1'),AND,                                 
                  (13,1,CH,LE,C'5')),                                   
          BUILD=(1,4,14)

Also, change that condition to 'AND' instead of an 'OR'

Try and let me know. I think this should work.
.
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Tue May 05, 2015 1:25 am
Reply with quote

Nope . It isn't working . It is throwing error .

Code:
SYSIN :
  OPTION STOPAFT=10                                                     
  INREC BUILD(1,4,19,4,BI,TO=ZD,LENGTH=9,5,10500)                       
  SORT FIELDS=COPY                                                     
  OUTFIL INCLUDE=((13,1,CH,GE,C'1'),OR,                                 
                  (13,1,CH,LE,C'5')),                                   
          BUILD=(1,4,14)                                               
WER276B  SYSDIAG= 0, 765555, 765555, 6111985
WER164B  8,884K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B     0 BYTES RESERVE REQUESTED, 1,922,238 BYTES USED
WER146B  12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I  SORTIN   : RECFM=V    ; LRECL= 10500; CISIZE = 12288
WER073I  SORTIN   : DSNAME=INPUT.FILE.VB
WER257I  INREC RECORD LENGTH = 10513
WER238I  POTENTIALLY INEFFICIENT USE OF INREC
WER110I  SORTOUT  : RECFM=VB   ; LRECL= 10504; BLKSIZE= 27998
WER074I  SORTOUT  : DSNAME=OUTPUT.FILE.EXTRACT
WER410B  7,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B     0 BYTES RESERVE REQUESTED, 1,795,262 BYTES USED
WER244A  INREC  - SHORT RECORD
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Tue May 05, 2015 1:39 am
Reply with quote

The error is INREC - SHORT RECORD

See here:
ibmmainframes.com/about56791.html

Or just reduce the length of Inrec for testing purpose only - So, instead of 10500, give something like 10400 (again this is for testing only). You need to search for the error SHORT RECORD on the web. Try it.

AND Remember the 'AND' instead of 'OR'

.
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Tue May 05, 2015 1:56 am
Reply with quote

Hi ,

i am getting this error after i had added the

Code:
LENGTH=9,5,10500


with out the
Code:
LENGTH=9,5
, the job was running fine .

I think we are getting diverted from the main question .

@ Bill ,

Can you please let me know what i am doing wrong in the syntax ? Why is the INREC statement not filtering records ?
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Tue May 05, 2015 2:03 am
Reply with quote

Did you change the 'OR' to 'AND' ?
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Tue May 05, 2015 2:27 am
Reply with quote

Yep , it was copy error from the spool .

Still hitting the same error , if i give that 10500 .
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue May 05, 2015 5:19 am
Reply with quote

What I meant was to do this exactly, nothing else:


Code:
  OPTION STOPAFT=10
  INREC BUILD=(1,4,19,4,BI,19,4,BI)


OK, I slightly typoed that:

Code:
  OPTION STOPAFT=10
  INREC BUILD=(1,4,19,4,BI,19,4)


And then (using view/browse or whatever you want) look at the output, and paste it here. By "output" I mean the dataset that is associated with your SORTOUT DD.
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Tue May 05, 2015 9:17 pm
Reply with quote

Bill ,

Please find my output file data .

Code:
****** ******
000001 4  ƾÞ
       F409BA
       40CE9E
-------------
000002 5  Æ[Ï
       F409B7
       50CEA7
-------------
000003 2  Æ[h
       F409B8
       20CEA8
-------------
000004 2  Æ]H
       F409BC
       20CEB8
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed May 06, 2015 2:02 am
Reply with quote

OK, so what SORT Control Cards did you use to create that? Assuming the last four bytes are the binary field, the first byte is the low-order digit of the decimal number represented by the binary and the space is a space, then everything looks OK, but that's all guessing as I don't know how you generated that file.
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed May 06, 2015 2:40 am
Reply with quote

Bill ,

Did a small correction to the code that you had given and it had worked perfectly .

Code:
//SYSIN DD *
  INREC BUILD(1,4,19,4,BI,TO=ZD,LENGTH=9,5)
  SORT FIELDS=COPY
  OUTFIL INCLUDE=((13,1,ZD,GE,1),AND,
                  (13,1,ZD,LE,5)),
          BUILD=(1,4,14)
/*


Thanks a lot for your help and efforts .
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 -> SYNCSORT Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top