Joined: 10 Dec 2010 Posts: 96 Location: Massachusetts
I have been asked to add a header line that has screen names in it to a spreadsheet I am creating with field's that have changed from a moment in time to the next moment in time ( delta changes ). Then I FTP this file down to the server. Pretty standard stuff.
I concatenate 2 sets of data twice in this procedure. The first is a timestamp and a counter file. The second is the header and the delta changes file. What I am struggling to understand is that when I have the timestamp file and the counter file the same LRECL and BLKSIZE I can concatenate these and the FTP operates as I believe it should. But no matter how I LRECL the Header file I cannot concatenate that in front of the changes file becuase no matter WHAT I do i get the dreaded:
Code:
EZA1736I FTP (EXIT=8
EZA1450I IBM FTP CS V1R11
EZA1772I FTP: EXIT has been set.
EZA1456I Connect to ?
EZA1736I inftpdev.nscorp.com
EZA1554I Connecting to: gaatlvsvm01ddv2.atldc.nscorp.com 10.3.240.52 port: 21.
220 Microsoft FTP Service
EZA1459I NAME (inftpdev.nscorp.com:Z3A3E):
EZA1701I >>> USER nscorp\syaye59
331 Password required for nscorp\syaye59.
EZA1701I >>> PASS
230 User nscorp\syaye59 logged in.
EZA1460I Command:
EZA1736I locsite trail
EZA1460I Command:
EZA1736I CD \SAPHRDATA\P2P\DELTA_FILES\SAPLOAD
EZA1701I >>> CWD \SAPHRDATA\P2P\DELTA_FILES\SAPLOAD
250 CWD command successful.
EZA1460I Command:
EZA1736I RENAME +
EZA1736I P2P287_MRP_AREA_CHGS.TXT +
EZA1736I ARCHIVE/P2P287_MRP_AREA_CHGS.20110711.145859.TXT
EZA1701I >>> RNFR P2P287_MRP_AREA_CHGS.TXT
350 File exists, ready for destination name
EZA1701I >>> RNTO ARCHIVE/P2P287_MRP_AREA_CHGS.20110711.145859.TXT
250 RNTO command successful.
EZA1460I Command:
EZA1736I RENAME +
EZA1736I P2P287_MRP_AREA_COUNTS.TXT +
EZA1736I ARCHIVE/P2P287_MRP_AREA_COUNTS.20110711.145859.TXT
EZA1701I >>> RNFR P2P287_MRP_AREA_COUNTS.TXT
350 File exists, ready for destination name
EZA1701I >>> RNTO ARCHIVE/P2P287_MRP_AREA_COUNTS.20110711.145859.TXT
250 RNTO command successful.
EZA1460I Command:
EZA1736I RENAME +
EZA1736I P2P287_MRP_AREA_ADDS.TXT +
EZA1736I ARCHIVE/P2P287_MRP_AREA_ADDS.20110711.145859.TXT
EZA1701I >>> RNFR P2P287_MRP_AREA_ADDS.TXT
350 File exists, ready for destination name
EZA1701I >>> RNTO ARCHIVE/P2P287_MRP_AREA_ADDS.20110711.145859.TXT
250 RNTO command successful.
EZA1460I Command:
EZA1736I PUT //DD:ZOS01 P2P287_MRP_AREA_CHGS.TXT
[b]EZA2564W Open of //DD:ZOS01 failed.[/b]
EZA1735I Std Return Code = 27000, Error Code = 00018
EZA1701I >>> QUIT
221
Here is my job stream in it's entirety as well as the FTP commands that I am currently using.
Joined: 10 Dec 2010 Posts: 96 Location: Massachusetts
SYSIN is the parm card. the Use [URL] BBCode for External Links - 03 are the dd's which expand inside the SPFTP proc. I use this same set in about 45 or so other proc's for this process. Everybody here, as a matter of fact, codes this the same way.
I did not find where TS2.MA.SAPLOAD.P2P287.AREA.COUNTS is being created but I am guessing it is the count step that creates it and if it is indeed true , the count dataset is created as 54 bytes file and you concatenated it to TS2.MA.SAPLOAD.P2P287.AREA.TIMESTMP file which is created as 49 byte file.
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
Bill Woodger wrote:
SYMNAMES in the first bit of code, hard-coded in the second.
do you mean in the BUILD statements? you need to be clear,
since it is obvious that the TS copied this, screwed it up,
and now wants a solution,
and you (Bill) have dared to suggest that the TS is not a professional.
Joined: 10 Dec 2010 Posts: 96 Location: Massachusetts
lol. ha ha . great way to start my day. thank you. i get what Bill is talking about and it is in the BUILD. Can go either way I guess. It was quicker to hit SHIFT 'pipe' to insert that character at the time.
Now, about my concatenation issue.
The TIMESTMP and COUNTS are concatenated and get through the FTP to server just fine, every time. But the HEADER and CHGS file blow a fuse with the:
EZA1736I PUT //DD:ZOS01 P2P287_MRP_AREA_CHGS.TXT
EZA2564W Open of //DD:ZOS01 failed.
EZA1735I Std Return Code = 27000, Error Code = 00018
EZA1701I >>> QUIT
I have forced the LRECL and BLKSIZE to be equal on both of these files to no avail. Would LOVE to find a resolution, be it in forcing whatever through the JCL or some parameter in the FTP command string that will allow this concatenation to go through. Kinda screwy that the TIMESTMP and COUNTS flow through and the other set does not. The header is commented out in my FTP proc step above until I find 'inner peace'. Thanks again.
Joined: 10 Dec 2010 Posts: 96 Location: Massachusetts
Tried what Dick mentioned ( although I tried before ). I added a step to RESIZE the file hoping that might come through for muah.
Code:
//* TAG CHANGES AND INCLUDE CURRENT AND PRIOR ID FIELD
//FLAGCHGS EXEC PGM=ICEMAN
//SORTIN DD DISP=SHR,DSN=TS2.MA.SAPLOAD.P2P287.AREA.PANDC
//SORTOUT DD DISP=(MOD,PASS,DELETE),
// DSN=&&TEMP01,
// UNIT=DISK,SPACE=(TRK,(10,05),RLSE),
// DCB=(RECFM=FB,BLKSIZE=00000,LRECL=0000)
//SYSOUT DD SYSOUT=*
//XOUT01 DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSIN DD *
*
OPTION COPY
OUTFIL FNAMES=SORTOUT,
IFTHEN=(WHEN=(001,184,CH,NE,0185,0184,CH),
BUILD=(C'C|',0001,0184,/,C'P|',0185,0184))
//* RESIZE FILE TO MATCH HEADER OR VICE VERSA
//RESIZE EXEC PGM=ICEMAN
//SORTOUT DD DISP=(MOD,PASS,DELETE),
// DSN=&&TEMP02,
// UNIT=DISK,SPACE=(TRK,(10,05),RLSE),
// DCB=(RECFM=FB,BLKSIZE=00000,LRECL=0000)
//SORTIN DD DISP=(OLD,PASS,DELETE),
// DSN=&&TEMP01
//SYSOUT DD SYSOUT=*
//XOUT01 DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSIN DD *
*
SORT FIELDS=COPY
INREC IFOUTLEN=203,
IFTHEN=(WHEN=INIT,BUILD=(01,203))
/*
//*
//* GET CHANGES TO FTP FILE
//FTPCHGS EXEC PGM=ICEMAN
//SORTIN DD DISP=(OLD,PASS,DELETE),DSN=&&TEMP02
//SORTOUT DD DISP=(NEW,CATLG,DELETE),
// DSN=TS2.MA.SAPLOAD.P2P287.AREA.CHGS,
// UNIT=DISK,SPACE=(TRK,(10,05),RLSE),
// DCB=(RECFM=FB,BLKSIZE=00203,LRECL=0203)
//SYSOUT DD SYSOUT=*
//XOUT01 DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(03,18,A,22,4,A,27,4,A,01,01,A),FORMAT=BI
INCLUDE COND=(01,02,CH,EQ,C'C|',OR,01,02,CH,EQ,C'P|')
/*
//*
But, same thing happened. The Timestmp and Counts still fly right through. sigh.
Will need to revisit this soon but need to get some other stuff out the door. Thanks.
The first line describes open mode with values x, y, and z that are defined as follows:
x = I --> Input
x = O --> Output
y = S --> Stream I/O y = R --> Record I/O
z = B --> Binary stream z = T --> Text stream
The second line describes the error that occurred. aa is the errno value returned from the fopen of file. bbbb is the text associated with the errno value. The following describe values and text that could be observed:
(61): Error trying
to define file The file is already opened.
seq_open_file: Using BSAM, I, SYS00006, , 29
0, 0, 0
seq_open_file: BSMOP returned NULL, rc xxx, reason yyy
The second line describes the error which occurred on the open. Use the return code (rc) and reason code to determine why the error occurred.
For return code 80a, reason code 10, or return code 4, FTP was unable to obtain storage to open the data set. Increase the region size for the FTP job or user.
Joined: 10 Dec 2010 Posts: 96 Location: Massachusetts
well, silly me. This MVS systems programmer came over and slapped me up agin' the head and told me to GENER both of those files into one and I probably won't have this problem.
Block repeat INREC code.
Change INREC to bbbbb.
Change PARSE to BUILD
Change "=(ENDBEFR=" to ","
Change "FIXLEN=xxx)," to ""
Deal with %29 manually.
Something along those lines. Not having to hit SHIFT-PIPE once. The way you coded the %01-09 and the 00x lengths even make it easier (well, the last does).