Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am
No new posts VSAM BUFFER SPACE? John Poulakos CICS 17 Thu Mar 22, 2018 2:54 am
No new posts *MASTER* address space abending at IPL Alan Playford All Other Mainframe Topics 2 Mon Mar 12, 2018 8:02 am
No new posts Receommendations required for adding ... Alan Playford JCL & VSAM 4 Wed Feb 14, 2018 4:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us