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

Convert a VB Dataset to FB Dataset


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

New User


Joined: 09 Feb 2009
Posts: 57
Location: India

PostPosted: Sun Jul 04, 2010 2:05 pm
Reply with quote

Hi,

I had received a dataset (from FTP) and it contains some variable length records.

1. The problem is that I don't know about LRECL and MAXLEN of the records, that will be received. Then I need to process the information based on the delimiter provided (example below).

2. The second problem is that, the records may continue in the next line too (example below).

Key for reading the record is first 9 chars.

Code:

111111111|ABCDXYZ|ABCS@ZYS.COM|ASDRG
111111112|ASVB|ASD@XYZ.COM!ASE
ASD
111111113|SDLKFHFD|ERIT@DFG.COM|SDDGF
111111114|SDFGDFG|DSKG@ERSDR.COM|SDFLKDG
DFGDHJSD
111111115|DFG|DFG@WER.COM|DFGDFGKJ
111111116|DFGDSFHGDF|SDFGHDFH@RITF.COM|DFGHFGH
111111117|DSFGSDG|SDFGDF@OIER.COM|SDFGDFSGH


I need the output to be FB and the output should be like:

Code:

111111111|ABCDXYZ|ABCS@ZYS.COM|ASDRG
111111112|ASVB|ASD@XYZ.COM|ASEASD
111111113|SDLKFHFD|ERIT@DFG.COM|SDDGF
111111114|SDFGDFG|DSKG@ERSDR.COM|SDFLKDGDFGDHJSD
111111115|DFG|DFG@WER.COM|DFGDFGKJ
111111116|DFGDSFHGDF|SDFGHDFH@RITF.COM|DFGHFGH
111111117|DSFGSDG|SDFGDF@OIER.COM|SDFGDFSGH


The problem is that I don't know LRECL and MAXLEN of the record, and then convert VB into FB.
Please guide.
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: Tue Jul 06, 2010 2:30 am
Reply with quote

You haven't given enough information for anyone to help you.

If you don't know the LRECL or MAXLEN of the record, how can we know the maximum number of delimited fields to expect? Or what the continued line can look like, or if there can be more than one continued line, or ...

You need to do a better job of defining what you're trying to do, what the data can look like, the maximum number of delimited fields per line, etc before anyone can help you.
Back to top
View user's profile Send private message
VivekKhanna

New User


Joined: 09 Feb 2009
Posts: 57
Location: India

PostPosted: Tue Jul 06, 2010 1:07 pm
Reply with quote

Hi Frank,

Please consider the above mentioned data, as the complete one. If there are 4 fields in the input, then the record will look like

Code:

111111111|ABCDXYZ|ABCS@ZYS.COM|ASDRG


The biggest problem is that, we are not sure, whether the information that has been sent is through FTP or copy-pasted like a notepad file. No information has been provided on the same. We are still trying to get this information like LRECL and MAXLEN of the record. But still, one of the biggest headache is the following type of record:

Code:

111111114|SDFGDFG|DSKG@ERSDR.COM|SDFLKDG
DFGDHJSD
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 06, 2010 10:31 pm
Reply with quote

Hello,

Quote:
No information has been provided on the same.
Until you have the specifications for the data how do you plan on implementing any solution. . . - sort or otherwise. . . icon_confused.gif

Suggest this be put on hold until someone can tell you the "rules".

Suggest also that some effort be put into correcting the creation of the file to be uploaded.
Back to top
View user's profile Send private message
VivekKhanna

New User


Joined: 09 Feb 2009
Posts: 57
Location: India

PostPosted: Tue Jul 06, 2010 11:14 pm
Reply with quote

Thanks Dick.

I had already put up the queries to provide us with LRECL and MAXLEN.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 07, 2010 11:24 am
Reply with quote

I agree with Dick. You are treating the symptoms and not the cause.

As stated by Dick
Quote:
Suggest also that some effort be put into correcting the creation of the file to be uploaded.
This would be the best solution.
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top