Home > Ask the AS/400 Experts > Questions & Answers > Selecting a record containing a single quote
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Selecting a record containing a single quote

John Blenkinsop EXPERT RESPONSE FROM: John Blenkinsop

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site
>
QUESTION POSED ON: 28 October 2004
I would like to select a record containing a single quote via the OPNQRYF command in a CL program. How can I specify in a QRYSLT parameter?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


You can do this either by looking for the HEX value of the quote character:

OPNQRYF FILE((TNAMES)) QRYSLT('ZZFILE *CT X"C1"') …

or by surrounding the quote character with other quotes that signal to the QRYSLT parameter that you want to look for a single quote:

OPNQRYF FILE((TNAMES)) QRYSLT('ZZtext *CT " ' ' " ')

NOTE: I have spread out the quotes with spaces to show them more clearly; don't include the spaces in your code!

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts