Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all 8500 articles
Browse latest View live

COBOL Programming :: RE: Random Password (in string format) generation.

$
0
0
Author: RahulG31
Subject: Reply to: Random Password (in string format) generation.
Posted: Fri Sep 02, 2016 9:47 pm (GMT 5.5)

I don't want to disturb the high level talks but I like Mr. Woodger's idea.

I am also interested in knowing from TS that why the password is not allowed to be repeatable even after 1 million or billion values.

In general, if I can relate it to current web world, the user ids are unique and they are not allowed to have even a single duplicate. But I have never seen anywhere that there is any duplicate restriction on passwords.

Moreover, the system generated passwords have a limited lifespan and they are to be changed by the end user within certain period of time (say a month). So, a password which was generated a month ago should have been expired and we could reuse that value now.

In my views, it should not be an issue if the password is repeated (with a probability of 1 in a million or a billion).

.


DB2 :: RE: Masking Db2 data

$
0
0
Author: Rohit Umarjikar
Posted: Fri Sep 02, 2016 10:18 pm (GMT 5.5)

I think , you can make a use of seq# , I would advice you to talk to DBA in this matter also look CREATE MASK if that is what you looking for.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."icon_razz.gif

DB2 :: RE: Masking Db2 data

$
0
0
Author: enrico-sorichetti
Subject: Reply to: Masking Db2 data
Posted: Fri Sep 02, 2016 10:32 pm (GMT 5.5)

the create mask IIRC is NOT PCI compliant
the unmasked data will still be present into the table
_________________
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort icon_cool.gif

COBOL Programming :: RE: Random Password (in string format) generation.

$
0
0
Author: Robert Sample
Posted: Sat Sep 03, 2016 12:54 am (GMT 5.5)

The Enterprise COBOL RANDOM intrinsic function is an interesting function. It returns COMP-1 or COMP-2 (short floating point or long floating point) values. The long floating point values are NOT the same as the short floating point values; sometimes there is a difference of several digits in the last place of the short floating point value, compared to the same number of digits of the long floating point.

Using a seed value of zero and short floating point values (32-bit), the sequence generated a duplicate in the 18,823,902nd value in the sequence, running on a 5.1.1 compiler. To generate a full non-repeating sequence appears to require a 64-bit (long floating point) variable to hold the result. This duplicate took 13.2 seconds of CPU and 1.4 minutes elapsed time to find. Using 18823902 as the seed value, the first duplicate occurred at call 44,221,983 to RANDOM; this took 32 seconds of CPU time and 3.1 minutes elapsed.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

COBOL Programming :: RE: Random Password (in string format) generation.

$
0
0
Author: Bill Woodger
Subject: Reply to: Random Password (in string format) generation.
Posted: Sat Sep 03, 2016 1:32 am (GMT 5.5)

ARITH(EXTEND) generally affects precision of floating-point results from numeric intrinsic functions. I don't know if it affects RANDOM. Without EXTEND for other functions, there is only precision to 15 digits.

COBOL Programming :: RE: Random Password (in string format) generation.

$
0
0
Author: Robert Sample
Posted: Sat Sep 03, 2016 1:45 am (GMT 5.5)

Yeah, I use ARITH(EXTEND) for most of my tests -- when I get a chance, I'll see about rerunning my tests without ARITH(EXTEND).
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

SYNCSORT :: RE: Sequence number add in SORT

$
0
0
Author: sergeyken
Posted: Sat Sep 03, 2016 11:18 pm (GMT 5.5)

More clear and more flexible would be using the parameter EDIT:
Code:
....,ADD,+1,EDIT=(TTTTTT),....

_________________
Tyrannosaurus-REXX

CLIST & REXX :: save SAY var loop.

$
0
0
Author: italo_pm
Subject: save SAY var loop.
Posted: Sun Sep 04, 2016 3:06 am (GMT 5.5)

I want to know how I can do extract the result from syslog

i interrogating a CICS via syslog with this command:

/F NANECICS,CEMT I TCPIPS

F CICSWEB2,CEMT I TCPIPS

this is my output in syslog:

Code:

D NI0000000 OS390CX  16244 18:38:24.68 TSU01039 00000210  F CICSWEB2,CEMT I TCPIPS
D MR0000000 OS390CX  16244 18:38:24.68 JOB07063 00000010  + 524
D DR                                        524 00000010    TCPIPS(WEBBKUP ) OPE POR(04038) HTTP NOS TRA(CWXN)
D DR                                        524 00000010    CON(00000) BAC( 00300 ) MAX( 002000 ) URM( DFHWBADX )
D DR                                        524 00000010    TCPIPS(WEBCXINT) OPE POR(04038) HTTP NOS TRA(CWXN)
D DR                                        524 00000010    CON(00076) BAC( 00300 ) MAX( 002000 ) URM( DFHWBADX )
D DR                                        524 00000010    RESPONSE: NORMAL TIME:  18.38.25  DATE: 31.08.16
D ER                                        524 00000010    SYSID=WEB2 APPLID=CICSWEB2


i want my output in this mode:

Code:

TCPIPS(WEBBKUP ) OPE POR(04038) HTTP NOS TRA(CWXN)
CON(00000) BAC( 00300 ) MAX( 002000 ) URM( DFHWBADX )
TCPIPS(WEBCXINT) OPE POR(04038) HTTP NOS TRA(CWXN)
CON(00076) BAC( 00300 ) MAX( 002000 ) URM( DFHWBADX )
RESPONSE: NORMAL TIME:  18.38.25  DATE: 31.08.16



the problem is a list of 50 members and each cycle command in syslog screens are repeated and obtain the previous result but the new result and all data are repeated.


how to write the output in PS for each CICSNAME in this code:

SAY "OUTPUT: " lcicsweb dismr""disdr""lineawebnew

this is my rexx:


Code:

/* REXX */
/*----------------------------------------------------------------------------*/
   SYSID   = mvsvar('sysname')
   SAY 'AMBIENTE:'SYSID
/*-----------------------------------------------*/
   DSNAME = 'MYUSER.SCRIPT.TEXT.TEMPCIWB'
   DSE = SYSDSN("'"STRIP(DSNAME)"'")
   IF DSE <> 'OK' THEN DO
      "FREE  FI(TEMPCIWB)"
      "ALLOC FI(TEMPCIWB) DA('"DSNAME"') NEW TRACKS SPACE(10 10) DIR(44) RECFM(F B) LRECL(80)"
   END
   "FREE  FI(TEMPCIWB)"
   "ALLOC FI(TEMPCIWB) DA('"DSNAME"(CICSWEBS)') SHR"
/*--------------------------------------------------------------------- */
   ADDRESS LINK 'GSVXRXAA'
       ADDRESS "SYSVIEWE" "C(PREFIX *)"
       "DROPBUF"
       ADDRESS "SYSVIEWE" "C(LISTJOBS CICSW*)"

       i = 0
       DO UNTIL QUEUED() = 0
          PULL linea
          tipo = LEFT(linea,1)
             IF tipo = 'D' THEN DO
                i = i + 1
                PARSE VAR linea tipo "!" cmd "!" nomecics.i "!"
             END
       END

       DO k = 1 TO i
          say "CICS IN EXEC: "nomecics.k
       END

   ADDRESS 'SYSVIEWE' 'C(END)'

   "EXECIO * DISKW TEMPCIWB (FINIS"
      "FREE  FI(TEMPCIWB)"
   "DROPBUF"
/*--------------------------------------------------------------------- */
   address TSO
      "ALLOC FILE(CICTEMWB) DSNAME('MYUSER.SCRIPT.TEXT.TEMPCIWB(CICSWEBS)') SHR"
   address TSO
   "EXECIO * DISKR CICTEMWB (FINIS STEM cicsname."
   "FREE FILE(CICTEMWB)"
/*--------------------------------------------------------------------- */

   DO cics8= 1 TO cicsname.0

   lcicsweb = SUBSTR(cicsname.cics8,1,8)

   ADDRESS LINK 'GSVXRXAA'
   "DROPBUF"
   ADDRESS "SYSVIEWE" "C(/F "lcicsweb",CEMT I TCPIPS)"
   "DROPBUF"
   ADDRESS "SYSVIEWE" "C(SYSLOG)"


   SAY "-------------------------------------------------------------------------------------------"
   SAY "START  -- CICSNAME:" lcicsweb
   SAY "-------------------------------------------------------------------------------------------"

   i = 0
      DO WHILE QUEUED() > 0
         PULL lineaweb
          tipod  = SUBSTR(lineaweb,3,2)
       /* SAY lineaweb */
            IF tipod = "NI" THEN DO
               disni = SUBSTR(lineaweb,59,24)
               SAY " "
               SAY lcicsweb "INIZIO CMD -:"disni
            END
            IF tipod = 'MR' THEN DO
               dismr = SUBSTR(lineaweb,61,3)
            END
            f=0
            IF tipod = 'DR' THEN DO
               disdr = SUBSTR(lineaweb,45,3)
               f = f + 1
               lineawebnew = SUBSTR(lineaweb,61)
            END
            IF tipod = 'ER' THEN DO
               diser = SUBSTR(lineaweb,61)
            END

            IF dismr = disdr THEN DO
               i = i + 1
               SAY "OUTPUT: "  lcicsweb dismr"   "disdr"   "lineawebnew
            END
      END  /* WHILE */

    SAY "-------------------------------------------------------------------------------------------"
    SAY "END -- CICSNAME:" lcicsweb
    SAY "-------------------------------------------------------------------------------------------"

    ADDRESS "SYSVIEWE" "C(END)"

    END /* cics8 */

    "DROPBUF"

    "FREE FILE(CICTEMWB)"
 /* ------------------------------------------------------------ */



any suggestions

please?

Regards

Italo.


CLIST & REXX :: RE: save SAY var loop.

$
0
0
Author: Akatsukami
Posted: Sun Sep 04, 2016 3:52 am (GMT 5.5)

Suggestions as to what? Please be clearer about what your problem is.
_________________
Data is not information.
Information is not knowledge.
Knowledge is not wisdom.

COBOL Programming :: RE: Wildcard logic in COBOL

$
0
0
Author: sergeyken
Posted: Sun Sep 04, 2016 4:07 am (GMT 5.5)

COBOL is not good idea to deal with character strings, in any manner.
C/C++ is much more convenient to do this as shown in previous post.
If anyone is interested I can also provide a possible solution in REXX, which is even more elegant compared to C, as per my own opinion.
_________________
Tyrannosaurus-REXX

COBOL Programming :: RE: how to DYNAMICALLY write sort cond to o/p file using cobol

$
0
0
Author: sergeyken
Posted: Sun Sep 04, 2016 4:16 am (GMT 5.5)

In my humble opinion, the Team Leader who suggested to create SORT statements from sequential file instead of doing JOIN in SORT step - he or she must be fired immediately.
The TL who insisted to create those SORT statements via COBOL code additionally must be sentenced to death.
_________________
Tyrannosaurus-REXX

COBOL Programming :: RE: how to DYNAMICALLY write sort cond to o/p file using cobol

$
0
0
Author: Rohit Umarjikar
Posted: Sun Sep 04, 2016 4:41 am (GMT 5.5)

Haha.. 😊That's what I thought about the approach.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."icon_razz.gif

CLIST & REXX :: RE: save SAY var loop.

$
0
0
Author: sergeyken
Posted: Sun Sep 04, 2016 5:43 am (GMT 5.5)

Please clarify clearly how the structure of your output should look like?

Your post includes a lot of code, but lacks of clarity, or a general idea...
_________________
Tyrannosaurus-REXX

DB2 :: SQL Query optimization.

$
0
0
Author: arunsoods
Subject: SQL Query optimization.
Posted: Sun Sep 04, 2016 6:27 am (GMT 5.5)

Hi Team,

While executing below query I am getting 8175.5351 as cost when i am checking through EXPLAIN in BMCADM.

EXEC SQL
SELECT MAX(SEQ_ID)
INTO :DCLTB99-TRANS.SEQ-ID
:SOF-TRANS-SEQ-ID
FROM TEST_TABLE
END-EXEC

Do we have any way by which we can optimize the query so that it can costs lesser.

Thanks and Regards
_________________
Arun Sood

DB2 :: RE: SQL Query optimization.

$
0
0
Author: Bill Woodger
Subject: Reply to: SQL Query optimization.
Posted: Sun Sep 04, 2016 1:36 pm (GMT 5.5)

What do you want to do with that MAX value? Can't you store the value somewhere when you know it, rather than lazily rummaging about for the highest one?

DB2 :: RE: SQL Query optimization.

$
0
0
Author: Nic Clouston
Posted: Sun Sep 04, 2016 2:12 pm (GMT 5.5)

Why are you using SQL to put it into 2 variables? Put it into one and then copy it to the other in your program. Have you got an index on that table? Probably not - add one.
_________________
Regards
Nic

CLIST & REXX :: RE: save SAY var loop.

$
0
0
Author: mistah kurtz
Posted: Sun Sep 04, 2016 8:21 pm (GMT 5.5)

Guessing from the topic title and
Quote:
I want to know how I can do extract the result from syslog
and
Quote:
how to write the output in PS for each CICSNAME in this code:

SAY "OUTPUT: " lcicsweb dismr""disdr""lineawebnew

I think the TS is asking how to get the syslog information in a dataset, i.e output of all the display statement (SAY) in the rexx code into a dataset, but I could be wrong.

@italo_pm
If that's what you want, use a STEM variable to store the result of SAY statements and write into the dataset using that stem variable.

DB2 :: RE: SQL Query optimization.

$
0
0
Author: arunsoods
Posted: Sun Sep 04, 2016 11:35 pm (GMT 5.5)

Thanks Bill and Nic for replying...

Nic - If i create INDEX as below on the table

CREATE INDEX INX_SEQ_ID
ON test_table (SEQ_ID)

and then run this query

EXEC SQL
SELECT MAX(SEQ_ID)
INTO :DCLTB99-TRANS.SEQ-ID
:SOF-TRANS-SEQ-ID
FROM TEST_TABLE
END-EXEC

Will this reduce the cost...??

Bill - "Can't you store the value somewhere when you know it, rather than lazily rummaging about for the highest one?."

By the above do you mean that if I select all SEQ_ID using below query.

SELECT SEQ_ID FROM TEST_TABLE

and store the values in a PS file and then applying SORT to find the highest...

Will this work...???
Please suggest icon_idea.gif
_________________
Arun Sood

DB2 :: RE: SQL Query optimization.

$
0
0
Author: arunsoods
Subject: Re: Reply to: SQL Query optimization.
Posted: Sun Sep 04, 2016 11:40 pm (GMT 5.5)

Bill Woodger wrote:
Can't you store the value somewhere when you know it, rather than lazily rummaging about for the highest one?


By the above do you mean that if I select all SEQ_ID using below query.

SELECT SEQ_ID FROM TEST_TABLE

and store the values in a PS file and then applying SORT to find the highest...

Will this work...???
_________________
Arun Sood

DB2 :: RE: SQL Query optimization.

$
0
0
Author: mistah kurtz
Posted: Sun Sep 04, 2016 11:56 pm (GMT 5.5)

Quote:
Will this reduce the cost...??

Quote:
Will this work...???

what stops you from trying?

Viewing all 8500 articles
Browse latest View live