String Search with RECFM=VB dataset



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

String Search with RECFM=VB dataset

Postby tuffsubject » Fri Jun 05, 2009 9:45 pm

I have a need to search for a string in a sequential dataset that is RECFM=VB.

This is an example INCLUDE statement:
INCLUDE COND=(1,260,SS,EQ,C'BILL')

The problem is that any records within the file that are shorter than the length specified (260 in the case above), Syncsort simply drops/ignores the entire short record, even if it contains the search string. The result is that the "short" record is missing from the output.

Without utilizing an exit, how can I manipulate the sort control statements so that "short" records will also be processed?

Note: DFSORT pads the short records with x'00' by using OPTION VLSHRT,VLSCMP with the execution, and successfully processes the short records and finds the string. Is there an identical option with Syncsort?
tuffsubject
 
Posts: 3
Joined: Fri Jun 05, 2009 9:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: String Search with RECFM=VB dataset

Postby Alissa Margulies » Fri Jun 05, 2009 11:26 pm

Try adding the following PARM to the EXEC statement:
//S1 EXEC PGM=SORT,PARM='VLTESTI=2'
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: String Search with RECFM=VB dataset

Postby tuffsubject » Sat Jun 06, 2009 2:27 am

Thank you for the suggestion. Unfortunately I have already tried the VLTESTI options.

From my experience:
VLTESTI=0 causes SyncSort to fail (terminate) if a short record is encountered
VLTESTI=1 results in the short record being treated "as having failed the comparison" (and, essentially drops the record when using the INCLUDE statement)
VLTESTI=2 essentially results in the same as VLTESTI=1 in this case, since my INCLUDE statement spans the entire LRECL. The records are dropped.

Question: Would VLTEST=0 solve the problem? I'm reading the doc, it appears that the default is VLTEST=1, but VLTEST=0 (I think) results in short records being padded with x'00'. That would be EXACTLY what I want, so long as VLTESTI checking sees the padded x'00' as being "real" data.

(I'm currently not on site to perform the test myself -- I'll test as soon as I can but asking this here in case someone on the forum has experience with this).
tuffsubject
 
Posts: 3
Joined: Fri Jun 05, 2009 9:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: String Search with RECFM=VB dataset

Postby tuffsubject » Tue Jun 09, 2009 8:56 pm

Alissa, thank you for replying. While I *thought* I had already tried VLTESTI=2, it turns out that I really had not. I was (incorrectly) specifying the VLTESTI=2 option in the SYSIN DD statement, just prior to the SORT and INCLUDE control statements. I moved the VLTESTI option statement to the $ORTPARM DD statement and that solved the problem! (I'm invoking ICEMAN from a REXX program, so I utilized the $ORTPARM DD instead of passing an execution parm to the program).

Another factor that kept me motivated to keep trying to find the resolution was a post made on the IBM-MAIN listserv from a SyncSort support staff member, indicating that the VLTESTI=2 option is "smart enough" to keep records when the string is found within a short record. So I knew I must have been doing something incorrectly.

Thanks again!
tuffsubject
 
Posts: 3
Joined: Fri Jun 05, 2009 9:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: String Search with RECFM=VB dataset

Postby Alissa Margulies » Tue Jun 09, 2009 8:59 pm

Thanks for the update. Glad you were able to correctly specify the VLTESTI option and get your application to produce the desired output.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post