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
 
truncate spaces in VB file at the end.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: truncate spaces in VB file at the end.
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 Moderator


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

PostPosted: Sat Dec 09, 2006 12:21 am    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Sat Dec 09, 2006 4:05 am    Post subject:
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    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 COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

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