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
 

 

How to get single quote in outfile using outrec of sort util

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
shikhagupta33

New User


Joined: 11 Apr 2005
Posts: 7
Location: Bangalore

PostPosted: Sat Feb 21, 2009 10:49 am    Post subject: How to get single quote in outfile using outrec of sort util
Reply with quote

Hi,

I am using 3.14 option in Batch mode. I have list of 100 procs to be searched in JCLLIB pds. I.e. I want to get list of Jobs which are executing these procs. My list is there in a file like below.
proc001
proc002
proc003
-----
-----
proc100

Now I want to get my list as below
srchfor 'proc001'
srchfor 'proc002'
scrchfor 'proc003'
-------------------
-------------------
srchfor 'proc100'

For this I want to use sort utility's outrec to get my i/p file modified and give output like as I wanted.

So that I can use my o/p file to be input to my bacth mode of option 3.14
Please help.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Feb 21, 2009 8:19 pm    Post subject:
Reply with quote

If you want to include a single apostrophe in the character string, you must specify it as two single apostrophes. Thus:
Required: O'NEILL
Specify: C'O''NEILL'
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Feb 21, 2009 9:11 pm    Post subject:
Reply with quote

Shikha,

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(C'srchfor ''',1,7,C'''',80:X)
/*
Back to top
View user's profile Send private message
shikhagupta33

New User


Joined: 11 Apr 2005
Posts: 7
Location: Bangalore

PostPosted: Tue Mar 03, 2009 5:37 pm    Post subject:
Reply with quote

Thank you for the resolution. It worked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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