hi,
there is a job which ftp a set of files.
these sequence in which the files are ftped are decided in a specific parm.
the present issue is ,there is a file name "IFILELST" which has to be FTPED at the last , but it is sending in between
i need this file to be sent at the last.
the below is the parm file
Code:
PUT 'DR.DAT.PG5902.N201.IPRVIDRH' +
KKMS\MSP\iprvidrh.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N201.IFCLITYA' +
KKMS\MSP\ifclitya.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5904.N201.IFILELST' +
KKMS\MSP\ifilelst.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N201.ITRANS' +
KKMS\MSP\itrans.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N201.IMEMPCPH' +
CCMS\MSP\imempcph.cms
QUIT
could you pls provide me the jcl which would send the IFILELST to the last file.but it should come before the line "QUIT" else the file will not be ftped
DATA:
the input file name remains constant only the "N201" that node is incremented for ever run.the destination and the out file name is constant.
the parm is dynamic and changes for ever run .
PARM PARAMETERS--DCB=(RECFM=FB,LRECL=100,BLKSIZE=0)
it is a job so we can not do it manually.we need some jcl proc whch does that .i was think about the following logic.
first copying the parm to a work file .then moving the below records to a new file F1
locsite TRAILingblanks
PUT 'DR.DAT.PG5904.N201.IFILELST' +
KKMS\MSP\ifilelst.cms
QUIT
and the rest of the records to another file F2
then creating a new file F3 appending the F1 and F2.
then i can override the parm with the F3 file .
so that the end result will make the IFILELST ftped at the last.
Bahugun,
How is this input file created? Is that a cobol program creating FTP statements or some other utility? If possible,I would personally change the process creating this file to write records in the order you want.
Why don't you have "locsite TRAILingblanks" for the final file -DR.DAT.PG5903.N201.IMEMPCPH? Is it because you really don't want locasite or did you missed it?
sorry,i do not want to over ride the parm.the new file F3 will be passed to the FTP proc so that the file sequence specifed in the file F3 is sent
for the above logic i am not able to come up with code.
could you pls suggets the code.
thanks
the "locsite TRAILingblanks " is the first line then comes the PUT line and then the destination .
sorry i missed the "locsite TRAILingblanks" for the first record.
yes what you say is corrrect but MR.sqlcode1.but the file is created by a REXX routine whhich is being used by many other 100 jobs in common.so i was not planning to change it in REXX.
thank you for the code.
will let you know if i need any more info.
Hi MR.sqlcode1
as the file LRECL was 100 i have changed the following in the above code.
"
OUTFIL REMOVECC,OMIT=(109,1,ZD,EQ,1),BUILD=(1,100),
"
but when i have submitted the job the out put file is comming as follows.
***********outfile****************
215.264.***.**
MANFTP01-01
MANMAN01
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IFCLITYP' +
KKMS\MSP\ifclityp.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.ITRANS' +
KKMS\MSP\itrans.cms
locsite TRAILingblanks
KKMS\MSP\ibenprod.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IPRVIDR' +
KKMS\MSP\iprvidr.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IPRVIDRA' +
KKMS\MSP\iprvidra.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IPRVIDRH' +
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IPRVIDRG' +
KKMS\MSP\iprvidrg.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMCNT' +
KKMS\MSP\imemcnt.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMRELN' +
KKMS\MSP\imemreln.cms
PUT 'DR.DAT.PG5903.N207.IMEMCVR' +
KKMS\MSP\imemcvr.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMPCPH' +
KKMS\MSP\imempcph.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMCVRO' +
KKMS\MSP\imemcvro.cms
locsite TRAILingblanks
KKMS\MSP\ifilelst.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IFCLITYA' +
KKMS\MSP\ifclitya.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IFCLITY' +
KKMS\MSP\ifclity.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMBER' +
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IBENGRP' +
KKMS\MSP\ibengrp.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IBENEFIT' +
KKMS\MSP\ibenefit.cms
KKMS\MSP\imember.cms
QUIT
****************end********************
the IFILELST is not coming at the last it is getting deleted and some records have become irregular.
for each file the format is as follows
1) first line comes locsite
2)second line come PUT
3) line comes KKMS
4) locsite command is commonf for all files.
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IFCLITYP' +
KKMS\MSP\ifclityp.cms
could you pls let me know what changes need to be made.
Bahugun,
Not sure why you are not getting appropriate results, when I submitted the job changing BUILD=(1,100), it still worked for me. The only reason I kept it to 80 byte was because generally FTP cards are 80 bytes but that's the standard at our shop.
Regardless, please make sure you copied sort card as is, and if possible, please post your entire jcl as is, and sysout message from the job.
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
Quote:
215.***.124.21
MA****-01
MA****01
I hope this FTP IP, userid and password are not real.
Else it would be inviting a hacker into your house with both arms open. People get terminated for revealing these kind of information. Even the IP address with some social engineering would suffice a hacker.
Bahugun,
Please use code tags from next time onwards. I don't see SYSOUT posted here. Your code doesn't look wrong and again, when I run the same sort card with the input you provided earlier, I am getting correct results.
Keep in mind that the sort card, I gave was for IFILELST only. Also, could you please make sure that LOCSITE and QUIT command (or any command in your input file) actually starts at 1st position and NOT at the second position or somewhere else?
hi,
yes the i need sort card for IFILELST only.
the below is the SYSOUT
********************************* TOP OF DATA ***************
215.264.124.21
MANFTP01-01
MANMAN01
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IFCLITYP' +
KKMS\STA\ifclityp.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.ITRANS' +
KKMS\STA\itrans.cms
locsite TRAILingblanks
KKMS\STA\ibenprod.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IPRVIDR' +
KKMS\STA\iprvidr.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IPRVIDRA' +
KKMS\STA\iprvidra.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IPRVIDRH' +
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IPRVIDRG' +
KKMS\STA\iprvidrg.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMCNT' +
KKMS\STA\imemcnt.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMRELN' +
KKMS\STA\imemreln.cms
PUT 'DR.DAT.PG5903.N207.IMEMCVR' +
KKMS\STA\imemcvr.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMPCPH' +
KKMS\STA\imempcph.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMCVRO' +
KKMS\STA\imemcvro.cms
locsite TRAILingblanks
KKMS\STA\ifilelst.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IFCLITYA' +
KKMS\STA\ifclitya.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5902.N207.IFCLITY' +
KKMS\STA\ifclity.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IMEMBER' +
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IBENGRP' +
KKMS\STA\ibengrp.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N207.IBENEFIT' +
KKMS\STA\ibenefit.cms
KKMS\STA\imember.cms
QUIT
******************************** BOTTOM OF DATA
pls have a look at the bold and underlined.
some times the "locsite" or PUT or KKMS lines are jublined up.
Bahugun,
I apologize for wasting your time earlier. My profile was accidently set to CAPS ON and I literally tested my code with everything in caps. I didn't notice that your card had small letters and sort card was missing logic to accomodate that.