Axial beam shaping is very effective for material laser processing, typically laser cutting, drilling, and grooving. We demonstrate a framework for designing a computer-generated hologram (CGH) that performs volumetric beam shaping. The procedure performs axial beam shaping with a continuous intensity distribution, unlike our previous research in which only discrete focal points were arranged three-dimensionally. This research is the more general approach for volumetric beam shaping. An important point in this research is finding an optimal interval in the optical axis direction and in calculating the CGH design. The design interval is half of the focusing length (the full width at half-maximum of the laser beam profile in the axial direction) given by the diffraction limit of the optical system. The optimal value is obtained using an axially shaped beam that is the reconstruction of the CGH calculated from Zernike polynomials. We also demonstrate that the optimal interval for evaluating the axially shaped beam is also half of the beam length. Following the CGH design procedure, we demonstrate CGHs that generate long-focus beams with an arbitrary axially shaped beam. We found a tradeoff relation between the focusing length and the intensity of the long-focus beam, suggesting that the use of a focused beam with an appropriate length according to the purpose will lead to improved processing efficiency.