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 Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Adding a descending character to a file Steve Ironmonger DFSORT/ICETOOL 3 Fri Jul 15, 2016 4:57 pm
No new posts SE37 while adding element to endevor kalyan.v CA Products 5 Mon Apr 25, 2016 6:05 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts To change double quotes into csv read... Robert Sample COBOL Programming 3 Fri Feb 19, 2016 8:13 am


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