Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort - Searching for a value in a vb file

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - Searching for a value in a vb file
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

Site Director


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

PostPosted: Mon Jul 12, 2010 9:55 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Jul 12, 2010 12:12 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Moderator


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

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

See this previous topic.

http://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: 500
Location: USA

PostPosted: Mon Jul 12, 2010 11:56 pm    Post subject:
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    Post subject:
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: 2161
Location: @my desk

PostPosted: Tue Jul 13, 2010 1:29 pm    Post subject:
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    Post subject:
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    Post subject:
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.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us