03.03.2015 Views

CA Dynam for VSE User Guide

CA Dynam for VSE User Guide

CA Dynam for VSE User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Dynam</strong>ic File Sorting<br />

<strong>CA</strong> SRAM normally uses the upper unused portion of the partition to allocate<br />

storage <strong>for</strong> each task and its own overhead. If this procedure conflicts with the<br />

user program (<strong>for</strong> example, PL/I and RPG II also dynamically use partition<br />

storage), a <strong>CA</strong> SRAM SRTCORE call must be issued. <strong>CA</strong> <strong>Dynam</strong>/FI obtains the<br />

necessary storage from the partition GETVIS area and issues the SRTCORE call<br />

based on the size you have indicated <strong>for</strong> the specific sorting task (using<br />

SRTCORE on the xLBL statement) and/or what you have requested as a total<br />

amount of storage (using SORTCORE on the SET statement).<br />

Note that the SET SORTCORE statement indicates the total amount of storage<br />

you want <strong>CA</strong> <strong>Dynam</strong>/FI to request <strong>for</strong> all sorting tasks. The SRTCORE<br />

parameter on the xLBL statement indicates the amount of storage requested<br />

<strong>for</strong> a particular task.<br />

For more in<strong>for</strong>mation on the <strong>CA</strong> <strong>Dynam</strong>/FI SET statement, see Controlling<br />

System Actions. The <strong>CA</strong> SRAM documentation set provides instructions <strong>for</strong><br />

calculating storage sizes.<br />

Examples<br />

Sort the file TAPEOUT on output. The sort key record shows that the sorted<br />

field starts at the first position, has a length of 20, is character data, and will<br />

be sorted in descending order. The file name of the work file is WORK1 and is<br />

on logical unit SYS040. 40000 bytes of GETVIS storage have been requested<br />

<strong>for</strong> the sort and its overhead.<br />

// TLBL TAPEOUT,'OUTPUT.FILE',,SORTOUT=(1,20,C,D), X<br />

SORTWRK=(WORK1,SYS040),SRTCORE=40000<br />

If a cataloged sort key name (KEY1) and sort work file defaults (WORK1 on<br />

SYS001) were used, and no SRTCORE call were needed, the above example<br />

could be rewritten as:<br />

// TLBL TAPEOUT,'OUTPUT.FILE',,SORTOUT=KEY1<br />

Sort the file FILEOUT on output. Since PL1001 is a user-written PL/I program,<br />

a SET SORTCORE statement precedes execution of the program. 50000 bytes<br />

of storage have been requested <strong>for</strong> all sorting tasks in this job and 30000<br />

bytes have been requested <strong>for</strong> the task <strong>for</strong> FILEOUT.<br />

Chapter 6: Controlling File Independence 6–9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!