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
 

 

Adding quotes when a space is present

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

New User


Joined: 24 Jan 2011
Posts: 21
Location: India

PostPosted: Tue Feb 01, 2011 4:00 pm    Post subject: Adding quotes when a space is present
Reply with quote

Hi

I have a dataset with 10000 records as shown below

AAAABCF
BSDB
BGBSDSKDDSD
FSDS
FGSDNKS
DASAS
ASASDASASAS

I want the records in output file to be like below
'AAAABCF'
'BSDB'
'BGBSDSKDDSD'
'FSDS'
'FGSDNKS'
'DASAS'
'ASASDASASAS'

I want the records to be within quotes when the record ends . The length of record is not constant.
Let me know if this could be achieved using Sort
Back to top
View user's profile Send private message

Guest







PostPosted: Tue Feb 01, 2011 5:39 pm    Post subject:
Reply with quote

Hi Vasanthr,
You can use the following step to meet your requirement:
Code:

//STEP010  EXEC PGM=SORT                       
//SORTIN DD *                                   
AAAABCF                                         
BSDB                                           
BGBSDSKDDSD                                     
FSDS                                           
FGSDNKS                                         
DASAS                                           
ASASDASASAS                                     
//SORTOUT  DD SYSOUT=*                         
//SYSIN    DD *                                 
  OPTION COPY                                   
  INREC BUILD=(1,13,JFY=(SHIFT=LEFT,LEAD=C'''',
  TRAIL=C''''))                                 
/*                                             



devil13
There is always a better solution
Back to top
Vasanthr

New User


Joined: 24 Jan 2011
Posts: 21
Location: India

PostPosted: Tue Feb 01, 2011 5:59 pm    Post subject: Reply to: Adding quotes when a space is present
Reply with quote

thanks .. got it
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 Translating Quotes Khadhar Basha CLIST & REXX 6 Tue May 09, 2017 11:52 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am


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