Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with open dataset

Former Member
0 Likes
766

Hi guys:

I have a problem when to use the statement OPEN DATASET, I need to create in unix directory the next file:

/ZXQ/sap_i_files/vhvc/data/T0010360.W0041201.YXSP PR DISC_new

But when I created the file this delete the spaces and the file appear that:

/ZXQ/sap_i_files/vhvc/data/T0010360.W0041201.YXSP

The next words disappear the file.

What I can do?

Best for advanced

Dlc

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
735

1 Possible way will be check the output length of the file variable

say for eg.


OPEN DATASET ar_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT .

check ar_file variable length whether its accomodating full file name ?

a®

6 REPLIES 6
Read only

former_member194669
Active Contributor
0 Likes
736

1 Possible way will be check the output length of the file variable

say for eg.


OPEN DATASET ar_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT .

check ar_file variable length whether its accomodating full file name ?

a®

Read only

0 Likes
735

The variables is:

newfile(128) type c.

I dont know if Ihave to added more length,

Regards,

Read only

0 Likes
735

Just for testing remove the space between YXSP PR DISC and keep it as .(dot) or Underscore


/ZXQ/sap_i_files/vhvc/data/T0010360.W0041201.YXSP.PR.DISC_new

and check

a®

Read only

0 Likes
735

When I to replace the space with _ or . , the file created is correct, but only when I want to use the spaces cut the length,

Read only

0 Likes
735

Then i think its Unix issue. For testing this use transaction code CG3Z and upload a file from your desktop to your Unix directory you mentioned with space in file name and check whether file created sucessfully with spaces

a®

Read only

0 Likes
735

Thank you very much,

Best regards