Wednesday, 28 August 2013

How to get symbols using Keyboard

Alt + 0153..... ™... trademark symbol
Alt + 0169.... ©.... copyright symbol
Alt + 0174..... ®....registered ­ trademark symbol
Alt + 0176 ...°......degre ­e symbol
Alt + 0177 ...±....plus-or ­-minus sign
Alt + 0182 ...¶.....paragr ­aph mark
Alt + 0190 ...¾....fractio ­n, three-fourths
Alt + 0215 ....×.....multi ­plication sign
Alt + 0162...¢....the ­ cent sign
Alt + 0161.....¡..... ­.upside down exclamation point
Alt + 0191.....¿..... ­upside down question mark
Alt + 1...........sm ­iley face
Alt + 2 ......?.....bla ­ck smiley face
Alt + 15.....¤.....su ­n
Alt + 12......?.....f ­emale sign
Alt + 11.....?......m ­ale sign
Alt + 6.......?.....s ­pade
Alt + 5.......?...... ­Club
Alt + 3............. ­Heart
Alt + 4.......?...... ­Diamond
Alt + 13......?.....e ­ighth note
Alt + 14......?...... ­beamed eighth note
Alt + 8721.... ?.... N-ary summation (auto sum)
Alt + 251.....v.....s ­quare root check mark
Alt + 8236.....8..... ­infinity
Alt + 24.......?..... ­up arrow
Alt + 25......?...... ­down arrow
Alt + 26.....?.....ri ­ght arrow
Alt + 27......?.....l ­eft arrow
Alt + 18.....?......u ­p/down arrow
Alt + 29......?...lef ­t right arrow

Tuesday, 6 August 2013

Migrating User Profiles, Permission Lists and Roles

Want to migrate User Profiles, Permission Lists and Roles, here are the tables you would need.

Below are the tables related to User Profiles:

PSOPRDEFN
PSOPRALIAS
PSROLEUSER
PSUSERATTR
PSUSEREMAIL
PSUSERPRSNLOPTN
PS_ROLEXLATOPR
PS_RTE_CNTL_RUSER

Below are the tables related to Roles:

PSPRSMPERM
PS_BCHCLASSDEFN
PS_IB_CHNL_SEC_AET
PSAUTHBUSCOMP
PSAUTHCHNLMON
PSAUTHCUBE
PSAUTHITEM
PSAUTHMP
PSAUTHOPTN
PSAUTHPRCS
PSAUTHQUEUEMON
PSAUTHSIGNON
PSAUTHWS
PSCLASSDEFN
PSOPROBJ
PSPRCSPRFL
PSPURGEPERMLIST
PSROLECLASS
PS_RUN_CNTL_SCRTY2
PS_RUN_CNTL_SCRTY6
PS_SCRTY_ACC_GRP
PS_SCRTY_QUERY
PS_SJT_CLASS
PS_SJT_CLASS_ALL
PS_SJT_CLS_TMP
PS_SJT_OPR_CLS
PS_SJT_OPR_CLS_TMP
PS_MC_OPRID
PS_MC_OPR_SECURITY

Below are the tables related to Permission Lists:

PS_APPR_RULE_ROLE
PS_CREATEUSER_AET
PS_DYNROLE_TMP
PS_EOEC_MP_ROLE
PS_EOEC_MP_ROLE_CI
PS_EOEC_MP_ROLRULE
PS_EO_DSROLERULE
PS_FPMSCTYACTN_TBL
PS_GP_RSLT_ADM_ROL
PS_HCR_SM_PSEC_TBL
PS_HCR_SM_RSEC_TBL
PS_HRS_JO_RCTR_RL
PS_OPER_ROLE_DEFN
PS_OPER_ROLE_DFLTS
PSCDBACTSEC
PSCDBROLEUSER
PSROLECANGRANT
PSROLECLASS
PSROLEDEFN
PSROLEDEFNLANG
PSROLEDEFNL_RMT
PSROLEDEFN_RMT
PSROLEGROUP
PSROLEPERM_RMT
PSROLEUSER
PSROLEUSER_RMT
PS_PTAFAW_AUTH_DTL
PS_PURGE_ROLEDEFN
PS_ROLEUSER_ARCH
PS_ROLE_LDAPRULE
PS_ROLE_PPCRULE
PS_RTE_CNTL_RUSER
PS_RTE_CNTL_RU_ARC
PS_SCCPS_CNTXT_TLS
PS_SCC_SI_ROLE

Monday, 5 August 2013

FileLayout Code for Loading and Writing data

Write the Data to a CSV file

Local File &X_PAY;
Local Record &Rec3;
Local SQL &SQL3;

&Rec3 = CreateRecord(Record.Record Name);
&SQL3 = CreateSQL("%SelectAll (:1)", &Rec3);
&FileName2 = "C:\Output_File_Name.csv";
&X_PAY = GetFile(&FileName2, "W", "A", %FilePath_Absolute);

If &X_PAY.IsOpen Then;
   If &X_PAY.SetFileLayout(FileLayout.FielLayout Name) Then;
      While &SQL3.Fetch(&Rec3)
         &X_PAY.WriteRecord(&Rec3);
      End-While;
   End-If;
End-If;



Load the Data from a CSV file

Local File &FILE1;
Local Rowset &RS1;
Local Record &Rec1;
Local SQL &SQL1;


&Rec1 = CreateRecord(Record.Record Name);
&SQL1 = CreateSQL("%Insert(:1)");
&Filename = "C:\Load_Data_File.csv";

If FileExists(&Filename, %FilePath_Absolute) Then
   &FILE1 = GetFile(&Filename, "R", "A", %FilePath_Absolute);
End-If;

&FILE1.SetFileLayout(FileLayout.FielLayout Name);
&RS1 = CreateRowset(Record.X_PAY);
&RS1 = &FILE1.ReadRowset();

While &RS1 <> Null
   &RS1.GetRow(1).X_PAY.CopyFieldsTo(&Rec1);
   &SQL1.Execute(&Rec1);
   &RS1 = &FILE1.ReadRowset();
End-While;

&FILE1.Close();

Sunday, 4 August 2013

Error Position: 12 Return: 8103 - ORA-08103: object no longer exists

If a process fails with the below error.
 

Error Position: 12 Return: 8103 - ORA-08103: object no longer exists   

Reason: The object has been deleted by another user since the operation began, or a prior incomplete recovery restored the database to a point in time during the deletion of the object.
 

Solution: We can RESTART the process and it would run to Success.

SQR error - (SQR 9004) TrueType font file albw.ttf cannot be opened.

Issue: SQR fails with the following error.

(SQR 9004) TrueType font file albw.ttf cannot be opened.

Solution: Implemented the following steps for rectifying the issue.

There are 2 things to check; either the font file does not exist in the location specified in sqr.ini file, or the path specified in sqr.ini file is not correct. Correct the error and try again.

01 = Font type.
Verify if the setup is correctly into the pssqr.ini to the  [TrueType Fonts] section
The Font Path=directory where fonts resides and the TrueType collection file (.ttf).

For example:
 [TrueType Fonts]

; This section specifies the mapping from TrueType font names used in
; above configuration section and physical file path of the font on
; operating system. For TrueType collection file (.ttc), font directory
; number should also be specified.
; (ex. font name=file path, directory number)

; Font Path=directory where fonts resides.  Default is SQRDIR.  On
; Windows, Windows font directory will be looked up too.  Fonts not
; residing on other directories must be specified full physical path.

Font Path= <PSHOME>\fonts\truetype\
Albany=albw.ttf
Albany-Bold=albwb.ttf
Cumberland=cumbwr__.ttf
Cumberland-Bold=cumbwb__.ttf
Thorndale=thowr___.ttf
Thorndale-Bold=thowb___.ttf
Angsana=angsa.ttf

02 = Font file path.
Verify if the thowr___.ttf collection is located to the correct destination  <PSHOME>\fonts\truetype.

1). Case example:
In one case the following entry in the PSSQR.UNX file caused this error...

(Entry in PSSQR.UNX)
; Font Path=directory where fonts resides. Default is SQRDIR.
Font Path=%PS_HOME%/fonts/truetype/

Note the "%PS_HOME%" included in the path. The PS_HOME value is supposed to be replaced during the installation using the installer. However, in this case, since the installer was not used the appropriate PS_HOME value was not substituted therefore causing the issue. Manually filling in the value of PS_HOME correctly for the problem environment resolved the issue.
(end Case example)


2). Case example:
Another solution scenario that works for this error is to fully qualify the path to the font itself, for example

Replace this line:
Cumberland=cumbwr__.ttf

with:
Cumberland=/directory/cumbwr__.ttf
(end Case example)

Wednesday, 31 July 2013

How to find the SQLs in a COBOL?

PS_SQLSTMT_TBL is the record to find the SQL's being used in a COBOL
There are 4 fields in this record where PGM_NAME is the field that gives the COBOL name and STMT_TEXT is the field that stores the SQLs used in the COBOL.

 Name                                      Null?          Type                       
 ----------------------------------------- -------- ----------------------------
 PGM_NAME                               NOT NULL VARCHAR2(8)                
 STMT_TYPE                              NOT NULL VARCHAR2(1)                
 STMT_NAME                             NOT NULL  VARCHAR2(7)                
 STMT_TEXT                             NOT NULL  LONG


SQR issue

Issue: On some occasions when a value of a numeric variable in an SQR is masked to few digits and if the number of digits is more than the Masked format then the value that gets printed would be JUNK data and usually is printed as *****.
Below is a sample code snippet and output log for example.




Solution: The root cause is the Process Instance value is of 7 digits whereas the masking was being done for 6 digits resulting in resulting in moving a JUNK value to the String variable (i.e. $PrcsInstance as seen in the screenshot). As a solution we can either comment out the masking part from the code or else add few more digits to the masking value as shown in the below screenshot.