christian.pressnick | 15 Nov 2007 08:59
Picon

keypad + to 'field exit'

Good mornig,

How can I remap the keypad + to 'field next' and keypad enter to 'field
exit'?

Regards
christian
Leysser GmbH 55743 Idar-Oberstein  
Amtsgericht Bad Kreuznach HRB: 11260
Geschaftsfuhrer: Wolfgang Neumann

** Virus checked by Leysser GmbH** 
!DSPAM:416,473bfc6680491627815112!
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

Scott Klement | 15 Nov 2007 18:18
Favicon

Re: keypad + to 'field exit'

Which version of the terminal are you using?   Windows?  Curses?  X11?  
GTK?  SLang?

christian.pressnick@... wrote:
> Good mornig,
>
> How can I remap the keypad + to 'field next' and keypad enter to 'field
> exit'?
>
>
> Regards
> christian
> Leysser GmbH 55743 Idar-Oberstein  
> Amtsgericht Bad Kreuznach HRB: 11260
> Geschaftsfuhrer: Wolfgang Neumann
>
>
> ** Virus checked by Leysser GmbH** 
> !DSPAM:416,473bfc6680491627815112!
>   

--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

(Continue reading)

christian.pressnick | 16 Nov 2007 08:06
Picon

Re: keypad + to 'field exit'

I'm using Curses, I think. 
The base is Ubuntu 6.06.1, text-only.
Leysser GmbH 55743 Idar-Oberstein  
Amtsgericht Bad Kreuznach HRB: 11260
Geschaftsfuhrer: Wolfgang Neumann

** Virus checked by Leysser GmbH** 
!DSPAM:416,473d415f5181524396773!
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

James Rich | 19 Nov 2007 23:20

svn no longer exists?

Hey everyone,

I just finished up a week's work of changes to the SCS code and PDF 
output.  I went to commit my changes to svn but it doesn't appear to exist 
anymore.  Is svn gone now?  Are we back to cvs only?  If so, is the cvs 
tree up to date with all the changes that were in svn?

James Rich

It's not the software that's free; it's you.
 	- billyskank on Groklaw
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request@...
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

James Rich | 20 Nov 2007 22:48

Remembering page state between print jobs

I recently committed several changes to cvs to vastly improve SCS support 
and PDF output support.  It now follows the host's requests for page size, 
margins, and CPI, as well as a few other fixes for SCS codes we weren't 
handling before.

But I've run into a significant problem.  Suppose you have a 17 CPI print 
job that is 198 columns wide.  Because these are not the default sizes of 
10 CPI and 80 columns the iSeries will send the Set Page Presentation Size 
command and a few other commands for font and margins.  The scs code we 
now have will correctly parse these command and set the page size, fonts, 
and margins correctly.  If when you print this job you save the spool file 
and then immediately send it again, the page size, font, and margin 
commands are not sent.  The iSeries expects the printer to remember what 
the last settings were for these attributes.  The iSeries only sends those 
parameters for print jobs whose attributes differ from the previous print 
job sent.

We do print processing via two components: lp5250d and the outputcommand 
parameter in ~/.tn5250rc of the print session (usually one of scs2ascci, 
scs2pdf, or scs2ps).  lp5250d does not have any SCS code and simply passes 
on the print stream to the outputcommand via a pipe.  Each time a print 
job is processed the command specified in outputcommand is started, 
attached to the pipe, and then exits when the job is complete.  All the 
SCS processing is done in this second part.  Because of this, the only 
programs that are aware of the current page size, fonts, and margins are 
scs2ascii, scs2pdf, and scs2ps.  But because they exit at the end of each 
job, there is no way for them to remember what the page, font, and margin 
settings were from the previous job.  So a job such as I described above 
would print incorrectly the second time it is sent to be printed.

(Continue reading)

Scott Klement | 21 Nov 2007 00:27
Favicon

Re: Remembering page state between print jobs

IMHO, the stuff related to parsing SCS should remain in the SCS 
programs.  Remember: SCS is not the only printer language that the 
system supports.  We'll want to support AFP, IPDS, USER-ASCII, etc in 
the long run.

Plus, I think it's really handy for debugging and development to be able 
to dump the SCS data to a file and be able to analyze that file, and run 
it through other tools like scs2ascii or scs2pdf later on.

Can scs2pdf simply save the settings it needs into a file on disk?

James Rich wrote:
> I recently committed several changes to cvs to vastly improve SCS
> support and PDF output support.  It now follows the host's requests
> for page size, margins, and CPI, as well as a few other fixes for SCS
> codes we weren't handling before.
> 
> But I've run into a significant problem.  Suppose you have a 17 CPI
> print job that is 198 columns wide.  Because these are not the
> default sizes of 10 CPI and 80 columns the iSeries will send the Set
> Page Presentation Size command and a few other commands for font and
> margins.  The scs code we now have will correctly parse these command
> and set the page size, fonts, and margins correctly.  If when you
> print this job you save the spool file and then immediately send it
> again, the page size, font, and margin commands are not sent.  The
> iSeries expects the printer to remember what the last settings were
> for these attributes.  The iSeries only sends those parameters for
> print jobs whose attributes differ from the previous print job sent.
> 
> We do print processing via two components: lp5250d and the
(Continue reading)

James Rich | 21 Nov 2007 01:28

Re: Remembering page state between print jobs

On Tue, 20 Nov 2007, Scott Klement wrote:

> IMHO, the stuff related to parsing SCS should remain in the SCS
> programs.  Remember: SCS is not the only printer language that the
> system supports.  We'll want to support AFP, IPDS, USER-ASCII, etc in
> the long run.
>
> Plus, I think it's really handy for debugging and development to be able
> to dump the SCS data to a file and be able to analyze that file, and run
> it through other tools like scs2ascii or scs2pdf later on.

I agree on both points.

> Can scs2pdf simply save the settings it needs into a file on disk?

I thought about this.  I just don't think it is a very elegant solution. 
The problems I see with this are:

1. What happens if the file is deleted between print jobs?
2. What security implications are there? Specifically, how do we avoid 
creating a file that someone has cleverly linked to an important system 
file, ownerships, etc.

This solution does provide for repeatability when piping raw SCS output to 
scs2pdf without using lp5250d during debugging sessions like you mention.

Personally, I would prefer that lp5250d remembered the settings.  Then is 
could invoke the scs2* programs with command line arguments such as 
--pagewidth=X etc.  This also provides for repeatability when debugging. 
But I can't come up with a nice way to do that.  So barring some brilliant 
(Continue reading)

Scott Klement | 21 Nov 2007 03:01
Favicon

Re: Remembering page state between print jobs

James Rich wrote:
> The problems I see with this are:
> 
> 1. What happens if the file is deleted between print jobs?
> 2. What security implications are there? Specifically, how do we avoid 
> creating a file that someone has cleverly linked to an important system 
> file, ownerships, etc.

By that logic, nobody should ever use files for any reason.

What happens if someone deletes ANY file on your system?  Wouldn't that 
cause a problem?  Surely users know better than to delete random files. 
  Those that don't shouldn't be given access to important files -- 
including the stuff that lp5250d saves.

How do you prevent lp5250d from overwriting an important system file 
thanks to some clever link?  Well... uhh... you don't run lp5250d as 
root, do you?

I suppose if you're really worried about it, only have lp5250d open a 
file if it doesn't exist.  That way, you know it can't be pointing to a 
system file -- since system files already exist :)  Have it use the file 
to remember the settings while lp5250d is active, and when lp5250d ends, 
have it delete the file.  This will also serve to protect you from 
having multiple lp5250d jobs trying to use the same file (which probably 
wouldn't be good.)
--

-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250@...
To subscribe, unsubscribe, or change list options,
(Continue reading)

James Rich | 22 Nov 2007 02:33

Improved support for SCS and PDF

Hi everyone,

I have committed to cvs several improvements to the SCS and PDF code. 
These changes provide support for any page size or CPI, as well as some 
bug fixes.  If you are using lp5250d to create PDFs or are interested in 
doing so, could you please test the latest cvs code with your printouts. 
So far it is working perfectly with everything I've thrown at it.

You will need to create a special file for saving printer state 
information.  At some point this will be handled automatically by lp5250d, 
but for now it is a manual process.  This file needs to be read/writable 
by the user running lp5250d.  If this file doesn't exist scs2pdf won't 
save printer state across print job, occasionally resulting in incorrect 
output.  It can be called anything, but it needs to be unique for each 
lp5250d instance.

scs2pdf can now also log what it is doing to syslogd.  If your PDFs are 
created with the wrong page or font size starting scs2pdf with the -s 
switch and checking the syslogd logs can help identify the problem.  It 
has two levels of logging: 0 for basic and 1 for detailed.  The amount of 
logging is controlled by the -l switch (default is basic).

To test this create an entry in ~/.tn5250rc similar to the following:

printtopdf {
 	host = your.as400.domain.com
 	env.DEVNAME = PRTTOPDF
 	outputcommand = scs2pdf -si /tmp/pdfprintinit > /tmp/output.pdf
}

(Continue reading)


Gmane