Example 1 – z/OS
This example uses the ENQUEUE/DEQUEUE function, which is supported only by z/OS.
The SYSPRINT is as follows:
********************** TOP OF DATA ******************************* TERADATA CORPORATION BTEQ 5.3.0 Thu Jan 18 15:03:41 1996 +---------+---------+---------+---------+---------+---- /***************************************/ /* just a little test program... */ /***************************************/ .WIDTH 80 +---------+---------+---------+---------+---------+---- .LOGON tdri/cme, *** Logon successfully completed. *** Total elapsed time was 0.75 seconds. +---------+---------+---------+---------+---------+---- .show versions; BTEQ Version 5.3.0 for IBM OS/370 BTQMain : H3_03 BTQUtil : H3_05 BTQResp : H3_03 BTQParse : H3_02 BTQNotfy : H3_00 CapAAUtl : H3_01 CapCLUtl : H3_02 CapIOUtl : H3_03 CapLogW : H3_00 CapMVSQ : H3_00 CapNfy : H3_00 CapLoadM : H3_00 MOSIDEP : H0_02 CapTypes : H2_01 CapDBC : H3_00 ITBDBC : H3_02 MOSIIF : H2_01 BTEQ linking date is 01/03/96 +---------+---------+---------+---------+---------+---- .set notify low queue rname 'sighsighsighsigh'; +---------+---------+---------+---------+---------+---- .if errorcode <> 0 then .quit errorcode; +---------+---------+---------+---------+---------+---- sel * from cme.foo; *** Query completed. 4 rows found. One column returned. *** Total elapsed time was 0.27 seconds. 96/01/18 sel * from cme.foo; Page 1 a ----------- 2 4 1 3 +---------+---------+---------+---------+---------+---- .LOGOFF *** You are now logged off from the DBC. +---------+---------+---------+---------+---------+---- *** Exiting BTEQ... Ending BTEQ Thu Jan 18 15:03:42 1996
- TRDF0001I – means that the job is waiting for a queue whose QNAME is 'TRDFEQUE' and whose RNAME is 'sighsighsighsigh'.
- TRDF0002I – means that the queue is now held by the job. It is possible that the job might block for an indefinite period of time between the TRDF000 and TRDF0002I messages.
- TDRF0003I – means that the job is releasing the queue. These messages can help users of the QUEUE feature debug their jobs.
J E S 2 J O B L O G -- S Y S T E M M V S 2 -- N O D E T E R M V S 2 15.03.29 JOB 3207 $HASP373 BTEQTEST STARTED - INIT 42 - CLASS A - SYS MVS2 15.03.41 JOB 3207 +TRDF0001I BTEQTEST ENQ - Q=TRDFEQUE R=sighsighsighsigh 15.03.41 JOB 3207 +TRDF0002I BTEQTEST ENQ - Q=TRDFEQUE R=sighsighsighsigh 15.03.42 JOB 3207 +TRDF0003I BTEQTEST DEQ - Q=TRDFEQUE R=sighsighsighsigh 15.03.42 JOB 3207 BTEQTEST.STEP01 . RC=ZERO T=0000 D=0210 MT=.17S ET=012S 15.03.42 JOB 3207 BTEQTEST ENDED. NAME=CHARLES EUBANKS TOTAL MT=.17S ET=012S 15.03.42 JOB 3207 $HASP395 BTEQTEST ENDED ------ JES2 JOB STATISTICS ------ 18 JAN 96 JOB EXECUTION DATE 38 CARDS READ 163 SYSOUT PRINT RECORDS 0 SYSOUT PUNCH RECORDS 9 SYSOUT SPOOL KBYTES 0.21 MINUTES EXECUTION TIME *** Query completed. 5 rows found. 24 columns returned.
Example 2 – z/OS
This example uses the MSG option.
The SYSPRINT is as follows:
TERADATA CORPORATION BTEQ 5.3.0 Thu Jan 18 15:05:11 1996 +---------+---------+---------+---------+---------+---- /***************************************/ /* just a little test program... */ /***************************************/ .WIDTH 80 +---------+---------+---------+---------+---------+---- .LOGON tdri/cme, *** Logon successfully completed. *** Total elapsed time was 0.65 seconds. +---------+---------+---------+---------+---------+---- .set notify low msg 'this is a test' ; +---------+---------+---------+---------+---------+---- .if errorcode <> 0 then .quit errorcode; +---------+---------+---------+---------+---------+---- sel * from cme.foo; *** Query completed. 4 rows found. One column returned. *** Total elapsed time was 0.17 seconds. 96/01/18 sel * from cme.foo; Page 1 a ----------- 2 4 1 3 +---------+---------+---------+---------+---------+---- .LOGOFF *** You are now logged off from the DBC. +---------+---------+---------+---------+---------+---- *** Exiting BTEQ... Ending BTEQ Thu Jan 18 15:05:12 1996
The JES2 LOG output follows. The TRDF0010I message is the MSG output, thus it contains the user-provided string “this is a test”:
J E S 2 J O B L O G -- S Y S T E M M V S 2 -- N O D E T E R M V S 2 15.05.06 JOB 3214 $HASP373 BTEQTEST STARTED - INIT 42 - CLASS A - SYS MVS2 15.05.11 JOB 3214 +TRDF0010I this is a test - BTEQ request complete.' 15.05.12 JOB 3214 BTEQTEST.STEP01 . RC=ZERO T=0000 D=0214 MT=.16S ET=5.5S 15.05.12 JOB 3214 BTEQTEST ENDED. NAME=CHARLES EUBANKS TOTAL MT=.16S ET=5.6S 15.05.12 JOB 3214 $HASP395 BTEQTEST ENDED ------ JES2 JOB STATISTICS ------ 18 JAN 96 JOB EXECUTION DATE 38 CARDS READ 182 SYSOUT PRINT RECORDS 0 SYSOUT PUNCH RECORDS 9 SYSOUT SPOOL KBYTES 0.10 MINUTES EXECUTION TIME
Example 3 – z/OS
This example shows how to build a SAS/C Notify Exit load module.
- USER.SAMPLIB
- USER.TEXTM
- USER.OBJM
- USER.LOADM
Also assuming the sample Notify C-file BTNFYXTC and H-file BTNFYEXT exist in the USER.SAMPLIB PDS, then the following JCL can be used to build the sample Notify load module USER.LOADM(BTNFYEXT) using SAS/C compiler:
//************************************************************ //* ACTN: COMPNFY - JCL for compiling. //************************************************************ //COMPNFY EXEC PGM=LC370B //STEPLIB DD DSN=SYS2.SASLIB.LOAD,DISP=SHR // DD DSN=SYS2.SASLIB.LINKLIB,DISP=SHR //SYSTERM DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10)) //SYSLIB DD DSN=SYS2.SASLIB.MACLIBC,DISP=SHR //H DD DSN=USER.SAMPLIB,DISP=SHR //SYSLIN DD DSN=USER.TEXTM(BTNFYEXT),DISP=SHR //SYSIN DD DSN=USER.SAMP(BTNFYXTC),DISP=SHR //* //************************************************************ //* ACTN: COOLNFY - JCL for pre-linking object file. //************************************************************ //COOLNFY EXEC CMCOOL#,SREL=700C //SYSLIN DD DISP=OLD,DSN=USER.OBJM(BTNFYEXT) //SYSIN DD DISP=SHR,DSN=USER.TEXTM(BTNFYEXT) //* //************************************************************ //* ACTN: LINKNFY - JCL for linking object file. //************************************************************ //LINKNFY EXEC PGM=IEWL,PARM='LIST,MAP,XREF,LET,RMODE=24,AMODE=31' //SYSPRINT DD SYSOUT=* //SYSUT1 DD UNIT=SCR,SPACE=(CYL,(2,2)) //SYSUT2 DD UNIT=SCR,SPACE=(CYL,(2,2)) //SYSLIN DD DSN=USER.OBJM(BTNFYEXT),DISP=SHR // DD DDNAME=SYSIN //SYSLIB DD DISP=SHR,DSN=SYS2.SASC700C.STDLIB // DD DISP=SHR,DSN=SYS2.SASC700C.BASELIB //SYSLMOD DD DSN=USER.LOADM(BTNFYEXT),DISP=SHR //SYSIN DD DATA,DLM='##' NAME BTNFYEXT(R) ##
Example 4 – z/OS
This example shows how to build a IBM/C Notify Exit load module using JCL.
Assuming the sample Notify C-file BTNFYXTC and H-file BTNFYEXT exist in the USER.SAMPLIB PDS, following JCL can be used to build the sample Notify Exit load module USER.LOAD(BTNFYEXT) using IBM/C compiler:
//BNFYIBMC EXEC EDCCL, //* THE SAMPLE NOTIFY EXIT C-PROGRAM BTNFYXTC.C // INFILE='USER.SAMPLIB(BTNFYXTC)', //* THE OUTPUT NOTIFY EXIT LOAD MODULE // OUTFILE='USER.LOAD(BTNFYEXT),DISP=SHR', // CPARM='DLL,RENT,LONGNAME,SOURCE,EXPO', // LPARM='DYNAM=DLL' //* THE LOCATION OF REQUIRED HEADER FILE BTNFYEXT.H //SYSLIB DD DSN=USER.SAMPLIB,DISP=SHR //*