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

Syncsort - Searching for a value in a vb file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
venkatesh83be

New User


Joined: 10 Aug 2009
Posts: 12
Location: Chennai

PostPosted: Mon Jul 12, 2010 9:44 am
Reply with quote

Hi All,

Can anyone help me to perform below search in VB file.

//SYSIN DD *
OPTION COPY,STOPAFT=1
INCLUDE COND=(1,80,SS,EQ,C'TARGET')

Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 12, 2010 9:55 am
Reply with quote

Hello,

What happens when you run this?

When you have a question, you need to start a new topic for your question (unless you refer to something in the topic you reply to).

Your question has been split from the unrelated topic and given a ameaningful subject.
Back to top
View user's profile Send private message
venkatesh83be

New User


Joined: 10 Aug 2009
Posts: 12
Location: Chennai

PostPosted: Mon Jul 12, 2010 10:06 am
Reply with quote

Hi,

Below is the errror message

Code:
SYNCSORT FOR Z/OS  1.3.2.0R    U.S. PATENTS: 4210961, 5117495   
                                     EDS AUSTRALIA - CBA / CFS 
SYNCSORT LICENSED FOR CPU SERIAL NUMBER SYSIN :                                                         
 OPTION COPY,STOPAFT=1                                         
 INCLUDE COND=(1,80,SS,EQ,C'TARGET')                           

WER276B  SYSDIAG= 12710, 728052, 728052, 4533137                         
WER164B  8,876K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,       
WER164B     4K BYTES RESERVE REQUESTED, 2,232K BYTES USED                 
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                           
WER108I  SORTIN   : RECFM=VB   ; LRECL=  5004; BLKSIZE= 27966             
WER110I  SORTOUT  : RECFM=VB   ; LRECL=  5004; BLKSIZE= 27966             
WER410B  7,848K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE, 
WER410B     0 BYTES RESERVE REQUESTED, 2,128K BYTES USED                 
WER055I  INSERT          0, DELETE          0                             
WER250A  INCLUDE/OMIT FIELD BEYOND RECORD                                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 12, 2010 12:12 pm
Reply with quote

Hello,

Please note that your question is about Syncsort and should not be posted in the DFSORT part of the forum.

Is the value you are looking for in the first 80 bytes of the 5004-byte records? Are all of the records at least 80 bytes long?

Keep in mind that you must allow for the rdw (record descriptor word) in the first 4 bytes so the include would begin in pos 5.
Back to top
View user's profile Send private message
venkatesh83be

New User


Joined: 10 Aug 2009
Posts: 12
Location: Chennai

PostPosted: Mon Jul 12, 2010 1:24 pm
Reply with quote

Hi d.sch,

It can be anywhere in a record between positions 20 to 5004.

So can i change the sort card to INCLUDE COND=(5,5004,SS,EQ,C'@53') or is there anything else to be done for VB file.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jul 12, 2010 3:02 pm
Reply with quote

,STOPAFT=1 ???
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Mon Jul 12, 2010 3:07 pm
Reply with quote

See this previous topic.

ibmmainframes.com/viewtopic.php?t=34132&start=0
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Mon Jul 12, 2010 11:56 pm
Reply with quote

Hello venkatesh83be.

Try adding the VLTESTI parm to your EXEC statement:
Code:

//STEP1 EXEC PGM=SORT,PARM='VLTESTI=2'
.
.
.
//SYSIN DD *
  INCLUDE COND=(20,4985,SS,EQ,C'TARGET')
  SORT FIELDS=COPY,STOPAFT=1
/*

Let us know whether or not this addresses your issue.

Regards,
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Tue Jul 13, 2010 11:41 am
Reply with quote

Hi Alissa,
I found the desc of as VLTESTI
Quote:
VLTESTI
VLTESTI specifies to SyncSort how to process variable-length records that do not contain
all specified INCLUDE or OMIT fields. VLTESTI applies to the INCLUDE and OMIT
control statements as well as OUTFIL and JOINKEYS INCLUDE/OMIT processing.
The delivered default of 0 instructs SyncSort to terminate if a record does not completely
contain all INCLUDE or OMIT fields. A WER250A critical error message is generated to
indicate this condition.
When VLTESTI=1 is specified, a record that does not completely contain all INCLUDE/
OMIT fields is treated as having failed the comparison. SyncSort will omit the record if
INCLUDE is being used or include the record if OMIT has been specified.
When VLTESTI=2 is specified, SyncSort will treat comparisons to fields not completely
contained within the record as false and decide a record?s status for inclusion or omission
from fields that are available. If all fields are not present, the record will be processed as
having failed the comparison. SyncSort will omit the record if INCLUDE is being used or
include the record if OMIT has been specified.
Cannot be used with Tape Sort.


I am not able to understand the diffrence in the usage when VLTESTI=1 and VLTESTI=2

Could you provide more details on this.?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Tue Jul 13, 2010 1:29 pm
Reply with quote

Does n't the above description from the manual make any sense? As per my understanding, it says something like this.

VLTESTI=1: If any of the comparison-fields is not present in a VB record, the record fails the comparison, hence it will be included if OMIT is specified and omitted if INCLUDE is specified in the control card.

VLTESTI=2: Even if one of the comparison-fields is n't present in a VB record, the record does not fail the comparison as in the case of VLTESTI=1, here still it will check for fields that are available and decide whether the record has to included or omitted depending on the comparison result from fields that are present.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jul 13, 2010 1:54 pm
Reply with quote

or,
VLTEST1=1 all fields must be present, else record fails comparison.

VLTEST1=2 all fields must not be present. comparison is based on those fields which are present.
Back to top
View user's profile Send private message
venkatesh83be

New User


Joined: 10 Aug 2009
Posts: 12
Location: Chennai

PostPosted: Wed Jul 14, 2010 8:41 am
Reply with quote

Hi Alissa,

Its working fine after including VLTEST1=2. Thanks a lot.
Thanks for everyone for your help..

Can this search be made to return only those records which have search string more than once...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top