![]() |
Read Variable Length Records SimoVREC - The COBOL Source Code |
| When technology complements business | Copyright © 1987-2012 SimoTime Enterprises All Rights Reserved |
| The SimoTime Home Page |
The primary purpose of the SIMOVREC program is to provide a capabilty for accessing a mainframe file with variable length records that has been transferred from the mainframe to a Windows platform using "BINARY" mode. This capability will allow a user to read the mainframe formatted file and write to a standard Micro Focus file using variable length records. This document provides a listing of the COBOL source code for viewing. Additional information about this program may be obtained by sending an e-mail to: helpdesk@simotime.com .
The SimoVREC routine (or callable program) will provide access to a mainframe formatted sequential file with variable length records that has been downloaded from a mainframe using the File Transfer Protocol (FTP) in "BINARY" mode.
The following is an example of how to initialize the pass area. This only needs to be done one time prior to the first call.
move 'GET ' to VREC-REQUEST
move ZERO to VREC-RESPOND
move ZERO to VREC-LENGTH
move SPACES to VREC-BUFFER
The following is an example of a call statement for the callable routine.
call 'SIMOVREC' using PASSVREC-AREA
It is not necessary to do an explicit open of the input, byte-stream file. The first call to the routine will open the file and read the first record. Subsequent calls will return a logical record in the buffer with its record length in the RTN1-LENGTH field. When a call results in an end of file condition the routine will close the file. The COBOL copy file that defines the data structure for the pass area is described in a following section of this document. For convenience the following shows the field layout.
01 PASSVREC-AREA.
05 VREC-REQUEST pic X(8).
05 VREC-RESPOND pic 9(4).
05 VREC-LENGTH pic 9(5).
05 VREC-BUFFER pic X(32760).
The following is a list of the parameters and the required content when using the PASSVREC-AREA to call the SimoVREC routine.
| ||||||||||||||||||
| A List of the Environment Variables used by the SIMOVREC Callable Program |
The following are environment variables used by the byte-stream read routine for mainframe formatted files with variable length records.
| ||||||||||||||||||||||
| A List of the Environment Variables used by the SIMOVREC Callable Program |
The following is the COBOL Source Code.
IDENTIFICATION DIVISION.
PROGRAM-ID. SIMOVREC.
AUTHOR. SIMOTIME ENTERPRISES.
*****************************************************************
* Copyright (C) 1987-2012 SimoTime Enterprises. *
* *
* All rights reserved. Unpublished, all rights reserved under *
* copyright law and international treaty. Use of a copyright *
* notice is precautionary only and does not imply publication *
* or disclosure. *
* *
* Permission to use, copy, modify and distribute this software *
* for any non-commercial purpose and without fee is hereby *
* granted, provided the SimoTime copyright notice appear on all *
* copies of the software. The SimoTime name or Logo may not be *
* used in any advertising or publicity pertaining to the use *
* of the software without the written permission of SimoTime *
* Enterprises. *
* *
* Permission to use, copy, modify and distribute this software *
* for any commercial purpose requires a fee to be paid to *
* SimoTime Enterprises. Once the fee is received by SimoTime *
* the latest version of the software will be delivered and a *
* license will be granted for use within an enterprise, *
* provided the SimoTime copyright notice appear on all copies *
* of the software. The SimoTime name or Logo may not be used *
* in any advertising or publicity pertaining to the use of the *
* software without the written permission of SimoTime *
* Enterprises. *
* *
* SimoTime Enterprises makes no warranty or representations *
* about the suitability of the software for any purpose. It is *
* provided "AS IS" without any expressed or implied warranty, *
* including the implied warranties of merchantability, fitness *
* for a particular purpose and non-infringement. SimoTime *
* Enterprises shall not be liable for any direct, indirect, *
* special or consequential damages resulting from the loss of *
* use, data or projects, whether in an action of contract or *
* tort, arising out of or in connection with the use or *
* performance of this software *
* *
* SimoTime Enterprises *
* 15 Carnoustie Drive *
* Novato, CA 94949-5849 *
* 415.883.6565 *
* *
* RESTRICTED RIGHTS LEGEND *
* Use, duplication, or disclosure by the Government is subject *
* to restrictions as set forth in subparagraph (c)(1)(ii) of *
* the Rights in Technical Data and Computer Software clause at *
* DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of *
* Commercial Computer Software - Restricted Rights at 48 *
* CFR 52.227-19, as applicable. Contact SimoTime Enterprises, *
* 15 Carnoustie Drive, Novato, CA 94949-5849. *
* *
*****************************************************************
* This program is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
* *
*****************************************************************
*
*****************************************************************
* Source Member: SIMOVREC.CBL
* Copy Files: PASSVREC.CPY (used in LINKAGE Section)
* PASSBSIO.CPY (used in WORKING-STORAGE Section)
* Calls to: SIMOBSIO.CBL
*****************************************************************
*
* ************
* * VRECEXE1 *
* ********cmd*
* *
* ************
* * if exist *
* ********stmt*
* *
* ************ ************
* * VRECEXC1 *-----* SQEDDV01 *
* ********cbl* ********dat*
* *
* **********
* call * *
* * *
* ************ *
* * SIMOVREC * *
* ********cbl* *
* * * End
* call * * Of
* * * File
* ************ ************ *
* * BSIODSN1 *-----* SIMOBSIO * *
* ********dat* ********cbl* *
* *
* **********
* *
* ************
* * EOJ *
* ************
*
*****************************************************************
*ENVIRONMENT DIVISION.
*****************************************************************
DATA DIVISION.
WORKING-STORAGE SECTION.
01 SIM-TITLE.
05 T1 pic X(11) value '* SIMOVREC '.
05 T2 pic X(34) value 'File Reader via Byte-Stream I/O '.
05 T3 pic X(10) value ' v11.08.23'.
05 T4 pic X(24) value ' http://www.simotime.com'.
01 SIM-COPYRIGHT.
05 C1 pic X(11) value '* SIMOVREC '.
05 C2 pic X(20) value 'Copyright 1987-2012 '.
05 C3 pic X(28) value '--- SimoTime Enterprises ---'.
05 C4 pic X(20) value ' All Rights Reserved'.
01 SIM-THANKS-01.
05 C1 pic X(11) value '* SIMOVREC '.
05 C2 pic X(32) value 'Thank you for using this softwar'.
05 C3 pic X(32) value 'e provided from SimoTime Enterpr'.
05 C4 pic X(04) value 'ises'.
01 SIM-THANKS-02.
05 C1 pic X(11) value '* SIMOVREC '.
05 C2 pic X(32) value 'Please send all inquires or sugg'.
05 C3 pic X(32) value 'estions to the helpdesk@simotime'.
05 C4 pic X(04) value '.com'.
01 MESSAGE-BUFFER.
05 MESSAGE-HEADER pic X(11) value '* SIMOVREC '.
05 MESSAGE-TEXT.
10 MESSAGE-TEXT-1 pic X(68) value SPACES.
10 MESSAGE-TEXT-2 pic X(188) value SPACES.
*****************************************************************
* Data-structure for environment variable get routine... *
*****************************************************************
01 ENV-VAR-NAME pic X(16) value SPACES.
01 ENV-VAR-VALUE pic X(256) value SPACES.
01 APPL-RESULT pic S9(9) comp.
88 APPL-AOK value 0.
88 APPL-EOF value 16.
01 DEBUG-LEVEL pic 9(2) value 0.
01 FIRST-TIME pic X value 'Y'.
01 BSIO-OPEN-FLAG pic X value 'N'.
01 FILE-TYPE pic X(3) value 'V '.
01 DW-EDIT pic X value 'Y'.
01 DW-EXPECTED pic X value LOW-VALUES.
01 INITREC1-MESSAGE.
05 FILLER pic X(12) value 'InitREC1 is '.
05 OUTPUT-ENCODING pic X value 'E'.
01 VREDBV01-LREC pic 9(9) comp value 0.
01 VREDBV01-LREC-ALPHA redefines VREDBV01-LREC.
05 VREC-LEN-1 pic X(2).
05 VREC-LEN-2 pic X(2).
01 VREDBV01-LBLK pic 9(5) comp value 0.
01 VREDBV01-LBLK-ALPHA redefines VREDBV01-LBLK.
05 VBLK-LEN-1 pic X(2).
05 VBLK-LEN-2 pic X(2).
01 VBS-LOOP pic 9(9) comp value 0.
01 VBS-LOOP-ALPHA redefines VBS-LOOP.
05 VBS-LOOP-1 pic X.
05 VBS-LOOP-2 pic X.
05 VBS-LOOP-3 pic X.
05 VBS-LOOP-4 pic X.
01 OT-X1 pic 9(7) value 0.
01 RECORD-LENGTH-DISPLAY.
05 filler pic X(15) value 'Record length: '.
05 RECORD-LENGTH-VALUE pic 9(5) value 0.
01 RECORD-MIN-DISPLAY.
05 filler pic X(15) value 'Record MIN is: '.
05 RECORD-MIN-VALUE pic 9(4) value 0.
01 RECORD-MAX-DISPLAY.
05 filler pic X(15) value 'Record MAX is: '.
05 RECORD-MAX-VALUE pic 9(4) value 0.
01 BSIOREAD-TOTAL.
05 filler pic X(18) value 'BSIOREAD count is '.
05 BSIOREAD-COUNT pic 9(7) value 0.
01 BSIOBLOK-TOTAL.
05 filler pic X(18) value 'BSIOBLOK count is '.
05 BSIOBLOK-COUNT pic 9(7) value 0.
01 VREDBV01-TOTAL.
05 filler pic X(18) value 'VREDBV01 count is '.
05 VREDBV01-COUNT pic 9(7) value 0.
*****************************************************************
* The following copy file is the pass area for calling SIMOBSIO,
* the byte stream I/O routine.
*****************************************************************
*
COPY PASSBSIO.
*****************************************************************
LINKAGE SECTION.
COPY PASSVREC.
*****************************************************************
PROCEDURE DIVISION using PASSVREC-AREA.
if FIRST-TIME = 'Y'
perform GET-STARTED
* perform BSIO-OPEN
move 'N' to FIRST-TIME
move ZERO to PSIO-OFFSET
end-if
if OUTPUT-ENCODING = 'E'
move all x'40' to VREC-BUFFER
else
move all x'20' to VREC-BUFFER
end-if
if BSIO-OPEN-FLAG not = 'Y'
if VREC-REQUEST = 'GET '
or VREC-REQUEST = 'READBSIO'
perform BSIO-OPEN
end-if
end-if
evaluate VREC-REQUEST
when 'GET ' if FILE-TYPE = 'VBS'
perform BSIO-READ-VREC-MULTIPLE
else
perform BSIO-READ-VREC
end-if
when 'READBSIO' if FILE-TYPE = 'VBS'
perform BSIO-READ-VREC-MULTIPLE
else
perform BSIO-READ-VREC
end-if
when 'OPEN ' perform BSIO-OPEN
when 'OPENPUT ' perform BSIO-OPEN
when 'CLOSE ' perform BSIO-CLOSE
when 'CREATE ' perform BSIO-CREATE
when other add 16 to ZERO giving PSIO-RETURN
add 16 to ZERO giving VREC-RESPOND
end-evaluate
if PSIO-RETURN = ZERO
evaluate FILE-TYPE
when 'V ' perform ACTION-FOR-V
when 'VB ' perform ACTION-FOR-VB
when 'VBS' perform ACTION-FOR-VBS
when other add 9301 to ZERO giving VREC-RESPOND
end-evaluate
else
add PSIO-RETURN to ZERO giving VREC-RESPOND
end-if
GOBACK.
*****************************************************************
ACTION-FOR-V.
add PSIO-LENGTH to ZERO giving VREC-LENGTH
move PSIO-BUFFER(1:VREDBV01-LREC)
to VREC-BUFFER(1:VREDBV01-LREC)
add PSIO-RETURN to ZERO giving VREC-RESPOND
exit.
*****************************************************************
ACTION-FOR-VB.
add PSIO-LENGTH to ZERO giving VREC-LENGTH
move PSIO-BUFFER(1:VREDBV01-LREC)
to VREC-BUFFER(1:VREDBV01-LREC)
add PSIO-RETURN to ZERO giving VREC-RESPOND
* if FILE-TYPE = 'VB '
* move BSIOBLOK-TOTAL to MESSAGE-TEXT
* perform Z-DISPLAY-CONSOLE-MESSAGE
* end-if
exit.
*****************************************************************
ACTION-FOR-VBS.
add PSIO-RETURN to ZERO giving VREC-RESPOND
exit.
*****************************************************************
* I/O ROUTINES FOR BYTE-Stream I/O... *
*****************************************************************
BSIO-READ-VREC.
* Get the Block Descriptor Word (BDW)...
if FILE-TYPE = 'VB'
and VREDBV01-LBLK < 1
add 4 to ZERO giving PSIO-LENGTH
move 'READBSIO' to PSIO-REQUEST
call 'SIMOBSIO' using PSIO-PASS-AREA
if DW-EDIT = 'Y'
if PSIO-BUFFER(3:2) not = LOW-VALUES
move 'Invalid Block Descriptor Word'
to MESSAGE-TEXT
perform Z-ABEND-PROGRAM
end-if
end-if
move PSIO-BUFFER(1:2) to VREDBV01-LBLK-ALPHA(3:2)
subtract 4 from VREDBV01-LBLK
add 4 to PSIO-OFFSET
add 1 to BSIOBLOK-COUNT
end-if
* Get the Record Descriptor Word (RDW)...
add 4 to ZERO giving PSIO-LENGTH
move 'READBSIO' to PSIO-REQUEST
call 'SIMOBSIO' using PSIO-PASS-AREA
if PSIO-RETURN = 0
if DW-EDIT = 'Y'
if PSIO-BUFFER(3:2) not = LOW-VALUES
* For VBS this will post an error if a record
* attempts to span segments.
move 'Invalid Descriptor Word Content'
to MESSAGE-TEXT
perform Z-ABEND-PROGRAM
end-if
end-if
move PSIO-BUFFER(1:2) to VREDBV01-LREC-ALPHA(3:2)
if FILE-TYPE = 'VB'
subtract VREDBV01-LREC from VREDBV01-LBLK
end-if
subtract 4 from VREDBV01-LREC
* Read the variable-length record.
add PSIO-LENGTH to PSIO-OFFSET
add VREDBV01-LREC to ZERO giving PSIO-LENGTH
if PSIO-LENGTH > PSIO-MAX-SIZE
add PSIO-MAX-SIZE to ZERO giving VREDBV01-LREC
display 'Record read size exceeds max size '
PSIO-LENGTH ' vs ' PSIO-MAX-SIZE
' Record Number is ' BSIOREAD-COUNT
upon console
end-if
call 'SIMOBSIO' using PSIO-PASS-AREA
add 1 to BSIOREAD-COUNT
add PSIO-LENGTH to PSIO-OFFSET
end-if
exit.
*---------------------------------------------------------------*
BSIO-READ-VREC-MULTIPLE.
move x'01' to VBS-LOOP-3
move ZERO to VREC-LENGTH
add 1 to ZERO giving OT-X1
perform until VBS-LOOP-3 = LOW-VALUE
or VBS-LOOP-3 = x'02'
perform BSIO-READ-VREC-MULTIPLE-02
if PSIO-RETURN = 0
add PSIO-LENGTH to VREC-LENGTH
move PSIO-BUFFER(OT-X1:VREDBV01-LREC)
to VREC-BUFFER(OT-X1:VREDBV01-LREC)
add PSIO-LENGTH to OT-X1
end-if
end-perform
exit.
*---------------------------------------------------------------*
BSIO-READ-VREC-MULTIPLE-02.
* Get the Segment Descriptor Word (RDW)...
add 4 to ZERO giving PSIO-LENGTH
move 'READBSIO' to PSIO-REQUEST
call 'SIMOBSIO' using PSIO-PASS-AREA
if PSIO-RETURN = 0
move PSIO-BUFFER(1:4) to VBS-LOOP-ALPHA
if DW-EDIT = 'Y'
if VBS-LOOP-3 not = LOW-VALUE
and VBS-LOOP-3 not = x'01'
and VBS-LOOP-3 not = x'02'
and VBS-LOOP-3 not = x'03'
* For VBS this will post an error if a record
* attempts to span segments.
move 'Invalid Descriptor Word Content'
to MESSAGE-TEXT
perform Z-ABEND-PROGRAM
end-if
end-if
move PSIO-BUFFER(1:2) to VREDBV01-LREC-ALPHA(3:2)
subtract 4 from VREDBV01-LREC
* Read the variable-length record.
add PSIO-LENGTH to PSIO-OFFSET
add VREDBV01-LREC to ZERO giving PSIO-LENGTH
if PSIO-LENGTH > PSIO-MAX-SIZE
add PSIO-MAX-SIZE to ZERO giving VREDBV01-LREC
display 'Record read size exceeds max size '
PSIO-LENGTH ' vs ' PSIO-MAX-SIZE
' Record Number is ' BSIOREAD-COUNT
upon console
end-if
call 'SIMOBSIO' using PSIO-PASS-AREA
add 1 to BSIOREAD-COUNT
add PSIO-LENGTH to PSIO-OFFSET
else
move LOW-VALUE to VBS-LOOP-3
end-if
exit.
*---------------------------------------------------------------*
BSIO-OPEN.
move PSIO-FILENAME to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move 'OPEN ' to PSIO-REQUEST
call 'SIMOBSIO' using PSIO-PASS-AREA
if PSIO-RETURN = 0
move 'AOK, OPEN Input File for BSIO' to MESSAGE-TEXT
move 'Y' to BSIO-OPEN-FLAG
else
move 'NOK, OPEN Input File FAILURE ' to MESSAGE-TEXT
perform Z-ABEND-PROGRAM
end-if
perform Z-DISPLAY-CONSOLE-MESSAGE
move 'FILEINFO' to PSIO-REQUEST
call 'SIMOBSIO' using PSIO-PASS-AREA
if PSIO-RETURN = 0
move 'AOK, File Info Request for BSIO' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move PSIO-FILE-SIZE to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
else
move 'NOK, File Info Request FAILURE ' to MESSAGE-TEXT
perform Z-ABEND-PROGRAM
end-if
exit.
*---------------------------------------------------------------*
BSIO-CREATE.
move PSIO-FILENAME to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
move VREC-REQUEST to PSIO-REQUEST
call 'SIMOBSIO' using PSIO-PASS-AREA
if PSIO-RETURN = 0
move 'AOK, CREATE File for BSIO' to MESSAGE-TEXT
else
move 'NOK, CREATE File FAILURE ' to MESSAGE-TEXT
perform Z-ABEND-PROGRAM
end-if
perform Z-DISPLAY-CONSOLE-MESSAGE
exit.
*---------------------------------------------------------------*
BSIO-CLOSE.
move 'CLOSE ' to PSIO-REQUEST
call 'SIMOBSIO' using PSIO-PASS-AREA
exit.
*****************************************************************
* Get an environment variable. *
*****************************************************************
GET-ENVIRONMENT-VARIABLE.
move SPACES to ENV-VAR-VALUE
move ZERO to RETURN-CODE
display ENV-VAR-NAME upon ENVIRONMENT-NAME
on exception add 4 to ZERO giving RETURN-CODE
end-display
accept ENV-VAR-VALUE from ENVIRONMENT-VALUE
on exception add 4 to ZERO giving RETURN-CODE
end-accept
if RETURN-CODE not = 0
move SPACES to ENV-VAR-VALUE
end-if
exit.
*****************************************************************
* Get started or first time logic... *
*****************************************************************
GET-STARTED.
perform Z-POST-COPYRIGHT
* Get the fully qualified File Name
move SPACES to ENV-VAR-NAME
move 'BSIODSN1' to ENV-VAR-NAME
perform GET-ENVIRONMENT-VARIABLE
if ENV-VAR-VALUE not = SPACES
move ENV-VAR-VALUE to PSIO-FILENAME
else
move 'Invalid file name for BSIO Function'
to MESSAGE-TEXT
perform Z-ABEND-PROGRAM
end-if
* Get the record initialization value
move SPACES to ENV-VAR-NAME
move 'INITREC1' to ENV-VAR-NAME
perform GET-ENVIRONMENT-VARIABLE
if ENV-VAR-VALUE not = SPACES
move ENV-VAR-VALUE to OUTPUT-ENCODING
if OUTPUT-ENCODING = 'E' or 'A'
move INITREC1-MESSAGE to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
else
move 'E' to OUTPUT-ENCODING
move 'Invalid INITREC1, not A or E, assumed EBCDIC'
to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
end-if
else
move 'E' to OUTPUT-ENCODING
move 'Invalid INITREC1, must be A or E, assumed EBCDIC'
to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
end-if
* Get a possible EXTFH value...
move SPACES to ENV-VAR-NAME
move 'EXTFH ' to ENV-VAR-NAME
perform GET-ENVIRONMENT-VARIABLE
if ENV-VAR-VALUE not = SPACES
move ENV-VAR-VALUE to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
else
move 'Info Only, EXTFH Environment variable not found.'
to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
end-if
* Get the File Format, should be V or VB
move SPACES to ENV-VAR-NAME
* move 'BSIOFMT1' to ENV-VAR-NAME
move 'BSIOFMT1' to ENV-VAR-NAME
perform GET-ENVIRONMENT-VARIABLE
inspect ENV-VAR-VALUE converting 'bov' to 'BOV'
if ENV-VAR-VALUE = 'VO '
move 'N' to DW-EDIT
move 'V ' to ENV-VAR-VALUE
end-if
if ENV-VAR-VALUE = 'VBO'
move 'N' to DW-EDIT
move 'VB ' to ENV-VAR-VALUE
end-if
if ENV-VAR-VALUE = 'V '
or ENV-VAR-VALUE = 'VB '
or ENV-VAR-VALUE = 'VBS'
move ENV-VAR-VALUE to FILE-TYPE
else
move 'V ' to FILE-TYPE
move 'File Format must be V or VB, assumed V'
to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
end-if
move 'Info Only, File Type is &&&' to MESSAGE-TEXT
inspect MESSAGE-TEXT replacing first '&&&' by FILE-TYPE
perform Z-DISPLAY-CONSOLE-MESSAGE
add 32760 to ZERO giving PSIO-MAX-SIZE
exit.
*****************************************************************
* The following Z-Routines perform administrative tasks *
* for this program. *
*****************************************************************
* ABEND the program, post a message to the console and issue *
* a STOP RUN. *
*****************************************************************
Z-ABEND-PROGRAM.
if MESSAGE-TEXT not = SPACES
perform Z-DISPLAY-CONSOLE-MESSAGE
end-if
move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT
perform Z-DISPLAY-CONSOLE-MESSAGE
add 12 to ZERO giving RETURN-CODE
GOBACK
* STOP RUN
exit.
*****************************************************************
* Display CONSOLE messages... *
*****************************************************************
Z-DISPLAY-CONSOLE-MESSAGE.
if MESSAGE-TEXT-2 = SPACES
display MESSAGE-BUFFER(1:79) upon console
else
display MESSAGE-BUFFER upon console
end-if
move all SPACES to MESSAGE-TEXT
exit.
*****************************************************************
Z-POST-COPYRIGHT.
display SIM-TITLE upon console
display SIM-COPYRIGHT upon console
exit.
*****************************************************************
Z-THANK-YOU.
display SIM-THANKS-01 upon console
display SIM-THANKS-02 upon console
exit.
*****************************************************************
* This example is provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
The following is the COBOL copy file used to define the pass area structure when calling the SIMOVREC program.
*****************************************************************
* PASSVREC is a COBOL Copy File *
* Data Structure or Pass Area used for calling SIMOVREC. *
* Copyright (C) 1987-2012 SimoTime Enterprises *
* All Rights Reserved *
*****************************************************************
* Provided by SimoTime Enterprises *
* Our e-mail address is: helpdesk@simotime.com *
* Also, visit our Web Site at http://www.simotime.com *
*****************************************************************
*
* VREC-REQUEST - This parameter must be provided by the calling
* program.
* VREC-RESPOND - A zero (0) value indicates a successful
* completion of the request. A non-zero value
* indicates the request could not be completed
* successfully.
* VREC-LENGTH - The length of the read or GET request is posted
* in this parameter by SimoVREC. This is the
* length of the record. The logical record size
* may vary from 4 to 32,760 bytes.
* VREC-BUFFER - This parameter will contain the logical record
* for a GET request.
*
01 PASSVREC-AREA.
05 VREC-REQUEST pic X(8).
05 VREC-RESPOND pic 9(4).
05 VREC-LENGTH pic 9(5).
05 VREC-BUFFER pic X(32760).
*
*** PASSVREC - End-of-Copy File - - - - - - - - - - - PASSVREC *
*****************************************************************
*
The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This documents and the links to other documents are intended to provide a choice of alternatives.
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.
SimoTime Enterprises makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that is beyond the scope and purpose of this document.
You may view an example of a COBOL program that uses SimoVREC at http://www.simotime.com/vrecex01.htm.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information.
Note: You must be attached to the Internet to download a Z-Pack or view the list.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.
Check out The SimoTime Glossary for a list of terms and definitions used in the documents provided by SimoTime.
This document was created and is maintained by SimoTime Enterprises.
If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com
We appreciate hearing from you.
Founded in 1987, SimoTime Enterprises is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
| Return-to-Top |
| SimoVrec, Cobol Source code to Access a Variable Length File |
| Copyright © 1987-2012 SimoTime Enterprises All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |