I would like to convert a file built with a Windows application to an
overlay, in order to use in some spool files in the AS400, but I don't
know how to convert the PC file to an overlay.
Thank you very much in advance.
----------------------------------------------
Mª Elena Vázquez
mailto:ma...@correo.com
-----------------------------------------------
I had a customer who did this in Windows 3.1 with the Paint program
some years ago. The technique can be found in Infor APAR II06580
below:
Here are some additional tips to set up an IBM AFPDS Print
Driver for Microsoft Windows. These steps are meant to
enhance those that already exist in the AS/400 PC Support DOS
Installation and Administration Guide (SC41-0006-01) on pages
13-4 through 13-7. Under the Windows Control Panel, click on
PRINTERS. From here, make sure the printer you have defined
as the AFPDS printer has 'FILE:' specified (under Windows
3.1, this is under the CONNECT option). It will not work if
LPT1 or LPT2 is specified here.
Next, create a physical file on the AS/400 with the CRTPF
command. You can take defaults on all the options but for
now specify the maximum record length (RCDLEN parameter) of
32766.
Once your document is created on the PC, copy it into a
shared folder. Use the CPYFRMPCD command on the AS/400 to
copy the PC document into the physical file. (The physical
file that was created in the previous step). DO NOT translate
to EBCDIC.
Now, run either the CRTOVL or CRTPAGSEG command to create an
overlay or page segment from the physical file.
*NOTE*
If you create an overlay for a specific printer, E.g. 4028,
you can only use this overlay for the d/t4028 printer. You
can get around this by creating a generic overlay for a
printer such as the d/t3820. If the overlay is generic you
can use it for other printers as well.
I have successfully created an AFPDS overlay using a document
created in Windows Paint. To create the Overlay I used the
following steps:
1. Configure the Control Panel so that the default printer is
the AFPDS printer driver, and that this driver sends the
output to a file instead of an LPT or COM port.
2. Create the Document in Windows Paint (any Windows application
should work).
3. Within the Document, choose 'File' from the Action Bar.
4. Make certain that the resulting window (the 'Change Printer'
window) has the AFPDS driver as the printer to use. If not,
then Choose the AFPDS printer driver as the printer to use.
5. Click on the 'Options' button of the 'Change Printer' window.
6. When the AFPDS printer driver window comes up, choose '3812'
as the printer and 'Overlay' as the AFPDS object to create.
7. On the AS/400, use the CRTPF command to create a physical
file. Press PF10 for additional parameters. Use 32766 as
the Record length. You will also need to specify *NO for the
'Record format Level check' parameter.
8. Issue a CPYFRMPCD command. Specify *NONE for the 'Translate
Table' and *NOTEXT for the 'Format of PC data' parameters.
9. Issue the CRTOVL command on the AS/400 to create the AFP
overlay.
Hope this helps.
Regards,
Darryl Johns
IBM AS/400 e-business Specialist
(opinions expressed are mine, not necessarily those of IBM)
>Hello,
>
>I would like to convert a file built with a Windows application to an
>overlay, in order to use in some spool files in the AS400, but I don't
>know how to convert the PC file to an overlay.
>
>Thank you very much in advance.
>
>----------------------------------------------
>Mª Elena Vázquez
>mailto:ma...@correo.com
>-----------------------------------------------
Dear Elena,
The message from Darryl explained how to create an Overlay when
working in the Win 3.x environment. If you are using a Win 95 PC,
instructions to perform the same task are listed below.
Steps to be Performed on the Windows 95 PC
------------------------------------------
Chapter 1 - Working on the Win 95 PC
------------------------------------
Our successful test was performed using Client Access for Windows 95
V3R1M2. The service pak that provides the VxD to drive an IBM 2
session twinax card has also been applied to our test machine.
1. Verify that when Client Access for Windows 95 was installed on your
PC, the SCS and AFP print drivers (an optional component) were
installed as well. If not, follow instructions to add these components
to your Windows 95 PC.
*NOTE* - Be aware that if you had previously installed the print
drivers and then upgraded the Client Access for Windows 95 software
with a service pak, the service pak writes its controlling information
into the Win 95 registry. This may cause the link between the Win 95
registry and the source files for all of the IBM AFP print drivers to
be broken. If this happens you need to selectively uninstall the AFP
Print Driver component and then reinstall it.
2. If you already have an AFP print driver installed in Windows 95,
choose the Windows 95 START button, choose settings, choose printers,
and then highlight your AFP print driver. Click the Right mouse button
and then choose properties. Click on the details tab. Under the field
"Print to the following port:" you will probably see a path that looks
something like \\S10055DA\prt010306. Click the arrow next to this
field to see the other choices. Highlight the value FILE: and press
enter. Next click on the Setup.. button. From this new menu click the
Options button. Under the field output type there will be four choices
listed: Document, Medium Overlay, Overlay, and Page Segment. Choose
the type of object you would like to create. In our test, we chose
Overlay. Click on OK to return to the setup menu. Choose OK to return
to the Details menu. Choose Apply and then OK to close the Properties
Menu.
*NOTE* If you have not installed an AFP print driver, the IBM
documentation tells you to select Network Printer when using the Win
95 Add Printer function. If you only want to create Page Segments and
Overlays with the driver and never connect to your AS/400, you should
choose local when prompted.
*NOTE* IBM offers a number of Win 95 AFP print drivers. The drivers
can work at three different resolutions (DPI means dots per inch).
In the past there was a default AFP driver that created output at 144
DPI. This driver is for IPDS impact printers like 4224, 4230, 4234,
4247, and 64xx. I didn't look to see if this driver is still available
in Client Access for Windows 95 or not.
The next set of AFP print drivers create output at 240 DPI. The
individual drivers will be for IBM 3812, 3816, 3820, 3825, 3827, 3828,
3835, 3800, 3900, and 3930 printers.
The last set of AFP print drivers create output at 300 DPI. The
individual drivers will be for IBM 4028, 3912, 3916, 3112, 3116, 3130,
3160, and 43xx (Network Printer Family) printers.
For our test, we used the AFP IBM 4028 print driver.
If you have properly configured the driver, you will see a small arrow
and diskette icon in front of the picture of the printer in the
Windows 95 Printers dialog box. This means that all output will be
written to disk as individual files.
You can now open your PC application and print the document that you
want to become an overlay or page segment. Choose the IBM AFP print
driver that you have previously configured as the target. A small
dialog box will appear asking you to choose a name for the file you
are going to print. Enter the name and choose the destination path as
well when necessary. The file will now be copied to your PC's hard
drive.
You have now successfully created an Overlay or Page Segment source
file on your PC. This is the end of chapter 1 in creating overlays and
page segments from PC documents.
Chapter 2 - Transferring the File to the AS/400
-----------------------------------------------
The file must be maintained in its PC format (ASCII) during the
transfer to the AS/400. For our test, we used Windows 95 explorer. We
mapped a network drive to the AS/400 and then transferred the test
file from the Windows 95 PC hard drive to an AS/400 folder by dragging
and dropping.
Any file transfer method that maintains the file format that existed
on the PC should work for this step.
Make sure that you copy the files to a folder on the AS/400 that your
User ID has access to when you are running a display session on the
AS/400.
This is the end of Chapter 2.
---------------------------------------------------------
Chapter 3 - Converting the PC Document into an Overlay or Page Segment
on the AS/400
---------------------------------------------------------
The steps that must be performed on the AS/400 are to copy the PC
document into a source physical file and then to run an OS-400
conversion routine against the source physical file to create the
overlay or page segment. The steps are as follows:
1. Create a source physical file. The CL command is CRTSRCPF. If you
press F4 to get a prompt you will be asked for a file name, library,
Record length, Member 'if desired', and Text description.
If you are going to be creating a number of overlays or page segments,
you can create a source physical file for each one or you can make
each overlay or page segment a member that is part of a global file
like "W95PCOVR". Both methods worked for us. In our test, we used the
system supplied (V3R2) default record length which was 92.
When you have entered all of your information, press enter to create
the file.
2.Now you have to execute the Copy From PC Document Command. The CL
command is CPYFRMPCD. You can press F4 to get a prompt.
a) Enter the folder name where your PC document resides in the
"From folder" field.
b) Enter Source Physical File Name in the "To file" field.
The source physical file is the target where the PC document is to
be copied.
c) Enter PC Document Name in the "From document" field. This is
the file that you transferred from your Win 95 PC to the AS/400
in Chapter 2.
d) The settings for fields "To Member" and "Replace or add
records" depend on whether you are using members and whether
you have used the target source file previously.The defaults
*FIRST and *REPLACE work fine when you are putting only one PC
document into the source physical file.
e) The field "Translate Table" must be changed from *DFT
to *NONE. This is a very *important* change.
f) The field "Format of PC Data" must be changed from *TEXT
to *NOTEXT. This change is also very *important*.
You can now press enter to perform the copy of your PC document into
the source physical file you built in step one.
3. If your PC document included overlay data, you will need to execute
the CL command CRTOVL to turn the data stored in the source physical
file into an Overlay. If your PC document included page segment data,
you will need to execute the CL command CRTPAGSEG to turn the data
stored in the source physical file into a Page Segment. When you
execute either command and press F4 to get a prompt; you will find
that the command wants the name of the overlay or page segment to be
created, the library the overlay or page segment should be placed in,
as well as the name, library name, and member name (if applicable),
for the source physical file that you created. After you have entered
this information, you can press enter. An informational message should
appear at the bottom of your screen telling you that the overlay or
page segment has been created.
Please contact me if you have questions about any of this information.
/Paul
--
Paul Tykodi, Technical Director
Praim Inc.
E-Mail: pa...@praim.com