IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

truncate spaces in VB file at the end.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Avinash_Gupta

New User


Joined: 11 May 2005
Posts: 26
Location: Hyderabad

PostPosted: Fri Dec 08, 2006 11:54 pm
Reply with quote

Hi,
I have a folowing file input file. I want to remove the trailing charactersviz " ," and spaces that occur after double quotes after each record (").
attached is the screen shot.
Please let me know if there is any solution available in DFSORT.thanks
avinash
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Dec 09, 2006 12:21 am
Reply with quote

What is the RECFM and LRECL of the input file?

In the input records, I see

"string","string"...

So it looks like one or more quoted strings followed by periods to indicate some more characters. Right?

What characters do the periods represent - spaces?
Back to top
View user's profile Send private message
Avinash_Gupta

New User


Joined: 11 May 2005
Posts: 26
Location: Hyderabad

PostPosted: Sat Dec 09, 2006 12:51 am
Reply with quote

record length is 2250. RCFM is VB

Actually i dont want the spaces after the last ending double quote in each record.
The periods reprsent nulls.
let me know if u require any more info.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Dec 09, 2006 4:05 am
Reply with quote

Quote:
i dont want the spaces after the last ending double quote in each record.
The periods reprsent nulls.


Given this answer, I'm not sure if you have spaces (X'40') after the last " or nulls (X'00'), but I'll assume it's nulls.

Since these are VB records, I assume "remove" means to reduce the RDW length. So if you had a record with an RDW length 30 with 5 nulls after the last ", you'd want to reduce the RDW length to 25, essentially removing the nulls.

You can use this DFSORT job to do that.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD DSN=...  output file (VB)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL VLTRIM=X'00'
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top