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 Receommendations required for adding ... Alan Playford JCL & VSAM 4 Wed Feb 14, 2018 4:01 pm
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
No new posts sending email from jcl using the mail... niloyarp JCL & VSAM 5 Tue Oct 10, 2017 12:32 pm
No new posts The TS7720 is out of cache space. Rex Montemayor All Other Mainframe Topics 2 Mon Sep 25, 2017 7:18 am
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm

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