SAMSOPN

The SAMSOPN routine opens a subfile for processing. A subfile is data that is chained off the index record (SYSOUT data or panel data). Any subfile that was subsequently opened is automatically closed before opening the new subfile.
view
The SAMSOPN routine opens a subfile for processing. A subfile is data that is chained off the index record (SYSOUT data or panel data). Any subfile that was subsequently opened is automatically closed before opening the new subfile.
Calling Parameters
  • Address of GCR (Group Control Record) or OCR (Online Control Record)
Return Codes
Output Return Codes (general register 15):
  • 0
    Subfile successfully opened
  • 4
    No subfile for record
  • 8
    Subfile not opened
Calling Example: Assembler
The following is an example using assembler:
. . . CALL SAMSOPN,(GREC),VL OPEN SUBFILE LTR 15,15 CHECK RETURN CODE BNZ DBERR . . . GREC DC CL(GCRLEN) GCR RECORD AREA GRECL DC Y(GCRLEN) GCR RECORD LENGTH
Calling Example: COBOL
The following is an example using COBOL:
. . . 77 GRECL PIC S9(4) COMP VALUE +464. 01 GREC. 05 GREC-KEY PIC X(36). 05 GREC-DATA PIC X(428). . . . CALL 'SAMSOPN' USING GREC. IF RETURN-CODE NOT = ZERO GO TO DBERR.