IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Adding quotes when a space is present


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
No new posts Help in extracting data between doubl... DFSORT/ICETOOL 5
Search our Forums:

Back to Top