Thursday, October 10, 2019

REXX: Delayed-Access Columns in SDSF


To create variables for the alternate field list including delayed access columns, the below ADDRESS SDSF command should be issued.

isfprefix = "your prefix *"
rc=isfcalls('on')
address sdsf "isfexec st (alternate delayed)"
do index=1 to jobid.ix
     say timer.index
     say dater.index
end

timer and dater are alternate field variables. They are introduced into your macro by the command (alternate delayed).

 Entire list of columns in ST panel is available at List of Columns in ST Panel.


Related topics: Accessing SDSF using REXX

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.


Tuesday, April 23, 2019

GIT Command fails in VPN - fatal: unable to access

Git users may face the below issue while connecting to git while they are in VPN


fatal: unable to access 'https://github.com/user/MyProject.git/'


In order to over come this issue, the git config must be updated with proxy which is used in your VPN.

Open command prompt and enter the following command

git config --global http.proxy #ProxyServer:8080

#ProxyServer must be replaced with the IP or the full name of the proxy server.

Do not enter proxy server with https:\\ or http:\\

To ensure that you have configured correctly.

git config -l

This would list down all your configuration. In that list, you would find the value for http.proxy

http.proxy=#ProxyServer:8080


Try using the git command after configuring the proxy settings. This time, it must work.

To unset the proxy setting, use the following command

git config --global --unset http.proxy

Happy Learning!

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....