View previous topic :: View next topic
|
Author |
Message |
Avinash_Gupta
New User
Joined: 11 May 2005 Posts: 26 Location: Hyderabad
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Avinash_Gupta
New User
Joined: 11 May 2005 Posts: 26 Location: Hyderabad
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|