Home SELCOPY CBLVCAT CBLi Trial/Prices CBL SiteMap
 
Multiple Information Retrieval, Manipulation & Update for IBM Mainframe, iSeries, UNIX & PC Platforms

As well as answers to general questions, the following FAQs may include solutions to problems that are not attributable to an error in the SELCOPY program and also problems for which a zap has not yet been published.

SELCOPY 2.02 Install
Issues arising from installation of SELCOPY 2.02 for IBM Mainframe.

1. - SELCOPY 2.00 and SELCOPY 2.01 Support.
2. SQ11630 MVS VSAM Output RC=05 Truncation or short records.
3. SQ11632 ERROR 584 - Output DSN already open.
4. SQ11642 ERROR 020 - POS/LRECL/INTO EXCEEDS WORKLEN.
5. SQ11647 ERROR 582 - DCB GEOM MISMATCH FOR PDS OR DISP=MOD/SHR FILE.

SELCOPY 2.00 Install
Issues arising from installation of SELCOPY 2.00 for IBM Mainframe.

1. - SELCOPY 9.8P Support.
2. SQ10762 ERROR 584 - Output DSN already open.
3. SQ10859 VSE SIZE=128K - too small for SELCOPY 2.00, but ok for SELCOPY 9.80.
4. SQ10797 VSE 4883I - INVALID LOGICAL UNIT SELCNAM on SELCOPY 2.00.
5. SQ10894 ERROR 020 - POS/LRECL/INTO EXCEEDS WORKLEN on SELCOPY 2.00.
6. SQ10923 CVAE/CVEA translate table changes in SELCOPY 2.00.
7. SQ10938 ERROR 005 - PARAM ARGUMENT REQD when using TAB as a file name.
8. - Footing has wrong expiry date, except on Rel 2.00.

General Enquiries
The following is a list of frequently asked questions that are answered at the SELCOPY query desk.

1. - Can I run SELCOPY Interactively and get the output on my 3270 screen?
2. SQ11307 How can I re-read a file when I've already hit end of file?
3. SQ11160 I'm getting an ERROR 576 when using SELCOPY with IMS 7.0 or later.
4. SQ10537 Can SELCOPY process IAM and VSAM/T files?
5. SQ11448 Can I build and execute dynamic SQL in SELCOPY?
6. SQ11334 My SQL query returned no rows, but SELCOPY gave a return code of zero. I was expecting a return code of 100 in the SQLCA, but that's also zero. What happened?
7. SQ11228 How can I move my SELCOPY DB2 SQL programs from development into production?




SELCOPY 2.02 Install

1. SELCOPY 2.00 and SELCOPY 2.01 Support
top We hereby give notice of the discontinuance of the program services for SELCOPY 2.00 and SELCOPY 2.01 from 1st October 2007.

You may continue to contact the SELCOPY query desk for problem determination and general assistance with releases 2.00 and 2.01 after the discontinuance date. However, in the event of a code defect, upgrade to a later release will be required.

See CBL Software Announcement of 2007/01/30.


2. SQ11630: MVS VSAM Output RC=05 Truncation or short records.
top

SELCOPY 2.02 zap 05 (ref: s202z05) fixes these errors and should be applied, whether you have encountered a problem or not. This zap reverses a change made in SELCOPY 2.02 and is described as follows:

      ## IMPORTANT ZAP for MVS ##

Due to customer pressure, a change introduced in SELCOPY 2.02 has been reversed following problems with legacy code, thus

       WRITE   ABC   VSAM   LRECL=80

will therefore revert to being interpreted as treating the VSAM file, ABC, as RECFM=F, which causes all records written to that file to be of fixed length 80.

Without Zap 05 applied, SELCOPY 2.02 treats the above WRITE statement as defining the maximum output LRECL as 80 and will write records of length equal to the current LRECL value.

Possible problems were:

  1. RC=05:
    Truncation due to current LRECL being greater than the LRECL value specified on the WRITE.
  2. No Error:
    Records written could be shorter than intended due to current LRECL being less than the LRECL value specified on the WRITE, which of course is a serious error.

Please apply Zap 05 and accept our sincere apologies.


3. SQ11632: ERROR 584 - Output DSN already open.
top

In releases of SELCOPY prior to 2.00, a potentially dangerous loophole existed where a data set could be opened for output concurrently with the same data set being already open using a different filename, with undesirable consequences such as overwriting your input data.

In SELCOPY 2.00, a new error message, ERROR 584, was returned if an attempt was made to open an output file where the DSN matches the DSN on any other open file.

*** SELECTION TIME ERROR 584 ***   F=xxxxxxx  - OUTPUT DSN ALREADY OPEN UNDER DIFF FN

In order to allow developers time to address jobs that gave this error, some installations may have applied a temporary zap to SELCOPY 2.00 to disable the ERROR 584 message. (See SELCOPY 2.02 Install FAQ 2)

If this zap was applied and not later removed and the affected jobs not corrected, then ERROR 584 will once again be reported and the jobs will cancel.

If this is the case, then a special zap to SELCOPY 2.02 has been written so that, where an ERROR 584 condition is encountered, the following actions are taken:

  1. SELCOPY 2.02 behaves as releases of SELCOPY prior to 2.00 and allows data to be written to the same data set from which records are being read, thus suppressing ERROR 584.
  2. The following warning message is written to the operator console for each data set concurently opened for input and output within the SELCOPY execution.

    SELCOPY REL 2.02  *ATTN* ERR584 fname     JOB=jobname
    

With this zap applied, users may scan the console log or set an alert for occurrences of this message and flag the job for attention.

Download the zap by clicking on the following link:

Reference ZIP File Size Last Update
SELCOPY 2.02 - ERROR 584 (SQ11632) 3,439 bytes 2007/05/24 10:06

When all jobs that output this message have been fixed, then no more messages are returned and the zap should be removed for normal operation of SELCOPY 2.02.


4. SQ11642: ERROR 020 - POS/LRECL/INTO EXCEEDS WORKLEN.
top

Prior to release SELCOPY 2.00, a character compare operation involving a string literal would result in only the start positions of the compare field being checked for validity whereas later releases also check the field length.

This meant that jobs which apparently worked succesfully in earlier releases, return ERROR 020 on SELCOPY release 2.00 and later.

In order to allow developers time to address jobs that gave this error, some installations may have applied a temporary zap to SELCOPY 2.00 to disable field length checking for string literal compares. (See SELCOPY 2.02 Install FAQ 5)

If this zap was applied and not later removed and the affected jobs not corrected, then ERROR 020 will once again be reported and the jobs will cancel.

If this is the case, then a special zap to SELCOPY 2.02 has been written so that, where this ERROR 020 condition is encountered, the following actions are taken:

  1. SELCOPY 2.02 behaves as releases of SELCOPY prior to 2.00 and bypasses string literal field length checking, thus avoiding ERROR 020 for this condition.
  2. The following warning message is written to the operator console for each occurrence of a string literal compare that would envoke this error condition.

    SELCOPY REL 2.02  *ATTN* ERR020 WORKLEN  JOB=jobname
    

With this zap applied, users may scan the console log or set an alert for occurrences of this message and flag the job for attention.

Download the zap by clicking on the following link:

Reference ZIP File Size Last Update
SELCOPY 2.02 - ERROR 020 on literal compare. (SQ11642) 3,559 bytes 2007/05/24 10:13

When all jobs that output this message have been fixed, then no more messages are returned and the zap should be removed for normal operation of SELCOPY 2.02.


5. SQ11647: ERROR 582 - DCB GEOM MISMATCH FOR PDS OR DISP=MOD/SHR FILE.
top

In releases of SELCOPY prior to 2.02, a potentially dangerous loophole existed where an MVS data set's geometry could be updated simply by specifying DCB parameters (LRECL, BLKSIZE, RECFM) on the output statement. This had the potential to corrupt existing data in the output sequential data set or all members of a PDS data set.

In SELCOPY 2.02, a new error message, ERROR 582, is returned if an attempt was made to update DCB information for an output data set where all the following are true:

  1. Data set is a PDS/PDSE or DISP=MOD/SHR.
  2. Geometry on WRITE differs to that in the DCB.
  3. DCB geom values are non-zero.
*** SELECTION TIME ERROR 582 ***   F=xxxxxxx  - ZAP 45

Disable ERROR 582:
SELCOPY 2.02 is correct in giving ERROR 582 in this circumstance, and jobs that now fail should be examined individually and updated so that DCB information is not specified on the WRITE statement. This error is usually caused by L=n (meaning LRECL=n) being coded on WRITE. e.g.

WRITE  OUTDD   L=133
This should be replaced with:
WRITE  OUTDD   FROM 1  LEN=133

To allow customers to address this problem in their own timescale, the following special zap to SELCOPY 2.02 (where S202z09 is a pre-requisite) has been written so that, where an ERROR 582 condition is encountered, the following actions are taken:

  1. SELCOPY 2.02 behaves as releases of SELCOPY prior to 2.00 and allows the output data set geometry to be updated, thus suppressing ERROR 582.
  2. The following warning message is written to the operator console for each data set for which the DCB changes will occur.

    SELCOPY REL 2.02  *ATTN* ERR582 DCB MOD     JOB=jobname
    

With this zap applied, users may scan the console log or set an alert for occurrences of this message and flag the job for attention.

** Important Ammendment **
On 2008/02/22, the special zap (Ref: sq11647) described by this FAQ was amended to avoid conflict with SELCOPY 2.02 Zap 9 (Ref: s202z09).

If the original version of zap sq11647 is installed, then application of zap s202z09 will fail to verify. If this is the case, then please exeucte the sq11647 zap roll back job, apply standard SELCOPY maintenance including Zap 9 (s202z09) then download and apply the amended zap sq11647.

Download the zap by clicking on the following link:

Reference ZIP File Size Last Update
SELCOPY 2.02 - ERROR 582 (SQ11647) 1,609 bytes 2008/02/22 15:59

When all jobs that output this message have been fixed, then no more messages are returned and the zap should be removed for normal operation of SELCOPY 2.02.





SELCOPY 2.00 Install




1. SELCOPY Release 9.8P Support
top We hereby give notice of the discontinuance of the program services for SELCOPY 9.8P from 31st January 2002.

You may continue to contact the SELCOPY query desk for problem determination and general assistance with release 9.8P after the discontinuance date. However, in the event of a code defect, it is unlikely that new code fixes will be written and so an upgrade to a later release will be required.

Product maintenance (zaps) not related to new features, will, where possible and practicable, continue to be published for SELCOPY 9.8P up to this date. However, it should be noted that there may exist certain problems and omissions in SELCOPY 9.8P that have been addressed at the source level and fixed for SELCOPY 2.00.


2. SQ10762: ERROR 584 - Output DSN already open.
top Jobs that apparently executed succesfully on release 9.80 may now give ERROR 584 on release 2.00.
*** SELECTION TIME ERROR 584 ***   F=xxxxxxx  - OUTPUT DSN ALREADY OPEN UNDER DIFF FN

In earlier releases of SELCOPY, a potentially dangerous loophole existed where a data set could be opened for output concurrently with the same data set being already open using a different filename, with undesirable consequences such as overwriting your input data. SELCOPY 2.00 returns ERROR 584 if an attempt is made to open an output file where the DSN matches the DSN on any other open file.

Zap 01 is required for MVS systems to prevent erroneous ERROR 584 for multiple files using DD DUMMY.

Zap 04 is required for all systems to prevent erroneous ERROR 584 for files with the same DSN, but on different volumes. An advantageous side effect of Zap 04 is that Volume Serial numbers will be displayed on Selection Summary lines, following the DSN.

See the SELCOPY support page for description and download of SELCOPY 2.00 zaps on all systems.

Disable ERROR 584:
SELCOPY 2.00 is correct in giving ERROR 584 in this circumstance, and jobs that now fail should be examined individually and updated to use the CLOSE statement for the first file before actioning the WRITE statement for the second file. Alternatively, the UPDATE statement may be used if appropriate.

To allow customers to address this problem in their own timescale, the following zap (where S200z01 is a prerequisite) will disable ERROR 584 altogether, causing SELCOPY 2.00 to behave as Rel 9.80.

VER   000C34   47F0,CE54
REP   000C34   47F0,CC76

3. SQ10859: VSE SIZE=128K - too small for SELCOPY 2.00, but ok for SELCOPY 9.80
top Jobs that executed succesfully on VSE with a SIZE parameter of 128K now return the following message for release 2.00.
0S35I PHASE SELCOPY  DOES NOT FIT IN LTA OR PARTITION 

This is because SELCOPY 2.00 is 10K larger than SELCOPY 9.80.

Regrettably, this information was not published in the SELCOPY New Features document which lists changes between releases. Please accept our apologies for any inconvenience caused.

SIZE=128K is likely to have been used at many sites as the standard EXEC parameter, which could mean a lot of work amending existing JCL.

There is a better solution:
SELCOPY 2.00 is in fact just over 124K, but because it is linked with PBDY(4K) it gets bumped up to just over 128K. Relink SELCOPY using PBDY(2K), and all your standard JCL will run as before with SIZE=128K. Alternatively, you may omit PBDY altogether.

However, use of SIZE=AUTO should be considered for future development, with exceptions made for runs involving CALLed routines that utilize program partition storage.


4. SQ10797: VSE "4883I - INVALID LOGICAL UNIT SELCNAM"
top Multi-step VSE jobs containing SELCOPY executions that were succesful with release 9.80 may now give the above message using releases 2.00 and 9.8P when the 2nd execution is preceded by // RESET ALL .

If the label SELCNAM does not already exist, SELCOPY dynamically allocates the label SELCNAM to a filename and volser defined in the CBLNAME PHASE at install time (default SELCOPY.NAM on SYSWK1). Before defining the new label, SELCOPY first dynamically assigns an available logical unit for the volser.

The SELCNAM label is only cleared from the temporary label area on completion of the batch job. Therefore, the second and subsequent executions of SELCOPY in a multi-step job, will detect that the label SELCNAM exists already and bypass any attempt to dynamically allocate it or perform any dynamic assign for the volser containing the SELCNAM file.

But when // RESET ALL is used, the ASSGN is cleared and the DLBL is left unchanged, so SELCOPY attempts to open SELCNAM with no ASSGN, and fails.

To avoid this problem, SELCOPY should dynamically unassign and clear the SELCNAM label at CLOSE time. (Zap awaited). Meanwhile, for SELCOPY 2.00, provided all valid password and date range information is made available from the CBLNAME module, it is possible to exist without a SELCNAM file altogether, as follows:

In order to stop SELCOPY attempting to dynamically allocate the SELCNAM file, your CBLNAME must be recompiled and relinked with a non-existent volume name provided in the SNnamVol field. e.g.


         CBLNAME ,                                                     +
               Site='Your site name - location',        * Essential *  +
               SPassword='XXXX,XXXX,XXXX,XXXX',         * Essential *  +
               SDateRange=(yyyy/mm/dd-YYYY/MM/DD),      * Essential *  +
               SNamVol=INVALD,  * Non-existent volume * * Essential *  +
               ... etc

5. SQ10894: ERROR 020 - POS/LRECL/INTO EXCEEDS WORKLEN on SELCOPY 2.00.
top

SELCOPY 2.00 correctly checks the length as well as the starting position in comparisons of literal strings, whereas release 9.80 only checked the starting position.

This means that jobs which apparently worked succesfully on release 9.80 may now give ERROR 020 on SELCOPY 2.00 (and on SELCOPY 9.8P with Zap 12 applied).

For example, where an IF POS statement is checking for a string which starts within the record or work area, but extends beyond it, as in the following code:


   read card           * LRECL=80 and no workarea.
   if p 80 = 'A'       * OK on all Rels.
   or p 80 = 'BC'      * Accepted  on SELC 9.80,
                       * ERROR 020 on SELC 2.00.
     then ...

Customers should modify SELCOPY jobs affected by this change.

However, to allow customers time to address this problem after installing SELCOPY 2.00, the following zap will disable the string length check, causing SELCOPY 2.00 to behave as Rel 9.80.

VER   000AEC   5A69,002C
REP   000AEC   4700,002C

6. SQ10923: CVAE/CVEA translate table changes in SELCOPY 2.00.
top Jobs which exploit the fact that the primitive ASCII to EBCDIC translate table in SELCOPY 9.80 only translated ASCII X'00' - X'7F', leaving X'80' - X'FF' unchanged, may not work in the same way with SELCOPY 2.00's enhanced translate table.

The EBCDIC to ASCII translate table for SELCOPY 2.00 accounts for the full extended ASCII character set, whereas SELCOPY 9.80 used X'1A' (Control-Z) as the translation for any non-7-bit ASCII character.

SELCOPY 2.00 CVAE and CVEA translations give a major improvement over previous releases in that:

  • 8-bit extended ASCII codes are supported.
  • the CVAE and CVEA translations are reversible without loss of integrity of information.
  • Support for the Euro currency symbol.

Customers should modify SELCOPY jobs affected by this change.

However, to allow customers time to address this problem after installing SELCOPY 2.00, the release 9.80 versions of the translate tables can be reinstated by applying the zap file SQ10923.TXT.


7. SQ10938: ERROR 005 - PARAM ARGUMENT REQD when using TAB as a file name.
top Jobs which use TAB as a file name will get ERROR 005 with SELCOPY 2.00. For example:

   read TAB ksds update   * TAB used as a filename for a KSDS.
will work with SELCOPY 9.80, but will get control card ERROR 005 with SELCOPY 2.00.

TAB was introduced as a reserved word in release 9.80 when DB2 support was added to SELCOPY. It is an alternative keyword for TABLE. SELCOPY 9.80 should have given ERROR 005 if TAB was used as a file name, but did not. This has been corrected in SELCOPY 2.00.

Customers should modify SELCOPY jobs which use TAB as a file name.

However, to allow customers time to address this problem after installing SELCOPY 2.00, the following zap will disable the reserved word check for TAB, causing SELCOPY 2.00 to behave as Rel 9.80.

VER   013090   6BE3,C1C2
REP   013090   6B00,0000

Note: If you apply this zap you will no longer be able to use the following syntax for SELCOPY/DB2:


   read TAB='sysibm.systables'    * DB2 read with implied file name
                                  * will not work after zap applied.
   read t1 TAB='sysibm.systables' * This, with explicit file name,
                                  * will still work.

8. Footing has wrong expiry date, except on Rel 2.00.
top

This problem only applies to SELCOPY 9.8P (Mainframe) and SELCOPY 2.07 (All PC and Unix platforms).

For SELCOPY 9.8P (Mainframe) and SELCOPY 2.07 (All PC and Unix platforms), the expiry date shown on the footing line of SELCOPY's listing file is still "12 JUN 2001", which is held as a constant in the SELCOPY program and is not associated with or generated by the password checking process, as is done in SELCOPY 2.00 for the mainframe.

Users running these releases of SELCOPY should install the latest release.




General Enquiries


1. Can I run SELCOPY Interactively and get the output on my 3270 screen?
top YES! You can use CBL Interactive (CBLi) to run SELCOPY programs and all CBLVCAT commands interactively, and obtain the output in a 3270 Window.
CBLi also allows you to do perform most of your day-to-day work in a Windows-style mainframe environment.
Using CBLi, you can edit multiple files, view the output of a number of CBLVCAT commands, debug a SELCOPY program, and more..
all at the same time!

2. SQ11307: How can I re-read a file when I've already hit end of file?
top After testing for EOF, you can issue an explicit CLOSE for the file (or SQL query)
and then re-open the file. This is shown in the example below.

NOTE Using STOPAFT 1 will allow the file to be re-read only once.


RD INDD

IF EOF INDD
  THEN CLOSE INDD STOPAFT 1
  THEN GG         STOPAFT 1
  THEN EOJ

3. SQ11160: I'm getting an ERROR 576 when using SELCOPY with IMS 7.0 or later.
top This is a known problem and SELCOPY returns an incorrect SEGMENT Length.
Download and Apply SELCOPY 2.00 zap 40.

4. SQ10537: Can SELCOPY process IAM and VSAM/T files?
top Since both of these products are emulating VSAM, the files look just like VSAM files to SELCOPY. There is no special coding required.

5. SQ11448: Can I build and execute dynamic SQL in SELCOPY?
top

Yes. Build your SQL in the work area, and use "SQL=nnn AT ppp" to execute it. The example below shows how different SQL statements can be built and executed. The explicit OPEN and CLOSE are required to allow the 'file' S to be read multiple times.


=BLD=
   IF no more SQL to build
     THEN EOJ
   ...
   ... Build SQL at pos ppp
   ...
   OPEN S SQL=nnn at ppp
   =RDT=
    RD S
    IF EOF S
      THEN CLOSE S
          THEN GOTO  BLD
   ...
   ... Process data
   ...
   GOTO RDT
 

6. SQ11334: My SQL query returned no rows, but SELCOPY gave a return code of zero. I was expecting a return code of 100 in the SQLCA, but that's also zero. What happened?
top

If you do not have an explicit OPEN and CLOSE for the query, SELCOPY's READ command performs an OPEN (and a CLOSE if no selections).

The SQL return code (SQLCA+12) indicates the return code from the most recent command (the CLOSE) and that is zero.


7. SQ11228: How can I move my SELCOPY DB2 SQL programs from development into production?
top

As long as the SQLID is the same, the only change required is to connect to a different DB2 subsystem.

This can be done either by using different "OPTION SSN=" parameter in your SELCNAM, including an "OPTION SSN=" card at the start of the SELCOPY code or changing the "SSN=" parameter on the READ operation.


Top © 2005 Compute (Bridgend) Limited
http://www.cbl.com/selcfaq.html
2008/02/22 16:39:42