Thursday, May 23, 2019

Debugging REXX - Trace Instruction

The TRACE instruction has several options for tracing, two of them are "commands" or "c" and "error" or "e".

TRACE C

When "trace c"  is specified in an exec, any command that follows is traced before it is executed, then it is executed, and the return code from the command is displayed.

For example, 

/*REXX*/                     
trace c                      
"listds 'dummy.ser.ds'"      
exit                         

This example results in the following error message.

     3 *-* "listds 'dummy.ser.ds'"         
       >>>   "listds 'dummy.ser.ds'"       
DUMMY.SER.DS                               
DATA SET 'DUMMY.SER.DS' NOT IN CATALOG     
       +++ RC(8) +++                       

TRACE E

When "trace e" is specified in an exec, any host command that results in a nonzero return code is traced after it executes and the return code from the command is displayed.

If an exec includes "trace e", the exec displays error messages, the line number and the command, and the return code from the command, as follows:

DUMMY.SER.DS                             
DATA SET 'DUMMY.SER.DS' NOT IN CATALOG   
     3 *-* "listds 'dummy.ser.ds'"       
       +++ RC(8) +++                     
***                                      

Saturday, May 18, 2019

Abend 878000 hex occurred processing command 'EXEC '.

"Abend 878000 hex occurred processing command 'EXEC '." This error message occurs while executing REXX when there is insufficient virtual storage.

Possible solutions:

  • Check if you are using EXECIO * DISKR. In this case, the input data might be too large which may cause allocation error. 

          To avoid this error, execute the same REXX in background mode using JCL with maxium                    REGION parameter value. 

  • Try logging out of the session, login again and execute the REXX again.

Friday, May 17, 2019

REXX: External Functions

In addition to in built functions, REXX provides external functions to do specific tasks

SYSDSN:

This function returns OK if the specified data set exists; otherwise, it returns an appropriate error message.

The input for this function is a dataset name.

Example:

if SYSDSN(" ' Your Dataset ' ") /= 'OK' then do       
    say "Dataset doesn't exist. ' 
end

SYSVAR:

This function uses specific argument values to return information about the user, terminal, language, exec, system, and console session.

Example:

userid = SYSVAR(SYSUID)
say userid

This would return the userid who is logged in.

SETLANG:

This function is used to determine the currently language being used and also it allows us to change the language.

Example:

 curlang=SETLANG()
 say curlang 

OUTTRAP:

This function puts lines of command output into a series of numbered variables, each with the same prefix. These variables save the command output and allow an exec to process the output. Specify the variable name in parentheses following the function call.

Example:
x = OUTTRAP('att')
"LISTC"

att0 - will contain the no. of lines stored.
att1 - will contain the first line
att2 - will contain the second line and so on

you can also use STEM variables as parameter.

Example:

x = OUTTRAP('out.')
"LISTC"

out.0 - will contain the no. of lines stored.
out.1 - will contain the first line
out.2 - will contain the second line and so on

LISTDSI:

This function lists the dataset information.

Example:

x = LISTDSI(" ' Your Dataset ' ")

This statement will populate many system variables.

for ex:
SYSDSNAME
SYSRECFM 
SYSLRECL 
SYSBLKSIZE
SYSKEYLEN
SYSALLOC
SYSUSED
SYSUSEDPAGES
SYSPRIMARY
SYSSECONDS
SYSUNITS
SYSEXTENTS
SYSCREATE

Thursday, May 16, 2019

How to get the ZOS DB2 Version in mainframe?

Go to QMF or Spufi.

Execute the below query.

SELECT GETVARIABLE('SYSIBM.VERSION') FROM SYSIBM.SYSDUMMY1

The result would be of format pppvvrrm.

ppp - product string
vv  - Version
rr - Release number
m - Modification level

Example: DSN11015 means DB2 Version 11 in new-function mode.

DSN - DB2 for z/OS
11 - DB2 Verison 11
5 - modification level 5 means New-function mode.

How to get the ZOS Version in mainframes?

Enter the command TSO ISPVCALL STATUS from the console.

Output should be written to userid.ISPVCALL.TRACE.

Result would be:


The marked text is the ZOS version.

Tuesday, May 14, 2019

Integrating SceneBuilder with Eclipse

Pre-requisites:

You must download:

  • Scene Builder from gluonhq
  • Eclipse IDE must be already installed

Install SceneBuilder.exe from Gluon website


In Eclipse IDE, goto Windows à Preference à JavaFX.

Then provide the SceneBuilder.exe’s absolute path in the JavaFx preference.


Click Apply and Close.

Installing JavaFX in Eclipse

Pre-requisites:

You must download

  • JDK from Oracle
  • Java Eclipse IDE from Eclipse


In the Eclipse IDE, goto Help-> Install New Software

Use this site address : http://download.eclipse.org/efxclipse/updates-released/1.2.0/site/

Use this filter text: e(FX)clipse




Click à Next à Next à Accept license agreement à Finish

Friday, May 3, 2019

Setting last logged in User ID as default login id in windows

To set last logged in User ID as default login in windows, couple of windows registry key values must be updated.

Copy the below content and store it with extension .reg and double click it to execute it.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"dontdisplaylockeduserid"=dword:00000001
"DontDisplayLastUserName"=dword:00000000


Once this is set, when you lock the computer or reboot the computer, the logon id would be populated with the last logged in user id.


Featured Post

REXX Skeleton: Submitting jobs through Rexx

Submitting jobs through REXX and reading the spool through REXX gives us immense potential to automate many manual activities in mainframes....