IBM / zOS-Client-Web-Enablement-Toolkit

Apache License 2.0
38 stars 15 forks source link

DS_TYPE="blocked" causing space problem #32

Closed manfredlotz closed 10 months ago

manfredlotz commented 1 year ago

In Example-Download/hwtdload.c the line

char DS_TYPE = "blocked"; / TRSMAIN convention */

doesn't seem to be correct.

I pre-allocated a DSN like this

Data class . . . . . .              
 Space units . . . . . BLOCK        

 Average record unit                
 Primary quantity  . . 3648
 Secondary quantity    5641
 Directory blocks  . . 0            
 Record format . . . . FB           
 Record length . . . . 1024         
 Block size  . . . . . 6144         

and downloaded a file from a server with size 268427264.

The resulting space usage was

Current Allocation           
 Allocated blocks  . : 65,776
 Allocated extents . : 12

Current Utilization          
 Used blocks . . . . : 63,549
 Used extents  . . . : 12

If I download with ftp to a dataset allocated as above the resulting space usages is

Current Allocation           
 Allocated blocks  . : 48,832
 Allocated extents . : 9

Current Utilization          
 Used blocks . . . . : 43,690
 Used extents  . . . : 9

Changing the DS_TYPE definition to

char *DS_TYPE = "record";

solved it. Now downloading with hwtdload gave the same space usage as with ftp.

Christopher-Chappell commented 10 months ago

Fixed by #34