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
 
Remove Quotes using single Sort step?

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

New User


Joined: 29 Apr 2008
Posts: 9
Location: INDIA

PostPosted: Thu Oct 17, 2013 9:05 pm    Post subject: Remove Quotes using single Sort step?
Reply with quote

Hi,
The data in the sting is mixed with Alpha numeric & numeric and every field is separated by comma. (,). but all the alphanumeric fields has a additional quotes in it.

But i need to remove the additioanl quotes from Alphanumeric fields in order to perform unstring by comma to use the data.

Example 1:
'"600","CY",8,"3787660","000043877",14099.83,1166.96,"USD"'.

But I need the above record as shown below:
EXAMPLE2:
'600,CY,8,3787660,000043877,14099.83,1166.96,USD'.

So that i can unstring the data shown in exapmle 2 using just ','.


Note:
I managed to remove the quotes using ICETOOL Replace command but it takes 4 step procedure to remove .

But is there any way by using single sort/icetool step to achive as shown above to remove the additional quotes in alphanumeric fields?

Thanks,
Govi.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Oct 17, 2013 9:16 pm    Post subject: Reply to: Remove Quotes using single Sort step?
Reply with quote

A simple FINDREP in a SORT step should do. What are your four ICETOOL steps, please?
Back to top
View user's profile Send private message
Govardhana krishna

New User


Joined: 29 Apr 2008
Posts: 9
Location: INDIA

PostPosted: Thu Oct 17, 2013 9:28 pm    Post subject: Reply to: Remove Quotes using single Sort step?
Reply with quote

First step S1: I replace " "," " to ",".
Second step S2: I replace " ", " to ",".
Third step S3: I replace " ," " to ",".
Fourth step S4: i replace " " " to " ".

Also Steps shown below.


Code:
//S1 EXEC PGM=ICEMAN                                                   
//SYSOUT DD SYSOUT=*                                                   
//SORTIN DD DSN=TCL1.T.ACBSDIER.DCS20100,DISP=SHR                       
//*"600","CY",8,"3787660","000043877",14099.83,1166.96,"USD"           
/*                                                                     
//SORTOUT DD DSN=TCL1.GK.ACBSDIER.DCS20100.LEVEL1,DISP=SHR             
//SYSIN DD *                                                           
  OPTION COPY                                                           
  INREC FINDREP=(INOUT=(C'","',C','))                                   
/*                                                                     
//*****        SORT OF INPUT FILES                                 *****
//**********************************************************************
//S2 EXEC PGM=ICEMAN                                                   
//SYSOUT DD SYSOUT=*                                                   
//SORTIN DD DSN=TCL1.GK.ACBSDIER.DCS20100.LEVEL1,DISP=SHR               
/*                                                                     
//SORTOUT DD DSN=TCL1.GK.ACBSDIER.DCS20100.LEVEL2,DISP=SHR             
//SYSIN DD *                                                           
  OPTION COPY                                                           
  INREC FINDREP=(INOUT=(C'",',C','))                                   
/*                                                                     
//S3 EXEC PGM=ICEMAN                                                   
//SYSOUT DD SYSOUT=*                                                   
//SORTIN DD DSN=TCL1.GK.ACBSDIER.DCS20100.LEVEL2,DISP=SHR               
/*                                                                     
//SORTOUT DD DSN=TCL1.GK.ACBSDIER.DCS20100.LEVEL3,DISP=SHR             
//SYSIN DD *                                                           
  OPTION COPY                                                           
  INREC FINDREP=(INOUT=(C',"',C','))                                   
/*                                                                     
//*****        SORT OF INPUT FILES                                 *****
//**********************************************************************
//S4 EXEC PGM=ICEMAN                                                   
//SYSOUT DD SYSOUT=*                                                   
//SORTIN DD DSN=TCL1.GK.ACBSDIER.DCS20100.LEVEL3,DISP=SHR               
//SORTOUT DD DSN=TCL1.GK.ACBSDIER.DCS20100.LEVEL4,DISP=SHR             
//SYSIN DD *                                                           
  OPTION COPY                                                           
  INREC FINDREP=(INOUT=(C'"',C' '))                                     
**************************** Bottom of Data ****************************


Code'd
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Oct 17, 2013 9:40 pm    Post subject: Reply to: Remove Quotes using single Sort step?
Reply with quote

OK. You're not actually using ICETOOL.

Try:

Code:
  OPTION COPY
  INREC FINDREP=(INOUT=(C'"',C''))


That should get all the "s at once.

Although you can't use multiple FINDREP on INREC, you can use multiple IFTHEN, like IFTHEN=(WHEN=NONE, and have a FINDREP subordinate to that.

Same for OUTREC and OUTFIL.

In this case, I don't see that you need multiple FINDREPs, or multiple values to change (also possible with FINDREP, check the manual).
Back to top
View user's profile Send private message
Govardhana krishna

New User


Joined: 29 Apr 2008
Posts: 9
Location: INDIA

PostPosted: Thu Oct 17, 2013 9:57 pm    Post subject: Reply to: Remove Quotes using single Sort step?
Reply with quote

Thank you very much. I got it icon_smile.gif
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 Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am

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