MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Uploading MS excel file to mainframe

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Vishwakiran
Beginner


Joined: 29 Jun 2004
Posts: 11
Topics: 8
Location: Bangalore

PostPosted: Fri Jun 30, 2006 6:57 am    Post subject: Uploading MS excel file to mainframe Reply with quote

Friends,

I have to upload the excel sheet containing several fixed length fields to mainframe dataset.

Please suggest whether I can load the excel sheet directly to mainframe. Will it be consistant in the alignement if do it repeatedly ?

Is there any option in excel to indicate that a column is fixed length of say X bytes ?

Please suggest.

Thanks,
_________________
Regards,
Vishwakiran
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Jun 30, 2006 7:12 am    Post subject: Reply with quote

Vishwakiran,


Save the file as .csvor tab delimited .txt file and you can upload it to the mainframe. You can specify the columns as fixed , but excel truncates the trailing spaces.

for ex you have 3 columns

col1 - 10 bytes and col2 - 20 bytes and col3 - 10 bytes

and if you have data like this

Code:

kolusu        admin                   mvsforums


if you save as .csv it will be saved as
Code:

kolusu,admin,mvsforums


So you are loosing the trailing spaces. In order to retain the trailing spaces use the formula
Code:

=A1&REPT(" ",N-LEN(A1))

here A1 = excel column 1 row 1
     N  = length of the column you want in this case 10



Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Jun 30, 2006 7:14 am    Post subject: Reply with quote

Btw I forgot to mention that the latest PTF from DFSORT can actually format variable format records into fixed length using PARSE function.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vishwakiran
Beginner


Joined: 29 Jun 2004
Posts: 11
Topics: 8
Location: Bangalore

PostPosted: Thu Jul 06, 2006 8:24 am    Post subject: Reply with quote

Thanks Kolusu for the guidance.
_________________
Regards,
Vishwakiran
Back to top
View user's profile Send private message
jyoung
Beginner


Joined: 10 Nov 2005
Posts: 36
Topics: 2
Location: Flint, MI

PostPosted: Thu Jul 06, 2006 12:32 pm    Post subject: Reply with quote

I first set the lengths of each column in Excel and then save it as a .prn file. Then you can upload it. When I save it as a .txt the field lengths do not work.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group