:listf fixfile,2 ACCOUNT= DEV GROUP= MIKE FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE---- SIZE TYP EOF LIMIT R/B SECTORS #X MX FIXFILE 200B FA 13982 13982 20 10928 33 32 :build varfile;rec=-200,1,v,ascii;disc=123456 :fcopy from=fixfile;to=varfile :listf varfile,2 SIZE TYP EOF LIMIT R/B SECTORS #X MX VARFILE 200B VA 13982 123456 1 12288 9 *Because the customer had Qedit, we used Qedit to convert the file from fixed- to variable-length:
:run qedit.pub.robelle /t fixfile; set keep var on; keep varfile; exit 13982 lines in file 13982 lines saved :listf varfile,2 SIZE TYP EOF LIMIT R/B SECTORS #X MX VARFILE 1276B VA 13982 514 1 2576 8 8Qedit stripped the trailing blanks from each record. The file was now significantly smaller than the original file. But the user's application program choked on the file, because the file label no longer described the file as a 200-byte file. Qedit assigned its own record length and blocking factor, which the user has no control over.
The third attempt was successful, combining both Qedit and FCOPY:
:run qedit.pub.robelle /t fixfile 13982 lines in file /set keep var on /keep foo 13982 lines saved /exit END OF PROGRAM :build varfile;rec=-200,1,v,ascii;disc=123456 :fcopy from=foo;to=varfile HP31900A.05.02 FILE COPIER (C) HEWLETT-PACKARD CO. 1990 *200*WARNING: FROMFILE RECSIZE IS 1276 BYTES, TOFILE RECSIZE IS 200 BYTES. CONTINUE OPERATION (Y OR N) ?y EOF FOUND IN FROMFILE AFTER RECORD 13981 13982 RECORDS PROCESSED *** 0 ERRORS END OF SUBSYSTEM :listf varfile,2 SIZE TYP EOF LIMIT R/B SECTORS #X MX VARFILE 200B VA 13982 123456 1 4096 5 *Ta-dah. The variable file was now significantly smaller than the original fixed file, while still retaining the original record length and blocking factor.
Set Work Trailingspaces ON requests that Qedit preserves trailing spaces and makes them significant characters. The option also allows creation of odd-length lines. Once enabled, all workfiles created or opened from that point will have trailing spaces preserved. To check the current status, do:
/Verify Work Set WOrk Jumbo ON Block 8 Labels OFF Temp ON Size 3200 Set WOrk TRailingspaces ON /Verify Keep Set Keep Ascii OFF Cctl OFF COde 0 Lab 0 Num OFF Var ON Set Keep COBfree ON NAme /home/user1/afile.txt Set Keep LF ON Saved modification timestamp 2003. . Trailing spaces preservedThe last line shows that trailing spaces are preserved in this workfile.
If the option is disabled, that line reads "Trailing spaces trimmed."
Disabling the global setting with Set Work Trailing Off does not disable the option in the workfile. You have to clear the workfile after disabling it. The Trailingspaces setting is stored in the workfile so it's recognized when the file is opened in the future. These workfiles may contain data specific to Trailingspaces. This may cause unexpected behavior if opened with old versions of Qedit. Because trailing spaces are now treated as significant characters, Keep files created from these workfiles may be different from Keep files created with an older version.