From a581e195e25096d5f351edd264976ae3fcc267d6 Mon Sep 17 00:00:00 2001 From: Moshix Date: Sun, 28 May 2017 15:30:25 -0500 Subject: [PATCH] blocksize.go slightly improved --- blocksize.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/blocksize.go b/blocksize.go index 586de74..840ddff 100644 --- a/blocksize.go +++ b/blocksize.go @@ -1,9 +1,10 @@ package main /* - blockfactor + blocksize block size calculator for most IBM DASDs - invoke wiht blockfactor DASD LRECL parameters + invoke with: + blocksize DASD LRECL parameters (c) 2017 by moshix @@ -62,16 +63,16 @@ func main() { table["9345"] = 46456 /* this is just an exampmle on how to print out table p.s. prints out in random order.... not sure why - for model, size := range table { + for model, size := range table { fmt.Println("Model",model, "size",size) } */ - /* formula: BLOCKIZE = INT(half of TRKSZIE/LRECL) * LRECL - // calculate optimum block size */ + /* formula: BLOCKIZE = INT(half of TRKSZIE/LRECL) * LRECL */ - /* fulltracks := table[dasd] */ //obtain pair value of key dasd halftracks := table[dasd] / 2 // half track size blocksize := int((halftracks / lrecl) * lrecl) + fmt.Println("BLK100I Ideal blocksize for DASD type", dasd, ", LRECL: ", lrecl, " is: ", blocksize) + return }