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|[email protected]|ASDRG
111111112|ASVB|[email protected]!ASE
ASD
111111113|SDLKFHFD|[email protected]|SDDGF
111111114|SDFGDFG|[email protected]|SDFLKDG
DFGDHJSD
111111115|DFG|[email protected]|DFGDFGKJ
111111116|DFGDSFHGDF|[email protected]|DFGHFGH
111111117|DSFGSDG|[email protected]|SDFGDFSGH


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

Code:

111111111|ABCDXYZ|[email protected]|ASDRG
111111112|ASVB|[email protected]|ASEASD
111111113|SDLKFHFD|[email protected]|SDDGF
111111114|SDFGDFG|[email protected]|SDFLKDGDFGDHJSD
111111115|DFG|[email protected]|DFGDFGKJ
111111116|DFGDSFHGDF|[email protected]|DFGHFGH
111111117|DSFGSDG|[email protected]|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|[email protected]|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|[email protected]|SDFLKDG
DFGDHJSD
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
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: 8798
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Free space of a mulitvolume PS datase... TSO/ISPF 7
No new posts REXX to get all Dataset names from a ... CLIST & REXX 5
No new posts Avoid job abend on dataset held by us... JCL & VSAM 6
No new posts Identify Number of Multivolume Dataset All Other Mainframe Topics 5
No new posts Convert CSV to flat file. DFSORT/ICETOOL 6
Search our Forums:


Back to Top