MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » December 2013

Re: V7R1 CL compile failing for CPYTOIMPF when specifying Target release *PRV



fixed

Hi, again, Paul:

For now, you could "work around" (circumvent) this apparent lack of support by coding the CPYTOIMPF command to run via QCMDEXC, as follows:

DCL &CMD *CHAR 3000
DCL &CMDLEN *DEC LEN(15 5) VALUE(3000)
...
CHGVAR VAR(&CMD) VALUE('CPYTOIMPF FROMFILE(*LIBL/ME5PHY01) TOSTMF(''' +
|| &IFSFILE <| ''') +
MBROPT(*REPLACE) FROMCCSID(37) +
STMFCODPAG(*PCASCII) STMFAUT(*INDIR) +
RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM(*NONE) +
RMVBLANK(*NONE) FLDDLM(*TAB) +
ORDERBY(*ARRIVAL)')
CALL PGM(QSYS/QCMDEXC) PARM(&CMD &CMDLEN)
...

As long as the target systems running V6R1 and V7R1 have the needed PTFs installed, this will work (at runtime).

Hope that helps,

Mark S. Waterbury

> On 12/26/2013 10:26 PM, Steinmetz, Paul wrote:
Mark,

I found IBM doc N1015157, CPYTOIMPF and Record Order, states that the order by was added by PTFs for both V7R1 and V6R1.
The latest V7R1 PTF is SI50479.
Does this mean if IBM changes functionality with additional parameters, via PTFs, Target Release *PRV will not work.

SQL does not guarantee the order in which records are returned unless an ORDER BY clause is specified. The CPYTOIMPF command uses SQL under the covers (with no ORDER BY). Therefore, the order of the records in the destination file was not guaranteed. This is still true for release V5R4 and prior releases.

At V6R1 and V7R1, the CPYTOIMPF has been enhanced by PTFs with a new option ORDERBY:

CPYTOIMPF ORDERBY(*NONE)
CPYTOIMPF ORDERBY(*ARRIVAL)
CPYTOIMPF ORDERBY(Col1, Col2)

This enhancement needs to apply those PTFs, or their superseding PTFs:

R610: SI44866 (APAR: SE48718)
R710: SI44871 (APAR: SE49612)

Extract from the cover letters of those two PTFs:

CPYTOIMPF will allow the user to add a new parameter, Order By
which will order the records being exported. The Order By
parameter will support any valid SQL order by clause and the
records will be exported into the to file in the order requested
by the parameter. This fix includes a new version of the
CPYTOIMPF command which includes the new parameter.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark S Waterbury
Sent: Thursday, December 26, 2013 10:14 PM
To: Midrange Systems Technical Discussion
Subject: Re: V7R1 CL compile failing for CPYTOIMPF when specifying Target release *PRV

Paul:

The CPYTOIMPF command did not have an "ORDERBY" parameter at V6R1 or before that. That was added at V7R1, and perhaps even not added until one of the "Technical Refresh" levels after V7R1 was released (because when I prompt CPYTOIMPF at V7R1 and press F10=Additional parameters, and put the cursor in the "ORDERBY" field and press F1=Help, it says "Help not available.").

So, your CL program will not compile with TGTRLS(*PRV) unless you omit the "ORDERBY(*ARRIVAL)" specification.

Cheers,

Mark S. Waterbury

> On 12/26/2013 7:29 PM, Steinmetz, Paul wrote:
V7R1 CL compile failing for CPYTOIMPF when specifying Target release . . . . . . . . . *PRV
Compiles fine if Target release current.
Any known issues with Target release *PRV.

2300- CPYTOIMPF FROMFILE(*LIBL/ME5PHY01) TOSTMF(&IFSFILE) +
2400 MBROPT(*REPLACE) FROMCCSID(37) +
2500 STMFCODPAG(*PCASCII) STMFAUT(*INDIR) +
2600 RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM(*NONE) +
2700 RMVBLANK(*NONE) FLDDLM(*TAB) +
2800 ORDERBY(*ARRIVAL)
* CPD0043 30 Keyword ORDERBY not valid for this command.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact