sign on dspf

5 pts.
Tags:
DSPF
how do i include a security warning on the sign on file

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

I believe that there is a QDDSSRC source file in library QGPL with the source for the standard display file. You can edit this using SDA – but be careful, there are a few things you must not do :-

1. Don’t remove any of the input fields – if you don’t want to use them make them protected and non-display.

2. Don’t resequence the source (SDA does this if you press F4 for list of fields and then F6 to sort by row/column).

You can move fields on the screen and add text fields of your own.

I suggest you copy the source and modify the copied version – give it a different name, but leave it in QGPL (most jobs have access to this library). When you’re happy with the display file you’ve modified, then I suggest you test it with another subsystem (not QINTER and certainly not QCTL).

Use CHGSBSD to change the subsystem to use the modified signon display, start the subsystem, then transfer your job into the subsystem (TFRJOB command). If you remain signed on after the TFRCTL command try signing off – you should now see your modified signon screen. Make sure that you can now sign on OK – If it doesn’t work, you should be able to end the subsystem, and try again with another modified signon screen.

If it works OK, then you can also change your other subsystems to use your modified signon screen – I would suggest that you leave QCTL to use the standard signon screen – If someone changes/deletes your modified one you will then be able to signon in the QCTL subsystem.

Regards,

Martin Gilbert.

—–

It’s hard to improve on Martin’s answer, so just in case it’s not clear you <b>must not</b> move any of the input fields so that there input buffer positions change. For example, the standard fields are in the sequence USERID, PASSWRD, PROGRAM, MENU, CURLIB and they must stay in this order.

Also, it should be stressed that QCTL is not changed under any circumstances for exactly the reason that Martin gave.

Finally, make use of the signon display. On ours we have system generated “news” items and “thoughts of the day” appearing as well as security warnings. Example programs that do this are available for download at www.astradyne-uk.com/downloads.htm

All the best

Jonathan

================================================================

First step is to create a new interactive subsystem. Use it to test any signon panel or any other changes that you want to make. Sooner or later, you’ll be glad you had it available. If you don’t know how to create and set one up, you probably shouldn’t be messing with things that control signing on to the system.

Here’s an example signon panel with two kinds of messages:<img src=”http://img2.pict.com/c2/a9/90/3486389/0/signon.png” alt=”Example signon panel messages” />
One message, the long one, comes from a message description in a message file. The other, “Access to system must be pre-authorized.”, is simple text in a constant.

The DDS is:<pre>
A DSPSIZ(24 80 *DS3)
A R SIGNON
A CLEAR
A BLINK
A 1 23′ Sign On ‘
A DSPATR(HI)
A SYSNAME 8A O 8 70DSPATR(ND)
A SBSNAME 10A O 9 70DSPATR(ND)
A 4 48′Display . . . . . :’
A DEVNAME 10A O 4 70
A 6 17′User . . . . . . . . . . . . . .’
A USERID 10A B 6 53
A 01 7 17′Password . . . . . . . . . . . .’
A 01 PASSWRD 10A I 7 53DSPATR(ND)
A PROGRAM 10A I 8 2DSPATR(ND PR)
A CHGINPDFT
A MENU 10A I 8 13DSPATR(ND PR)
A CHGINPDFT
A CURLIB 10A I 8 24DSPATR(ND PR)
A CHGINPDFT
A 02 QSNERROR 80A O 24 1DSPATR(HI)
A COPYRIGHT 40A O 24 40DSPATR(HI)
A UBUFFER 128A H
A MSGLINE 640A O 12 1MSGID(SYU 0001 QGPL/SYUSRMSG)
A 21 7′Access to system must be pre-autho-
A rized.’
A DSPATR(HI)
A DSPATR(RI)</pre>
I made the PROGRAM, MENU and CURLIB fields protected and non-display, as well as deleted the text for them. I also specified CHGINPDFT to remove the underlines for them. The are effectively invisible and inaccessible. (But I did not change the order that they appear in the DDS.)

I added the MSGLINE field to line 12 and gave it a length of 640. That allows me up to eight full lines for whatever I want to say. It references message ID SYU0001 from message file QGPL/SYUSRMSG. (You can create any message file and use any message ID.)

The trick is in how that message is defined:<pre>
ADDMSGD MSGID(SYU0001)
MSGF(QGPL/SYUSRMSG)
MSG(‘SYU0001′)
SECLVL(‘ You can display message text as much as you want. All you need is
the MSGID() keyword for a DSPF output character field. Make the field as big
as you need to hold the message text.’)</pre>
The trick is in making the MSG() parameter value contain nothing but the MSGID() value. When you do that for a DSPF MSGID() field, the display file automatically goes to the SECLVL() text instead. The second-level text can be longer than you can fit on a single screen, so you don’t have to worry about running out of room.

You do have to pay attention to end-of-lines, though, because word-wrap won’t be effective. You should adjust spacing in the text to make it look decent.

To help myself with that, I made a little utility to test how the message looks and to let me make as many changes as I wanted before saving it:<pre>
pgm ( +
&DSIGNON +
)

dcl &DSIGNON *char 10

dcl &MsgTxt *char 640
dcl &SecLvlLen *dec ( 5 0 )

dcl &Rpy *char 1
dcl &FirstTime *lgl 1 value( ’1′ )

dclf QDSIGNON

ovrdspf QDSIGNON tofile( QGPL/&DSIGNON ) lvlchk( *NO )

/* +
Display for first review. After 5 seconds, begin the process… +
*/

chgvar &IN01 ’1′
sndrcvf wait( *NO )
dlyjob dly( 5 )

/* +
Retrieve 2nd-level text (and also save it in SYU0003)… +
*/

dountil ( &Rpy *ne ‘Y’ )

rtvmsg SYU0001 msgf( QGPL/SYUSRMSG ) +
seclvl( &MsgTxt ) seclvllen( &SecLvlLen )

if ( &SecLvlLen *gt 640 ) do
chgvar &SecLvlLen ( 640 )
chgvar &MsgTxt %sst( &MsgTxt 1 &SecLvlLen )
enddo

if ( &FirstTime ) do
chgvar &FirstTime ’0′
chgmsgd SYU0003 msgf( QGPL/SYUSRMSG ) +
seclvl( %sst( &MsgTxt 1 &SecLvlLen ) )
enddo

/* +
Allow 2nd-level text to be altered… +
*/

chgmsgd SYU0001 msgf( QGPL/SYUSRMSG ) +
??seclvl( &MsgTxt )
monmsg ( CPF6801 )

/* +
Redisplay for 5 seconds with altered text (if altered)… +
*/

Nxt_SndRcv:

sndrcvf wait( *NO )
monmsg ( CPF0887 ) exec( do ) /* Input was +
available from previous SNDRCVF… */
rcvf
goto Nxt_SndRcv
enddo

dlyjob dly( 5 )

/* +
Ask for opinion on how it looks… +
*/

sndusrmsg ‘Alter text? (Y/N)’ +
values( Y N ) dft( N ) +
msgrpy( &Rpy ) trntbl( QSYSTRNTBL )

enddo

/* +
If we’re done, start on our way out… +
*/

dltovr QDSIGNON

/* +
Should we save what we did? … +
*/

sndusrmsg ‘Save changes? (Y/N)’ +
values( Y N ) dft( N ) +
msgrpy( &Rpy ) trntbl( QSYSTRNTBL )

/* +
If not, get back what we saved earlier… +
*/

if ( &Rpy *eq ‘N’ ) do
rtvmsg SYU0003 msgf( QGPL/SYUSRMSG ) +
seclvl( &MsgTxt )
chgmsgd SYU0001 msgf( QGPL/SYUSRMSG ) +
msg( ‘SYU0001′ ) +
seclvl( &MsgTxt )
enddo

return

endpgm</pre>
The utility accepts a display file name as a parameter. It displays the current version for 5 seconds, then asks if you want to change the message text. It loops through as many 5-second displays as you need until you type ‘N’o.

It then asks if you want to save your modified message text. If you say ‘N’o, it restores the message back to its original text; otherwise it leaves your new text in place.

It takes a little practice, but it’s pretty easy.

The utility is compiled over QDSIGNON, so any replacement DSPF will have to keep the same format level identifier. You can check any DSPF that you create against the standard QDSIGNON by comparing DSPFFD output for the two. As long as the original fields keep the same buffer lengths and order (and data types), you’ll be okay.

Once your DSPF is created, run:<pre>
CHGSBSD SBSD( mySBSD )
SGNDSPF( QGPL/xDSIGNON )</pre>
Name the signon display that you created (and your test subsystem, hopefully).

There are a couple details about proper compile attributes, but take it one step at a time. It’s pretty easy after doing it once or twice.

Tom

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • graybeard52
    The original DSPF is QDSIGNON. As suggested, copy and rename it before making changes.
    3,115 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following