How to split a job based on file size in PIOE/VDE

print

IndexFiles_45.0

45 is the job number. The file size could likely correlate to the output file size. For example, a certain application might have a VDD size of 50 MB which would mean the PDF output would have a file size of approximately 5 MB. If that size is the limit, OE could split the job once the VDD(s) in the folder exceed 50 MB (as long as document integrity is maintained). Dynamic profile options could be set too.
The files could be poll using the OE System command. The example is done with the following VDD file in mind (for job 45):

:\MGRUSER2.5.X\Virtuals\VDD\Documents_45.0

 
UNIT 14400DPI;
ENCODING WINANSI;
 
 
[OBJECT_MANAGE_JOB_SIZE] OBJECT REGION SCAN 0 
    BEGINWINDOWX 0 BEGINWINDOWY 0
        TEST
            FRONT
            // AND NEW DOCUMENT
        ACTION
            [FORMAT_DIR_OUTPUT]
            AND [SYSTEM_SPAWN]
            AND [OBJECT_LOGIC_START_PARSE_LIST_FILE]            
            // AND [OBJECT_SPLIT] // Split if the VDD size is above a certain value for this job
    ENDWINDOWX 0 ENDWINDOWY 0
;
 
[FORMAT_DIR_OUTPUT] FORMAT [VARIABLE_SYSTEM_COMMAND] FROM "DIR %s\\*_%s.0 > %s\\%s"
    PROFILE_OE_VDD_DIRECTORY // From the profile, set to :\MGRUSER2.5.X\Virtuals\VDD
    AND VIPJOBNUMBER
    AND PROFILE_OE_TEMP_DIRECTORY // From the profile
    AND [VARIABLE_LIST_FILE_NAME]
;   
 
[SYSTEM_SPAWN] SYSTEM SPAWN [VARIABLE_SYSTEM_COMMAND] ERRORNUMBER [VARIABLE_COMMAND_RETURN];
 
[VARIABLE_LIST_FILE_NAME] VARIABLE [STORETYPE_ARRAY_100] EQ "List.txt";
[VARIABLE_SYSTEM_COMMAND] VARIABLE [STORETYPE_ARRAY_1000] EQ "";
[VARIABLE_COMMAND_RETURN] VARIABLE [STORETYPE_ARRAY_50] EQ "";
 
[OBJECT_LOGIC_START_PARSE_LIST_FILE] OBJECT
    CONDITION
        ACTION
            // Read in list file using Disk Read
            // Format search value
            [LOGIC_START_PARSE_LIST_FILE] // Search for job VDD file
;
 
[LOGIC_START_PARSE_LIST_FILE] LOGIC START [OBJECT_PARSE_LIST_FILE]
    REPEAT [VARIABLE_NUMBER_CYCLES]
;    
 
[VARIABLE_LIST_FILE_DATA] VARIABLE [STORETYPE_ARRAY_1000] EQ "";
[VARIABLE_NUMBER_CYCLES] VARIABLE [STORETYPE_INT] EQ 1; // Increment in loop
[VARIABLE_SEARCH_VALUE] VARIABLE [STORETYPE_ARRAY_50] EQ "_45.0"; // Replace with dynamic value using Format syntax
 
 
[OBJECT_PARSE_LIST_FILE] OBJECT
    CONDITION 
        // Test for match
        TEST
            [TEST_MATCH]         
        ACTION
            [EXTRACT_SIZE] // Extract from file that has been read
            AND [LOGIC_STOP_OBJECT_PARSE_LIST_FILE] // Stop the calling object to end the loop
    CONDITION    
        // Default case
        ACTION
            [CALCULATE_INCREMENT_CYCLES] // Continue loop
;
 
[TEST_MATCH] TEST [VARIABLE_LIST_FILE_DATA:REPEATNUMBER] CONTAINS [VARIABLE_SEARCH_VALUE];
 
[EXTRACT_SIZE] EXTRACT [VARIABLE_VDD_SIZE]
    EQ [VARIABLE_LIST_FILE_DATA:REPEATNUMBER] FROM 27 LEN 12
;
 
[LOGIC_STOP_OBJECT_PARSE_LIST_FILE] LOGIC STOP [OBJECT_LOGIC_START_PARSE_LIST_FILE];

// Default block
[CALCULATE_INCREMENT_CYCLES] CALCULATE [VARIABLE_NUMBER_CYCLES]
    EQ [VARIABLE_NUMBER_CYCLES] PLUS 1
;    

[VARIABLE_VDD_SIZE] VARIABLE [STORETYPE_INT] EQ 0;

[STORETYPE_INT] STORETYPE NUMBER;
[STORETYPE_ARRAY_50] STORETYPE ARRAY LEN 50;
[STORETYPE_ARRAY_100] STORETYPE ARRAY LEN 100;
[STORETYPE_ARRAY_1000] STORETYPE ARRAY LEN 1000;

 

UPDATED: August 07, 2017

Contact Us