Help needed in importing mainframe VB dataset to excel.

JES2/3, JCL, utilities.
Post Reply
Raghav
New Member
Posts: 7
Joined: Mon Jun 15, 2015 3:42 pm

Help needed in importing mainframe VB dataset to excel.

Post by Raghav »

Hi,

I have a mainframe VB Dataset with record length 32750. When we FTP it to windows as text, the file alignment is getting affected. Due to this we can't import text to excel. Can you please help to resolve it.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Help needed in importing mainframe VB dataset to excel.

Post by enrico-sorichetti »

When we FTP it to windows as text, the file alignment is getting affected. Due to this we can't import text to excel.
Our hearts are broken because of Your misfortune
We sincerely hope that things will get better in the future.

You just whined that something did not work the way You wanted ...
speak to your support and convert the dataset to a format that excel understands
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1889
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Help needed in importing mainframe VB dataset to excel.

Post by Robert Sample »

When we FTP it to windows as text, the file alignment is getting affected.
Pure text file transfers will NOT affect alignment of data -- unless there are non-display characters in the data set. Does your file have any packed decimal or binary fields? If so, you will need to convert them to zoned decimal before transferring the data to Windows.

You should have provided examples of the data on the mainframe and the same data on Windows to show the alignment issues.
Raghav
New Member
Posts: 7
Joined: Mon Jun 15, 2015 3:42 pm

Re: Help needed in importing mainframe VB dataset to excel.

Post by Raghav »

enrico-sorichetti wrote:
When we FTP it to windows as text, the file alignment is getting affected. Due to this we can't import text to excel.
Our hearts are broken because of Your misfortune
We sincerely hope that things will get better in the future.

You just whined that something did not work the way You wanted ...
speak to your support and convert the dataset to a format that excel understands
Ha ha ha, I am not sure if I could have explained it some better way. If you could help in knowing what kind of details I could have told, I might be able to post better details in my question in future.
Raghav
New Member
Posts: 7
Joined: Mon Jun 15, 2015 3:42 pm

Re: Help needed in importing mainframe VB dataset to excel.

Post by Raghav »

Robert Sample wrote:
When we FTP it to windows as text, the file alignment is getting affected.
Pure text file transfers will NOT affect alignment of data -- unless there are non-display characters in the data set. Does your file have any packed decimal or binary fields? If so, you will need to convert them to zoned decimal before transferring the data to Windows.

You should have provided examples of the data on the mainframe and the same data on Windows to show the alignment issues.
Thank you Robert. I have tried using VB to FB file change and then FTP. But notepad has a limitation of 1024 total line length. Is there some way out?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Help needed in importing mainframe VB dataset to excel.

Post by nicc »

No point in converting from VB to FB as files on PCs are "V" anyway.
Why are you now mentioning Notepad? Your file is, supposedly, a CSV file for Excel.
And you did not answer Robert's question about packed decimal fields. the FTP needs zoned decimal fields because it does conversion from EBCDIC to ASCII and packed decimal does not convert to ASCII - at least not as ASCII packed decimal because there is no such thing as ASCII packed decimal.
Regards
Nic
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1889
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Help needed in importing mainframe VB dataset to excel.

Post by Robert Sample »

But notepad has a limitation of 1024 total line length. Is there some way out?
Yes -- do NOT use Notepad!

I think you need to take a step back, go to the beginning and explain to us PRECISELY what you have on the mainframe and what you want on the PC. Your post title says you want to use Excel -- so Notepad should not be involved in any way. With Excel, the simplest way is to create a CSV file on the mainframe (variable length is fine), transfer that file to the PC as a .CSV file, and open that .CSV file with Excel. If you do go back to the beginning, we want to know the mainframe file layout -- a COBOL copy book or code extract would be perfect.

If you want to open the .CSV file in Notepad, you need to be aware that Notepad defaults to using a proportional font instead of a fixed width font (such as Courier), so the data in Notepad will NOT look like the data on the mainframe -- which is fine since Excel doesn't care about that. And you should be aware that mainframe files can be up to 32,760 (more or less) bytes long for each record, so Notepad is a really bad choice of a tool to open a text file (with any extension) transferred from the mainframe.

You have totally confused us with what you want -- a file readable by Notepad? a file readable by Excel? Who knows?
Raghav
New Member
Posts: 7
Joined: Mon Jun 15, 2015 3:42 pm

Re: Help needed in importing mainframe VB dataset to excel.

Post by Raghav »

nicc wrote:No point in converting from VB to FB as files on PCs are "V" anyway.
Why are you now mentioning Notepad? Your file is, supposedly, a CSV file for Excel.
And you did not answer Robert's question about packed decimal fields. the FTP needs zoned decimal fields because it does conversion from EBCDIC to ASCII and packed decimal does not convert to ASCII - at least not as ASCII packed decimal because there is no such thing as ASCII packed decimal.
"V"? So if the file had been of type "V" on mainframes, I could transfer it as it is?

I am sorry I have confused CSV with notpad while I should have tried it with excel. Actually, it saved as notepad icon. There are no packed decimal in the dataset.
Raghav
New Member
Posts: 7
Joined: Mon Jun 15, 2015 3:42 pm

Re: Help needed in importing mainframe VB dataset to excel.

Post by Raghav »

Robert Sample wrote:
But notepad has a limitation of 1024 total line length. Is there some way out?
Yes -- do NOT use Notepad!

I think you need to take a step back, go to the beginning and explain to us PRECISELY what you have on the mainframe and what you want on the PC. Your post title says you want to use Excel -- so Notepad should not be involved in any way. With Excel, the simplest way is to create a CSV file on the mainframe (variable length is fine), transfer that file to the PC as a .CSV file, and open that .CSV file with Excel. If you do go back to the beginning, we want to know the mainframe file layout -- a COBOL copy book or code extract would be perfect.

If you want to open the .CSV file in Notepad, you need to be aware that Notepad defaults to using a proportional font instead of a fixed width font (such as Courier), so the data in Notepad will NOT look like the data on the mainframe -- which is fine since Excel doesn't care about that. And you should be aware that mainframe files can be up to 32,760 (more or less) bytes long for each record, so Notepad is a really bad choice of a tool to open a text file (with any extension) transferred from the mainframe.

You have totally confused us with what you want -- a file readable by Notepad? a file readable by Excel? Who knows?
Thank you Robert. I have used the CSV file and opened it with excel. Looks like it is working until I figure out anyother problem.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”