Home The Company Publications Products Links Tips Jobs

Problem With Motorola Paging Under NAT413 And COM631

DEFINE PRINTER (1) OUTPUT '1164'
PRINT=((1),AM=COMP,OPEN=ACC,CLOSE=CMD)

Last update: 28 April 2005

During parallel tests against our production jobs to find differences between PRODUCTION (NAT232, COM513, ADA742) and DEVELOPMENT (NAT413, COM631, ADA742), the text of PRINTER OUTPUT '1164' didn't reach the target, in this case the Motorola pager, which is connected to the WirelessOffice Pager Gateway.

The Natural batch program is using Com-plete/Access functions to pass information to a special defined terminal, in this example TID1164, which is defined in Com-plete's TIBTAB (Terminal Information Block Table).

Analysis showed that NAT413/COM631/ACCESS adds a longer header in front of the text compared with NAT232/COM513/ACCESS. The ASCII code of the header in hex: 0C/0D/0C. WirelessOffice Pager Gateway, therefore, cannot detect the destination, which is part of the text. So the offset must be changed, the beginning of the text message. This would work for batch. Obviously, when the same program is executed online, the header changes again. SAG Support: "Please keep in mind that Com-plete is going to treat all "printout" requests the same whether they come from batch or online ..."

The following is what my tests show.
By the way, APPLYMOD=72 is set, that means to force a form feed
AT THE END of every printout printed.

COM631/NAT413 Spool Online:
A240F0F0 F0F140F1 F57AF1F3 40C48985 
A38599A2 409485A2 A2818785 40969593 89958561 

COM631/NAT413 Spool Batch:
A1F1F0F0 F0F140F1 F57AF3F5 40C48985 
A38599A2 409485A2 A2818785 408281A3 83886200
The following describes in general how paging did work
under NAT232 and COM513 (no TCP/IP under COM513). It's only modified to test under NAT413 and COM631:

Natural program MOTOROLA:

0010 DEFINE DATA                                                        
0020 LOCAL                                                              
0030 1 #TRANS-LINE (A130)                                               
0040 1 #TIMN       (N7) 1 REDEFINE #TIMN                                
0050   2 #HH       (A2)                                                 
0060   2 #MM       (A2)                                                 
0070 1 #TIME       (A5)                                                 
0080 END-DEFINE                                                         
0090 DEFINE PRINTER (1) OUTPUT '1164'                                   
0100 FORMAT (1) LS=131                                                  
0110 MOVE *TIMN TO #TIMN                                                
0120 COMPRESS #HH ':' #MM INTO #TIME LEAVING NO SPACE                   
0130 COMPRESS '0001' #TIME 
0140    'Dieters message' INTO #TRANS-LINE 
0150 WRITE (1) NOTITLE NOHDR #TRANS-LINE                                
0160 WRITE     NOTITLE NOHDR #TRANS-LINE                                
0170 CLOSE PRINTER (1)
0180 FETCH RETURN 'USR4004P'      /* dynamic parms                                                
0190 END                  
Part of Com-plete's TIBTAB
(Terminal Information Block Table)
(snip)
******************************************************
* TIDS FOR MOTOROLA PAGER SYSTEM                      
*                                                     
*                                                     
* 1164 IS A PRIMARY MOTOROLA TID                      
TID1164  TIB   1164,VTAM,3288L,NAME=PTW13F39,RMC=1,   
               OPT=(NOSHARE,ACQUIRE),GROUP=(ALL=NO)   
(snip)
Batch Job
000001 //ZINDWSMO JOB (IT,DBIDA),'MOTOROLA'..........
000002 //*USER=xxxxxxx                                                       
000003 /*ROUTE PRINT R912                                                    
000004 //* --------------------------------------------------------------    
000005 //* ---- WRITE TO MOTOROLA PAGER                                      
000006 //* --------------------------------------------------------------    
000007 //NAT413   EXEC PGM=NAT413BA,                                         
000008 //         TIME=1400,COND=(0,LT)                                      
000009 //STEPLIB   DD DISP=SHR,DSN=NATURAL.NAT413.USER.LOAD             
000010 //          DD DISP=SHR,DSN=ADABAS.ADA742.LOAD                   
000011 //          DD DISP=SHR,DSN=COM.V631.USER.LOAD                   
000012 //          DD DISP=SHR,DSN=COM.V631.LOA3                        
000013 //          DD DISP=SHR,DSN=COM.V631.L004                        
000014 //          DD DISP=SHR,DSN=COM.V631.LOAD                        
000015 //          DD DISP=SHR,DSN=COM.V631.APS272.LD06                 
000016 //          DD DISP=SHR,DSN=COM.V631.APS272.LD00                 
000017 //DDPRINT   DD SYSOUT=*                                               
000018 //DDDRUCK   DD SYSOUT=*                                  
000019 //MPMDUMP   DD DUMMY                                     
000020 //SYSUDUMP  DD DUMMY                                     
000021 //DDKARTE   DD DUMMY                                     
000022 //COMBTCH   DD DISP=SHR,DSN=COM.NODE0004.SVC254  <<== connection to Com-plete           
000023 //DDCARD    DD DISP=SHR,DSN=ADABAS.TEST.CNTLLIB(RUNDBID) 
000024 //CMPRINT   DD SYSOUT=*                                  
000025 //CMPRMIN   DD *                                         
000026 IM=D,ID=',',DC='.',INTENS=1                              
000027 NAFSIZE=0,DLISIZE=0,DB2SIZE=0,MADIO=0,MAXCL=0,MT=0       
000028 BPI=(TYPE=NAT,SEQ=0,SIZE=512,NAME=' ')                   
000029 BPI=(TYPE=EDIT,SEQ=0,SIZE=512,NAME=' ')                  
000030 AUTO=OFF,SYS=TEST
000031 PRINT=((1),AM=COMP,OPEN=ACC,CLOSE=CMD)                                         
000032 FNAT=(001,006)                                           
000033 FUSER=(001,008)                                          
000034 FSEC=(001,007)                                           
000035 FDIC=(001,109)                                           
000036 /*                                                       
000037 //CMSYNIN  DD DISP=SHR,DSN=DIETER.DBA.CNTL(NSC) 
000038 //         DD *                                 
000039 LOGON LIB1                                  
000040 SYSPROF                                         
000041 MOTOROLA
000042 SYSFILE                                        
000043 FIN                                             
000044 //                                                                               
Batch job execution
16.46.09 JOB04218 ---- TUESDAY,   12 APR 2005 ----                              
16.46.09 JOB04218  IRR010I  USERID DIETER   IS ASSIGNED TO THIS JOB.            
16.46.09 JOB04218  ICH70001I DIETER   LAST ACCESS AT 16:25:29 ON TUESDAY, APRIL 
16.46.09 JOB04218  $HASP373 DIETERMO STARTED - INIT 85   - CLASS 1 - SYS SYSP   
16.46.11 JOB04218  +LOGON OK, TIB00013 (COMTEST )                               
16.46.11 JOB04218  -                                              --TIMINGS (M
16.46.11 JOB04218  -JOBNAME  STEPNAME PROCSTEP    RC   EXCP   CONN    TCB   SRB
16.46.11 JOB04218  -DIETERMO NAT413               00    250    451    .00   .00
16.46.11 JOB04218  -DIETERMO ENDED.  NAME-MOTOROLA           TOTAL TCB CPU TIM
16.46.11 JOB04218  $HASP395 DIETERMO ENDED 
(snip)
NEXT MOTOROLA                                                            
0001 16:46 Dieters message                                               
Return Code of USR4004P           0                                      
IM=D,ID=',',DC='.',INTENS=1 NAFSIZE=0,DLISIZE=0,DB2SIZE=0,MADIO=0,MAXC   
L=0,MT=0 BPI=(TYPE=NAT,SEQ=0,SIZE=512,NAME=' ') BPI=(TYPE=EDIT,SEQ=0,S   
IZE=512,NAME=' ') AUTO=OFF,SYS=TEST PRINT=((1),AM=COMP,OPEN=ACC,CLOSE=   
CMD,ROUTE=ON) FNAT=(001,006) FUSER=(001,008) FSEC=(001,007) FDIC=(001,   
109)                                                                     
(snip)   
NEXT FIN                                   
Com-plete job log
16:46:11.04 COMSMF0001-4 LOGON: USER=DIETER LU=DIETERMO TID=13 ACCT=MODEL=SYSBAT
16:46:11.04 COMSMF0005-4 LOGON: AUTH=0 RMC= SMC=1234567                         
16:46:11.13 COMSMF0001-4 LOGOFF: USER=DIETER LU=DIETERMO TID=13 ACCT=MODEL=SYSBA
16:46:11.13 COMSMF0005-4 LOGOFF: AUTH=0 RMC= SMC=1234567                        

The problem is under investigation since 13 April 2005 at SAG (#574274).

A possible workaround in production (20 April 2005):
Dedicated two WirelessOffice PCs, one for pages coming from online and one for coming from batch.

Solution recommended by SAG and tested (28 April 2005):
In addition to statement 0100, a new define printer (2) statement 0110 with output CCONTROL must be inserted. CCONTROL is the name of a special printer control table associated to the printer "n-1"; it must not be modified. For further information, refer to "Printer-Advance Control Characters" (in the Natural Operations for Mainframes documentation). One blank (ASA character) must also be inserted in our message, see statement 0200. WRITE and CLOSE statements must also refer to printer (2). All changes are marked in red.

0010 	DEFINE DATA                                                    
0020 	LOCAL                                                          
0030 	1 #TRANS-LINE (A130)                                           
0040 	1 #TIMN       (N7) 1 REDEFINE #TIMN                            
0050 	  2 #HH       (A2)                                             
0060 	  2 #MM       (A2)                                             
0070 	1 #TIME       (A5)                                             
0080 	1 #ENV        (A25)                                            
0090 	END-DEFINE                                                     
0100  DEFINE PRINTER (1) OUTPUT '1164'       /* NAME=PTW13F39        
0110  DEFINE PRINTER (2) OUTPUT 'CCONTROL'                           
0120  FORMAT (2) LS=131                                              
0130 	MOVE *TIMN TO #TIMN                                            
0140 	IF *DEVICE = 'BATCH'                                           
0150 	  #ENV   := 'BATCH 1164 CCONTROL'                              
0160 	ELSE                                                           
0170 	  #ENV   := 'ONLINE 1164 CCONTROL'                             
0180 	END-IF                                                         
0190 	COMPRESS #HH ':' #MM INTO #TIME LEAVING NO SPACE               
0200 	COMPRESS ' 0001' #TIME 'DIETERS MESSAGE' #ENV INTO #TRANS-LINE 
0210 	WRITE (2) NOTITLE NOHDR #TRANS-LINE         
0220 	WRITE     NOTITLE NOHDR #TRANS-LINE (AL=60) 
0230 	CLOSE PRINTER (2)                           
0240 	FETCH RETURN 'USR4004P'                     
0250 	END                                         
Now, online and batch output has the same header again and can be handled by one WirelessOffice Pager Gateway. The program looks a little bit confusing with printer 1 and 2 but it works. It seems that we exchanged our workaround with SAG's workaround.

Top Page


Back to NATURAL Tips, Tricks, Techniques -- Overview