midrange.com code scratchpad
Name:
errNoTrap
Scriptlanguage:
Plain Text
Tabwidth:
4
Date:
10/13/2010 05:59:35 pm
IP:
Logged
Description:
The user was to lazy to give a description
Code:
  1.      /*=============================================================================================
  2.      /*   Notes                                                                                     
  3.      /*=============================================================================================
  4.                                                                                                     
  5.      /* Compile with ACTGRP(*CALLER)                                                                
  6.                                                                                                     
  7.      /*=============================================================================================
  8.      /*   Control Specifications                                                                    
  9.      /*=============================================================================================
  10.                                                                                                     
  11.      H NoMain                                                                                       
  12.      H BndDir('MCSERV')                                                                             
  13.      H Option(*NODEBUGIO : *NOUNREF)                                                                
  14.      H ExtBinInt                                                                                    
  15.                                                                                                     
  16.      /*=============================================================================================
  17.      /*   File Specifications                                                                       
  18.      /*=============================================================================================
  19.                                                                                                     
  20.                                                                                                     
  21.      /*=============================================================================================
  22.      /*   Prototype Specifications                                                                  
  23.      /*=============================================================================================
  24.                                                                                                     
  25.       /Define determineCallStackEntry                                                               
  26.       /Include QRpgCbSrc,SVRM999700                                                                 
  27.                                                                                                     
  28.       /Include QRpgCbSrc,SVS9998                                                                    
  29.       /Include QRpgCbSrc,SVS9997                                                                    
  30.                                                                                                     
  31.      /*=============================================================================================
  32.      /*   Data Specifications                                                                       
  33.      /*=============================================================================================
  34.                                                                                                     
  35.      /*---------------------------------------------------------------------------------------------
  36.      /*   Data Structure Specifications                                                             
  37.      /*---------------------------------------------------------------------------------------------
  38.                                                                                                     
  39.                                                                                                     
  40.      /*---------------------------------------------------------------------------------------------
  41.      /*   Array Specifications                                                                      
  42.      /*---------------------------------------------------------------------------------------------
  43.                                                                                                     
  44.      D errNoId         S             15A   Dim(156) CtData PerRcd(6)                                
  45.      D errNo#          S              4S 0 Dim(156) CtData PerRcd(24) Ascend                        
  46.      D errNoText       S            100A   Dim(156) CtData                                          
  47.                                                                                                     
  48.      /*---------------------------------------------------------------------------------------------
  49.      /*   Indicator Specifications                                                                  
  50.      /*---------------------------------------------------------------------------------------------
  51.                                                                                                     
  52.      D globalInit      S               N                                                            
  53.                                                                                                     
  54.      /*---------------------------------------------------------------------------------------------
  55.      /*   Standalone Data Specifications                                                            
  56.      /*---------------------------------------------------------------------------------------------
  57.                                                                                                     
  58.                                                                                                     
  59.      /*---------------------------------------------------------------------------------------------
  60.      /*   Constant Specifications                                                                   
  61.      /*---------------------------------------------------------------------------------------------
  62.                                                                                                     
  63.                                                                                                     
  64.      /*#############################################################################################
  65.      /*   errNoTrap - Trap errNo Conditions                                                         
  66.      /*#############################################################################################
  67.                                                                                                     
  68.      P errNoTrap...                                                                                 
  69.      P                 B                   Export                                                   
  70.                                                                                                     
  71.      /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  72.      /* Procedure Interface                                                                         
  73.      /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  74.                                                                                                     
  75.      D errNoTrap...                                                                                 
  76.      D                 PI            10I 0                                                          
  77.      D errorNumber                   10I 0 Const                                Error Number        
  78.      D functionName                 100A   Const Varying                        Function Name       
  79.      D messageType                   10A   Const Options(*NOPASS)               Message Type        
  80.      D callStackEntry...                                                        Call Stack Entry    
  81.      D                              256A   Const Varying Options(*NOPASS)                           
  82.                                                                                                     
  83.      /*=============================================================================================
  84.      /* Procedure Data Specifications                                                               
  85.      /*=============================================================================================
  86.                                                                                                     
  87.       /Include QRpgCbSrc,DQUsec                                                                     
  88.                                                                                                     
  89.       /Define QMHSNDPM_OPG1                                                                         
  90.       /Include QRpgCbSrc,DQMhSndPm                                                                  
  91.                                                                                                     
  92.      /*---------------------------------------------------------------------------------------------
  93.      /* Procedure Data Structure Specifications                                                     
  94.      /*---------------------------------------------------------------------------------------------
  95.                                                                                                     
  96.                                                                                                     
  97.      /*---------------------------------------------------------------------------------------------
  98.      /* Procedure Array Specifications                                                              
  99.      /*---------------------------------------------------------------------------------------------
  100.                                                                                                     
  101.                                                                                                     
  102.      /*---------------------------------------------------------------------------------------------
  103.      /* Procedure Indicator Specifications                                                          
  104.      /*---------------------------------------------------------------------------------------------
  105.                                                                                                     
  106.                                                                                                     
  107.      /*---------------------------------------------------------------------------------------------
  108.      /* Procedure Standalone Data Specifications                                                    
  109.      /*---------------------------------------------------------------------------------------------
  110.                                                                                                     
  111.      D x               S             10I 0                                                          
  112.      D entry           S             10A                                                            
  113.                                                                                                     
  114.      /*---------------------------------------------------------------------------------------------
  115.      /* Procedure Constant Specifications                                                           
  116.      /*---------------------------------------------------------------------------------------------
  117.                                                                                                     
  118.                                                                                                     
  119.      /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  120.      /* Procedure Code                                                                              
  121.      /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  122.                                                                                                     
  123.       /Free                                                                                         
  124.                                                                                                     
  125.        ExSr initialize;                                                                             
  126.                                                                                                     
  127.        x = %LookUp(errorNumber : errNo#);                                                           
  128.                                                                                                     
  129.        If x > 0;                                                                                    
  130.           setMessageData(sndPm_Msg_Id :                                                             
  131.                          sndPm_Dta_Base :                                                           
  132.                          sndPm_Data_Length :                                                        
  133.                          functionName :                                                             
  134.                          %Trim(errNoId(x)) :                                                        
  135.                          %Trim(%EditC(errNo#(x) : 'X')) :                                           
  136.                          errNoText(x));                                                             
  137.                                                                                                     
  138.        ElseIf errorNumber <> 0;                                                                     
  139.           setMessageData(sndPm_Msg_Id :                                                             
  140.                          sndPm_Dta_Base :                                                           
  141.                          sndPm_Data_Length :                                                        
  142.                          functionName :                                                             
  143.                          'UNKNOWN' :                                                                
  144.                          %Trim(%EditC(errorNumber : 'X')) :                                         
  145.                          'Unknown errNo Number.');                                                  
  146.        EndIf;                                                                                       
  147.                                                                                                     
  148.        If errorNumber <> 0;                                                                         
  149.           /Include QRpgCbSrc,CQMhSndPm                                                              
  150.        EndIf;                                                                                       
  151.                                                                                                     
  152.        /Include QRpgCbSrc,LQMhSndPm                                                                 
  153.        /Include QRpgCbSrc,LQUsec                                                                    
  154.                                                                                                     
  155.        Return errorNumber;                                                                          
  156.                                                                                                     
  157.        //==================================================================================         
  158.        // Initilizing Subroutine                                                                    
  159.        //==================================================================================         
  160.                                                                                                     
  161.        BegSr initialize;                                                                            
  162.                                                                                                     
  163.           usec_Data_Length = 250;                                                                   
  164.           sndPm_Data_Length = 250;                                                                  
  165.           /Include QRpgCbSrc,ZQUsec                                                                 
  166.           /Include QRpgCbSrc,ZQMhSndPm                                                              
  167.                                                                                                     
  168.           sndPm_Msg_Id = 'PVMEC04';                                                                 
  169.           sndPm_Msg_Type = '*ESCAPE';                                                               
  170.           sndPm_C_Stack_Counter = 1;                                                                
  171.           %SubSt(sndPm_C_Stack_Entry : 1 : 10) = '*';                                               
  172.           sndPm_Length_C_Stack_Entry = 10;                                                          
  173.           sndPm_C_Stack_Entry_Program = '*NONE';                                                    
  174.           sndPm_C_Stack_Entry_Module = '*NONE';                                                     
  175.                                                                                                     
  176.           If %Parms >= 3;                                                                           
  177.              If messageType = '*INFO' or                                                            
  178.                messageType = '*COMP' or                                                             
  179.                messageType = '*DIAG' or                                                             
  180.                messageType = '*ESCAPE' or                                                           
  181.                messageType = '*INQ' or                                                              
  182.                messageType = '*NOTIFY' or                                                           
  183.                messageType = '*RQS' or                                                              
  184.                messageType = '*STATUS';                                                             
  185.                 sndPm_Msg_Type = %Trim(messageType);                                                
  186.              EndIf;                                                                                 
  187.           EndIf;                                                                                    
  188.                                                                                                     
  189.           If %Parms >= 4;                                                                           
  190.              sndPm_C_Base =                                                                         
  191.                determineCallStackEntry(callStackEntry :                                             
  192.                                        sndPm_C_Base :                                               
  193.                                        sndPm_Length_C_Stack_Entry :                                 
  194.                                        sndPm_C_Stack_Counter :                                      
  195.                                        sndPm_C_Stack_Entry_Program :                                
  196.                                        sndPm_C_Stack_Entry_Module);                                 
  197.           EndIf;                                                                                    
  198.                                                                                                     
  199.        EndSr;                                                                                       
  200.                                                                                                     
  201.       /End-Free                                                                                     
  202.                                                                                                     
  203.      P errNoTrap...                                                                                 
  204.      P                 E                                                                            
  205.                                                                                                     
  206.        //===========================================================================================
  207.                                                                                                     
  208. **CTDATA errNoId                                                                                    
  209. EDOM           ERANGE         ETRUNC         ENOTOPEN       ENOTREAD       EIO                      
  210. ENODEV         ERECIO         ENOTWRITE      ESTDIN         ESTDOUT        ESTDERR                  
  211. EBADSEEK       EBADNAME       EBADMODE       EBADPOS        ENOPOS         ENUMMBRS                 
  212. ENUMRECS       EINVAL         EBADFUNC       ENOENT         ENOREC         EPERM                    
  213. EBADDATA       EBUSY          EBADOPT        ENOTUPD        ENOTDLT        EPAD                     
  214. EBADKEYLN      EPUTANDGET     EGETANDPUT     EIOERROR       EIORECERR      EACCES                   
  215. ENOTDIR        ENOSPC         EXDEV          EAGAIN         EWOULDBLOCK    EINTR                    
  216. EFAULT         ETIME          ENXIO          EAPAR          ERECURSE       EADDRINUSE               
  217. EADDRNOTAVAIL  EAFNOSUPPORT   EALREADY       ECONNABORTED   ECONNREFUSED   ECONNRESET               
  218. EDESTADDRREQ   EHOSTDOWN      EHOSTUNREACH   EINPROGRESS    EISCONN        EMSGSIZE                 
  219. ENETDOWN       ENETRESET      ENETUNREACH    ENOBUFS        ENOPROTOOPT    ENOTCONN                 
  220. ENOTSOCK       ENOTSUP        EOPNOTSUPP     EPFNOSUPPORT   EPROTONOSUPPORTEPROTOTYPE               
  221. ERCVDERR       ESHUTDOWN      ESOCKTNOSUPPORTETIMEDOUT      EUNATCH        EBADF                    
  222. EMFILE         ENFILE         EPIPE          ECANCEL        EEXIST         EDEADLK                  
  223. ENOMEM         EOWNERTERM     EDESTROYED     ETERM          ENOENT1        ENOEQFLOG                
  224. EEMPTYDIR      EMLINK         ESPIPE         ENOSYS         EISDIR         EROFS                    
  225. EUNKNOWN       EITERBAD       EITERSTE       EHRICLSBAD     EHRICLBAD      EHRITYPBAD               
  226. ENOTAPPL       EHRIREQTYP     EHRINAMEBAD    EDAMAGE        ELOOP          ENAMETOOLONG             
  227. ENOLCK         ENOTEMPTY      ENOSYSRSC      ECONVERT       E2BIG          EILSEQ                   
  228. ETYPE          EBADDIR        EBADOBJ        EIDXINVAL      ESOFTDAMAGE    ENOTENROLL               
  229. EOFFLINE       EROOBJ         EEAHDDSI       EEASDDSI       EEAHDDS        EEASDDS                  
  230. EEADUPRC       ELOCKED        EFBIG          EIDRM          ENOMSG         EFILECVT                 
  231. EBADFID        ESTALE         ESRCH          ENOTSIGINIT    ECHILD         EBADH                    
  232. ETOOMANYREFS   ENOTSAFE       EOVERFLOW      EJRNDAMAGE     EJRNINACTIVE   EJRNRCVSPC               
  233. EJRNRMT        ENEWJRNRCV     ENEWJRN        EJOURNALED     EJRNENTTOOLONG EDATALINK                
  234. ENOTAVAIL      ENOTTY         EFBIG2         ETXTBSY        EASPGRPNOTSET  ERESTART                 
  235. **CTDATA errNo#                                                                                     
  236. 300130023003300430053006300730083009301030113012301330143015301730183019302030213022302530263027    
  237. 302830293040304130423043304430803081310131023401340334043405340634063407340834093415341834193420    
  238. 342134223423342434253426342734283429343034313432343334343435343634373438343934403440344134423443    
  239. 344434453446344734483450345234533455345634573459346034623463346434653466346734683469347034713472    
  240. 347434753476347734783479348034813482348434853486348734883489349034913492349334943495349634973498    
  241. 349935003501350235033504350535063507350935103511351235133515351635173520352335243525352635273528    
  242. 352935303531353235333534353535363540354335443545                                                    
  243. **CTDATA errNoText                                                                                  
  244. A domain error occurred in a math function.                                                         
  245. A range error occurred.                                                                             
  246. Data was truncated on an input, output, or update operation.                                        
  247. File is not open.                                                                                   
  248. File is not opened for read operations.                                                             
  249. Input/output error.                                                                                 
  250. No such device.                                                                                     
  251. Cannot get single character for files opened for record I/O.                                        
  252. File is not opened for write operations.                                                            
  253. The stdin stream cannot be opened.                                                                  
  254. The stdout stream cannot be opened.                                                                 
  255. The stderr stream cannot be opened.                                                                 
  256. The positioning parameter in fseek is not correct.                                                  
  257. The object name specified is not correct.                                                           
  258. The type variable specified on the open function is not correct.                                    
  259. The position specifier is not correct.                                                              
  260. There is no record at the specified position.                                                       
  261. Attempted to use ftell on multiple members.                                                         
  262. The current record position is too long for ftell.                                                  
  263. The value specified for the argument is not correct.                                                
  264. Function parameter in the signal function is not set.                                               
  265. No such path or directory.                                                                          
  266. Record is not found.                                                                                
  267. The operation is not permitted.                                                                     
  268. Message data is not valid.                                                                          
  269. Resource busy.                                                                                      
  270. Option specified is not valid.                                                                      
  271. File is not opened for update operations.                                                           
  272. File is not opened for delete operations.                                                           
  273. The number of characters written is shorter than the expected record length.                        
  274. A length that was not valid was specified for the key.                                              
  275. A read operation should not immediately follow a write operation.                                   
  276. A write operation should not immediately follow a read operation.                                   
  277. A nonrecoverable I/O error occurred.                                                                
  278. A recoverable I/O error occurred.                                                                   
  279. Permission denied.                                                                                  
  280. Not a directory.                                                                                    
  281. No space is available.                                                                              
  282. Improper link.                                                                                      
  283. Operation would have caused the process to be suspended.                                            
  284. Operation would have caused the process to be suspended.                                            
  285. Interrupted function call.                                                                          
  286. The address used for an argument was not correct.                                                   
  287. Operation timed out.                                                                                
  288. No such device or address.                                                                          
  289. Possible APAR condition or hardware failure.                                                        
  290. Recursive attempt rejected.                                                                         
  291. Address already in use.                                                                             
  292. Address is not available.                                                                           
  293. The type of socket is not supported in this protocol family.                                        
  294. Operation is already in progress.                                                                   
  295. Connection ended abnormally.                                                                        
  296. A remote host refused an attempted connect operation.                                               
  297. A connection with a remote socket was reset by that socket.                                         
  298. Operation requires destination address.                                                             
  299. A remote host is not available.                                                                     
  300. A route to the remote host is not available.                                                        
  301. Operation in progress.                                                                              
  302. A connection has already been established.                                                          
  303. Message size is out of range.                                                                       
  304. The network currently is not available.                                                             
  305. A socket is connected to a host that is no longer available.                                        
  306. Cannot reach the destination network.                                                               
  307. There is not enough buffer space for the requested operation.                                       
  308. The protocol does not support the specified option.                                                 
  309. Requested operation requires a connection.                                                          
  310. The specified descriptor does not reference a socket.                                               
  311. Operation is not supported.                                                                         
  312. Operation is not supported.                                                                         
  313. The socket protocol family is not supported.                                                        
  314. No protocol of the specified type and domain exists.                                                
  315. The socket type or protocols are not compatible.                                                    
  316. An error indication was sent by the peer program.                                                   
  317. Cannot send data after a shutdown.                                                                  
  318. The specified socket type is not supported.                                                         
  319. A remote host did not respond within the timeout period.                                            
  320. The protocol required to support the specified address family is not available at this time.        
  321. Descriptor is not valid.                                                                            
  322. Too many open files for this process.                                                               
  323. Too many open files in the system.                                                                  
  324. Broken pipe.                                                                                        
  325. Operation cancelled.                                                                                
  326. File exists.                                                                                        
  327. Resource deadlock avoided.                                                                          
  328. Storage allocation request failed.                                                                  
  329. The synchronization object no longer exists because the owner is no longer running.                 
  330. The synchronization object was destroyed, or the object no longer exists.                           
  331. Operation was terminated.                                                                           
  332. No such file or directory.                                                                          
  333. Object is already linked to a dead directory.                                                       
  334. Directory is empty.                                                                                 
  335. Maximum link count for a file was exceeded.                                                         
  336. Seek request is not supported for object.                                                           
  337. Function not implemented.                                                                           
  338. Specified target is a directory.                                                                    
  339. Read-only file system.                                                                              
  340. Unknown system state.                                                                               
  341. Iterator is not valid.                                                                              
  342. Iterator is in wrong state for operation.                                                           
  343. HRI class is not valid.                                                                             
  344. HRI subclass is not valid.                                                                          
  345. HRI type is not valid.                                                                              
  346. Data requested is not applicable.                                                                   
  347. HRI request type is not valid.                                                                      
  348. HRI resource name is not valid.                                                                     
  349. A damaged object was encountered.                                                                   
  350. A loop exists in the symbolic links.                                                                
  351. A path name is too long.                                                                            
  352. No locks are available.                                                                             
  353. Directory is not empty.                                                                             
  354. System resources are not available.                                                                 
  355. Conversion error.                                                                                   
  356. Argument list is too long.                                                                          
  357. Conversion stopped due to input character that does not belong to the input codeset.                
  358. Object type mismatch.                                                                               
  359. Attempted to reference a directory that was not found or was destroyed.                             
  360. Attempted to reference an object that was not found, was destroyed, or was damaged.                 
  361. Data space index used as a directory is not valid.                                                  
  362. Object has soft damage.                                                                             
  363. User is not enrolled in system distribution directory.                                              
  364. Object is suspended.                                                                                
  365. Object is a read-only object.                                                                       
  366. Hard damage on extended attribute data space index.                                                 
  367. Soft damage on extended attribute data space index.                                                 
  368. Hard damage on extended attribute data space.                                                       
  369. Soft damage on extended attribute data space.                                                       
  370. Duplicate extended attribute record.                                                                
  371. Area being read from or written to is locked.                                                       
  372. Object too large.                                                                                   
  373. The semaphore, shared memory, or message queue identifier is removed from the system.               
  374. The queue does not contain a message of the desired type and (msgflg logically ANDed with IPC_NOWAIT
  375. File ID conversion of a directory failed.                                                           
  376. A file ID could not be assigned when linking an object to a directory.                              
  377. File handle was rejected by server.                                                                 
  378. No such process.                                                                                    
  379. Process is not enabled for signals.                                                                 
  380. No child process.                                                                                   
  381. Handle is not valid.                                                                                
  382. The operation would have exceeded the maximum number of references allowed for a descriptor.        
  383. Function is not allowed.                                                                            
  384. Object is too large to process.                                                                     
  385. Journal is damaged.                                                                                 
  386. Journal is inactive.                                                                                
  387. Journal space or system storage error.                                                              
  388. Journal is remote.                                                                                  
  389. New journal receiver is needed.                                                                     
  390. New journal is needed.                                                                              
  391. Object already journaled.                                                                           
  392. Entry is too large to send.                                                                         
  393. Object is a datalink object.                                                                        
  394. IASP is not available.                                                                              
  395. I/O control operation is not appropriate.                                                           
  396. Attempt to write or truncate file past its sort file size limit.                                    
  397. Text file busy.                                                                                     
  398. ASP group not set for thread.                                                                       
  399. A system call was interrupted and may be restarted.                                                 
© 2004-2019 by midrange.com generated in 0.012s valid xhtml & css