View previous topic :: View next topic |
Author |
Message |
Vishwakiran Beginner
Joined: 29 Jun 2004 Posts: 11 Topics: 8 Location: Bangalore
|
Posted: Fri Jun 30, 2006 6:57 am Post subject: Uploading MS excel file to mainframe |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Jun 30, 2006 7:12 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Jun 30, 2006 7:14 am Post subject: |
|
|
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 |
|
|
Vishwakiran Beginner
Joined: 29 Jun 2004 Posts: 11 Topics: 8 Location: Bangalore
|
Posted: Thu Jul 06, 2006 8:24 am Post subject: |
|
|
Thanks Kolusu for the guidance. _________________ Regards,
Vishwakiran |
|
Back to top |
|
|
jyoung Beginner
Joined: 10 Nov 2005 Posts: 36 Topics: 2 Location: Flint, MI
|
Posted: Thu Jul 06, 2006 12:32 pm Post subject: |
|
|
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 |
|
|
|
|