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
 

 

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: 7306

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: 7306

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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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