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
 

 

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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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