Skip to Content
0
Former Member
Jan 30, 2008 at 03:07 AM

open dataset problem

13 Views

hi guys,

i am trying to get all the folders that are available at directory:

/exchange/DEV , inside this fiolder it contains:

000alSuv.DEV

000alSuv.DEVs

000aljxx.DEV

000aljxx.DEVs

000b8Z1d.DEV

000b8Z1d.DEVs

0010cTWT.DEV

0010cTWT.DEVs

0010diF7.DEV

0010diF7.DEVs

0014IIXh.DEV

0014IIXh.DEVs

0014IR4D.DEV

0014IR4D.DEVs

0014IZaj.DEV

0014IZaj.DEVs

0014Jwpt.DEV

0014Jwpt.DEVs

0014KMPR.DEV

0014KMPR.DEVs

0014Ti4X.DEV

0014Ti4X.DEVs

0014Tqb3.DEV

0014Tqb3.DEVs

0014UGAb.DEV

0014UGAb.DEVs

0014VUtF.DEV

0014VUtF.DEVs

but it displays weird result

this is my coding:

DATA:

dsn(40) TYPE c VALUE '/exchange/DEV',

rec(100) TYPE c.

OPEN DATASET dsn FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc <> 0.

EXIT.

ENDIF.

READ DATASET dsn INTO rec.

WHILE sy-subrc = 0.

WRITE / rec. READ DATASET dsn INTO rec.

ENDWHILE.

CLOSE DATASET dsn.

the problem is: rec contains #/###########################'#########D#############Ae#####ae#################o###d##################

how can i get these results as per the folder

000alSuv.DEV

000alSuv.DEVs

000aljxx.DEV

000aljxx.DEVs

000b8Z1d.DEV

000b8Z1d.DEVs

0010cTWT.DEV

0010cTWT.DEVs

0010diF7.DEV

0010diF7.DEVs

0014IIXh.DEV

0014IIXh.DEVs

0014IR4D.DEV

0014IR4D.DEVs

0014IZaj.DEV

0014IZaj.DEVs

0014Jwpt.DEV

0014Jwpt.DEVs

0014KMPR.DEV

0014KMPR.DEVs

0014Ti4X.DEV

0014Ti4X.DEVs

0014Tqb3.DEV

0014Tqb3.DEVs

0014UGAb.DEV

0014UGAb.DEVs

0014VUtF.DEV

0014VUtF.DEVs