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
 

 

Formatting VB File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 84
Location: India

PostPosted: Mon Mar 20, 2017 12:29 pm    Post subject: Formatting VB File
Reply with quote

Hi,
I have a I/P File with sample records below:
Code:
ABC|1234567|bla bla bla...|bla bla bla|....|   |
DEF|32145789|horse  horse|horse|hor|Horse Mouth
GHI|754568|UniCORM|UNICORN ROAMING|OH MY GOD   |UNICORM ROAMING


I need to have a O/P file with 1st 2 fields removed. So the O/P File withh have:
ABC|1234567| Removed from 1st record
DEF|32145789| Removed from 2nd recoerd
GHI|754568| Removed from 3rd record
... and so on for all the records.

Here are the consideration we need to have:
1. I/P File is in huge 'VB' format & O/P file is desired in the same format
2. There are multiple spaces between records that should not be Squeezeed
3. 1st 3 byte is always populated with characters other than Spaces
4. 1st field has a Max length of 3 bytes while the 2nd field has a Max length of 15 bytes
5. There are 184 fields delimited by '|' with last field is not appended with '|'

I tried using PARSE but need to provide a FIXLEN (Max 20,000 bytes). Then by "SQZ"ing the record, all the inlaying spaces are squized.

Can you please help me use ICETOOL to have the desired file achieved?
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Mar 20, 2017 1:22 pm    Post subject: Reply to: Formatting VB File
Reply with quote

Don't SQZ. Just use VLTRM=C' ' on OUTFIL.
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 84
Location: India

PostPosted: Mon Mar 20, 2017 2:48 pm    Post subject:
Reply with quote

Thanks Bill,
This worked for me. I used the below Control Card:

Code:
OUTFIL FNAMES=OUTDD01,VLTRIM=C' ',               
             PARSE=(%001=(ENDBEFR=C'|',FIXLEN=15),
             %002=(ENDBEFR=C'|',FIXLEN=15),       
             %003=(FIXLEN=20000)),               
      BUILD=(1,4,%003)                           


Thanks a Lot.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Mon Mar 20, 2017 6:29 pm    Post subject:
Reply with quote

If there are input fields to be ignored, then a '%=' would do for each of those.
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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