Exspans Systems Inc Logo home
 
Forum
Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 5 of 6     «   Prev   2   3   4   5   6   Next
rakesh

Member
Registered:
Posts: 52
Reply with quote  #61 
The logic which you mentioned with FOR loop can cause output dataset allocation failures if there will be multiple security errors happens at the same time because the dataset is already allocated and next alloc will fail.
This is because we are not using serialization techniques here with in GAL. This might be a point we need to think if we designing file output stuff with in GAL.

And, when i use VAR XT len 100 and print the first line of the error, i am getting some junk values at the end of first line(only first line)

ARG LTXT1
"ICH408I USER(SHRDV10 ) GROUP(USERGRP ) NAME(TRAINING USERID )???????4?U

and here is what is written to output dataset.
BROWSE DUMP.USERS.SECFAILS.INFO Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
********************************* Top of Data **********************************
ICH408I USER(SHRDV10 ) GROUP(USERGRP ) NAME(TRAINING USERID ).......4.U

0
automan

Avatar / Picture

Moderator
Registered:
Posts: 136
Reply with quote  #62 
Serialization is a user programmer responsibility. AutoMan has ENQUEUE and EVENT available. Take a look at the Tips and Techniques manual. For efficiency you might want to consider using an Assembler program instead of REXX and use the EXEC command to invoke it.

What did you initialize the line to when you got junk at the end of the record?

0
rakesh

Member
Registered:
Posts: 52
Reply with quote  #63 
I will look at Enqueue and Event logic today. Thank you for pointing it..

Here is my code

MSG=ICH408I
VAR XT LEN 100
VAR X LEN 8
LET X = $$MSGNOL
REXX SECOPEN()
FOR I = 1 TO X
LET XT = $$MSGTXT(I)
REXX SECFAILS(XT)
END
REXX SECCLOSE()


Another problem here is, if i initialize XT with len 80, only half of the record is being saved to XT.

like below.

ARG LTXT1
"ICH408I USER(SHRDV10 ) GROUP(USE"
ARG LTXT1
" ADCD.Z110.PARMLIB CL(DATASET )"
ARG LTXT1
" INSUFFICIENT ACCESS AUTHORITY"
ARG LTXT1
" FROM ADCD.* (G)"
0
automan

Avatar / Picture

Moderator
Registered:
Posts: 136
Reply with quote  #64 
I cannot see anything in there that would truncate your records. I will have to ask someone to experiment with an exact copy of your code later. In your coded example here, you have XT defined as 100 chars long, and in your comment you say 80. Are you saying that when it is defined as 100 you get the whole record, but when it is 80 you only get half of it?


BTW

X is used as a counter so it would be best to define it as

VAR X NUM

This forces it to be a fullword numeric value.
0
rakesh

Member
Registered:
Posts: 52
Reply with quote  #65 
this time i feel frustrated. I am unable to recreate the scenario of getting half of the record when i mentioned Len as 80.

But, i am still getting the junk chars at the end of first line of the message even with X is defined as NUM or not. below are two examples.

ICH408I USER(IBMUSER ) GROUP(SYS1 ) NAME( ) é 4 U
LOGON/JOB INITIATION - INVALID PASSWORD ENTERED AT TERMINAL TCPA0239

ICH408I USER(SHRDV10 ) GROUP(USERGRP ) NAME(TRAINING USERID ) 4 U
ADCD.Z110.PARMLIB CL(DATASET ) VOL(ZARES1)
INSUFFICIENT ACCESS AUTHORITY
FROM ADCD.* (G)
ACCESS INTENT(UPDATE ) ACCESS ALLOWED(READ )

I am suspecting it might be because of the line number continuation that zos uses for multi line messages. i Mean "505" in below example. But just a guess.

TSU00784 00000281 ICH408I USER(SHRDV10 ) GROUP(USERGRP ) NAME(TRAINING USERID ) 505
505 00000281 ADCD.Z110.PARMLIB CL(DATASET ) VOL(ZARES1)
505 00000281 INSUFFICIENT ACCESS AUTHORITY
505 00000281 FROM ADCD.* (G)
505 00000281 ACCESS INTENT(UPDATE ) ACCESS ALLOWED(READ )
0
automan

Avatar / Picture

Moderator
Registered:
Posts: 136
Reply with quote  #66 
I know the frustration of not being able to repeat problems. I will look into those padding characters later, because the native ALLOC/WRITE/DEALLOC statements I have just written are working and need thorough testing and cleaning up. I doubt whether it is those line continuation characters.
0
automan

Avatar / Picture

Moderator
Registered:
Posts: 136
Reply with quote  #67 
I have solved the problem of those padding characters.
0
automan

Avatar / Picture

Moderator
Registered:
Posts: 136
Reply with quote  #68 
This works now and the problem of those trailing characters is fixed. This only works at STAGE=2 at the moment, but that is what you are using, so you can have a code update to use it if you like, while we proceed to add it to all the other executable segments.

MSG=XXX403I
VAR &LIST LEN 80
VAR &BEEP LEN 80
VAR &CTR NUM
VAR &I NUM
LET &CTR = $$MSGNOL
*
ENQUEUE EXCL 'NEWDDN'
ALLOC DDNAME(NEWDDN) DSN(TEST.V33.DATA) MOD
FOR &I = 1 TO &CTR
LET &LIST=$$MSGTXT(&I)
LET &BEEP=&LIST
WRITE DDNAME(NEWDDN) 'TEXT TO &BEEP1WRITE'
WRITE DDNAME(NEWDDN) &LIST
END
DEALLOC DDNAME(NEWDDN)
DEQUEUE 'NEWDDN'
*

I have put two different kinds of WRITE in here to show you how it can be used. The first in quotes will replace the variable &BEEP with the text in the message. The second one writes out the contents of the variable &LIST only. It detects file full and displays error messages. No proper identifiers have been assigned to the messages yet, but the text is meaningful.

It uses an ENQUEUE to prevent multiple simultaneous writing to the file. When the other processor segments have been updated you will be able to put the ALLOC/DEALLOC in other logical positions, say to ALLOC the file at start up, as Zamin suggested, if you want.
0
rakesh

Member
Registered:
Posts: 52
Reply with quote  #69 
Thank for fixing the issues. Might be i am making so much noise here these days :-)

But all good discussions.

Do i need to download any module to fix the padding char issues?
Is the new update for Automan ready with Alloc/Dealloc feature?

Thank you
0
automan

Avatar / Picture

Moderator
Registered:
Posts: 136
Reply with quote  #70 
Having issues is the way to get things done. I will arrange for the updated modules to be sent to you. It will take a day or two because it is the weekend here now.
0
rakesh

Member
Registered:
Posts: 52
Reply with quote  #71 
I received the new code. I am still getting one extra padding char.

ICH408I USER(SHRDV10 ) GROUP(USERGRP ) NAME(TRAINING USERID ).
ADCD.Z110.PARMLIB CL(DATASET ) VOL(ZARES1)
INSUFFICIENT ACCESS AUTHORITY
FROM ADCD.* (G)
ACCESS INTENT(UPDATE ) ACCESS ALLOWED(READ )

That one extra "dot" at the end of first line. Not a big deal but something is still not correct.

Will try to write some code using alloc/dealloc today and let you know how it goes.

And V32 has 51 modules in load lib but V33 has only 46. So, you are combining stuff. Just an observation.
0
rakesh

Member
Registered:
Posts: 52
Reply with quote  #72 
One more doubt:

OLD code:
MSG=IEF403I
VAR &JOBN LEN 8
VAR &JOBID LEN 8
VAR &JOBTIM LEN 8
VAR &JOBDAT LEN 8
VAR &STRNG LEN 8
VAR &STRING LEN 80
LET &JOBN=$$MSGJNM
LET &JOBID=$$MSGJID
LET &JOBTIM=$$MSGTIM
LET &JOBDAT=$$MSGDAT
LET &STRNG = SUBSTR(&JOBN,0,5)
LET &STRING = '&JOBTIM &JOBDAT &JOBN &JOBID'
IF &STRNG NE 'BPXAS' DO
ALLOC DDNAME(OUTDD1) DSN(DUMP.USERS.JOBS.INFO) MOD
WRITE DDNAME(OUTDD1) &STRING
DEALLOC DDNAME(OUTDD1)
WTO '&STRING'
END


I tried changing that to a shorter version to reduce the number of line just for initializing the variables:

MSG=IEF403I
VAR &STRNG LEN 8
VAR &STRING LEN 80
LET &STRNG = SUBSTR($$MSGJNM,0,5)
LET &STRING = '$$MSGTIM $$MSGDAT $$MSGJNM $$MSGJID'
IF &STRNG NE 'BPXAS' DO
ALLOC DDNAME(OUTDD1) DSN(DUMP.USERS.JOBS.INFO) MOD
WRITE DDNAME(OUTDD1) &STRING
DEALLOC DDNAME(OUTDD1)
WTO '&STRING'
END

All the $$MSG variables were being treated as just strings and printing as below in output.

$$MSGTIM $$MSGDAT $$MSGJNM $$MSGJID

Why those variables got destroyed?

I can further shorten the code by revoking &STRNG variable if the IF statement allows substr variable directly.

That will cut my initial code to 1/3rd of the length.

Any thoughts?
0
automan

Avatar / Picture

Moderator
Registered:
Posts: 136
Reply with quote  #73 
We know about the one extra char on the first line of an MLWTO, and I will set an apprentice on it later.

You are only using a tiny fraction of the capabilities of AutoMan so when we generated the Alpha version you are using to get the file handling capability, we did not generate all the modules. The Stage 1 and 0 message handlers, the SYSOUT handler and the Stage 0 command handler have not yet been updated to perform the file handling. However the Command List handler has, so you can use Command Lists if you want to Allocate and Deallocate out of line with the message handler. The complete package actually has two libraries and you have only received one of them.

The first example of code you have written is correct. The pseudo variables you have referenced are only in the message handler (all 3 stages). They have no meaning in any other part, so are not generalized to string together in complex statements. That is true for all items that are specific to one processor.
0
automan

Avatar / Picture

Moderator
Registered:
Posts: 136
Reply with quote  #74 
rakesh, a new load module has been sent to you with the fix for the line length issue.
0
Grazillda

Avatar / Picture

Member
Registered:
Posts: 48
Reply with quote  #75 
Is this going to become a part of a future release? Is it possible for me to get a copy of this new code to try? I was talking to our management committee about it and thought it would be good to be able to make a special log of invalid access attempts, similar to that what rakesh seems to need.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!