IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To move the records to the end of the file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Wed Aug 10, 2011 6:26 pm
Reply with quote

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)

thanks in advance
Bahugun
Back to top
View user's profile Send private message
Soumik Das

New User


Joined: 06 Aug 2011
Posts: 25
Location: India

PostPosted: Wed Aug 10, 2011 7:25 pm
Reply with quote

Can you show us the JCL please..as I am really doubting whether it is a DFSORT?ICETOOL issue.

Is the FTP command parm dynamically created? If it is static then you can just alter the order of the PUT commands. Something like this.

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.PG5903.N201.ITRANS' +
KKMS\MSP\itrans.cms
locsite TRAILingblanks
PUT 'DR.DAT.PG5903.N201.IMEMPCPH' +
CCMS\MSP\imempcph.cms
PUT 'DR.DAT.PG5904.N201.IFILELST' +
KKMS\MSP\ifilelst.cms
locsite TRAILingblanks
QUIT


Looks like a non-brainer to me. Let me know how it goes
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Wed Aug 10, 2011 7:34 pm
Reply with quote

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.

thank you.
Back to top
View user's profile Send private message
Soumik Das

New User


Joined: 06 Aug 2011
Posts: 25
Location: India

PostPosted: Wed Aug 10, 2011 7:42 pm
Reply with quote

Ok..what you are trying should work.

But if you are overriding the parm at the FTP step. Why the confusing approach before that?

Is another job creating the FTP commands for you?
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Wed Aug 10, 2011 7:55 pm
Reply with quote

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?

However, see if below job works for you.
Code:
//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                             
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                                                         
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
 INREC IFTHEN=(WHEN=INIT,OVERLAY=(101:C'0')),               
       IFTHEN=(WHEN=GROUP,BEGIN=(1,100,SS,EQ,C'.IFILELST'), 
                            END=(1,7,CH,EQ,C'LOCSITE'),     
                          PUSH=(101:ID=1)),                 
       IFTHEN=(WHEN=(01,04,CH,EQ,C'QUIT'),OVERLAY=(101:C'9'))
 SORT FIELDS=(101,1,ZD,A),EQUALS                             
 OUTFIL BUILD=(1,100)                                       
/*                                                           

OUTPUT
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.PG5903.N201.ITRANS' +   
KKMS\MSP\ITRANS.CMS                 
LOCSITE TRAILINGBLANKS             
PUT 'DR.DAT.PG5903.N201.IMEMPCPH' +
CCMS\MSP\IMEMPCPH.CMS               
PUT 'DR.DAT.PG5904.N201.IFILELST' +
KKMS\MSP\IFILELST.CMS               
LOCSITE TRAILINGBLANKS             
QUIT                               


Thanks,
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Wed Aug 10, 2011 7:58 pm
Reply with quote

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
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Wed Aug 10, 2011 8:06 pm
Reply with quote

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.
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Fri Aug 12, 2011 6:40 pm
Reply with quote

Hi MR.sqlcode1
when i take the above code and do the below changes the logic is not working.

Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=TSUEEEZ.PRD.STA.JOB.PARM,DISP=SHR       
//SORTOUT  DD DSN=TSUEEEZ.PRD.STA.JOB.PARMOUT,DISP=SHR   
//SYSIN    DD *                                               
 INREC IFTHEN=(WHEN=INIT,OVERLAY=(101:C'0')),                 
       IFTHEN=(WHEN=GROUP,BEGIN=(1,7,CH,EQ,C'LOCSITE'),       
                            END=(1,100,SS,EQ,C'.IFILELST'),   
                          PUSH=(101:ID=1)),                   
       IFTHEN=(WHEN=(01,04,CH,EQ,C'QUIT'),OVERLAY=(101:C'9')) 
 SORT FIELDS=(101,1,ZD,A),EQUALS                               
 OUTFIL BUILD=(1,100)                                         
/*                     


the data present in the input file is as follows.

Code:

(TSUEEEZ.PRD.STA.JOB.PARM)
*********************start************************
215.264.***.**
manftp01-01
manman01
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5902.N201.IFCLITY'      +
KKMS\SAT\ifclity.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5902.N201.IFCLITYP'     +
KKMS\SAT\ifclityp.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5902.N201.IPRVIDRG'     +
KKMS\SAT\iprvidrg.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5901.N201.IBENPROD'     +
KKMS\SAT\ibenprod.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5902.N201.IPRVIDRA'     +
KKMS\SAT\iprvidra.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5902.N201.IPRVIDR'      +
KKMS\SAT\iprvidr.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5902.N201.IPRVIDRH'     +
KKMS\SAT\iprvidrh.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5902.N201.IFCLITYA'     +
KKMS\SAT\ifclitya.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5904.N201.IFILELST'     +
KKMS\SAT\ifilelst.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.ITRANS'       +
KKMS\SAT\itrans.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.IMEMPCPH'     +
KKMS\SAT\imempcph.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.IMEMCVR'      +
KKMS\SAT\imemcvr.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.IMEMBER'      +
KKMS\SAT\imember.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.IMEMCNT'      +
KKMS\SAT\imemcnt.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.IMEMRELN'     +
KKMS\SAT\imemreln.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.IMEMCVRO'     +
KKMS\SAT\imemcvro.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.IBENEFIT'     +
KKMS\SAT\ibenefit.cms
 locsite TRAILingblanks
 PUT 'DR.DAT.PG5903.N201.IBENGRP'      +
KKMS\SAT\ibengrp.cms
QUIT
****************end***********


the starting three reords of the parm are the ip add,useid,and password.
now in the output the last file name that has to be ftped is "IFILELST'"

could you pls let me know where i am doing the mistake.

thank you for your time.
Bahugun
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Sat Aug 13, 2011 1:00 am
Reply with quote

Bahugun,
See if below works. I am assuming that you would have LOCSITE command for all the files.
Code:
//SYSIN    DD *                                                       
 INREC IFTHEN=(WHEN=INIT,OVERLAY=(101:8C'0',SEQNUM,1,ZD)),           
       IFTHEN=(WHEN=GROUP,RECORDS=3,                                 
               BEGIN=(1,7,CH,EQ,C'LOCSITE'),PUSH=(101:ID=8,SEQ=1)),   
       IFTHEN=(WHEN=GROUP,BEGIN=(109,1,ZD,EQ,1),PUSH=(111:1,30)),     
       IFTHEN=(WHEN=(1,100,SS,EQ,C'IFILELST'),OVERLAY=(101:8C'9')),   
       IFTHEN=(WHEN=(1,4,CH,EQ,C'QUIT'),OVERLAY=(101:8C'9'))         
 SORT FIELDS=(101,8,ZD,A),EQUALS                                     
 OUTFIL REMOVECC,OMIT=(109,1,ZD,EQ,1),BUILD=(1,80),                   
                 SECTIONS=(101,8,HEADER3=(111,30,80:X))               
/*                                                                   


OUTPUT
Code:
215.264.***.**                     
MANFTP01-01                         
MANMAN01                           
LOCSITE TRAILINGBLANKS             
PUT 'DR.DAT.PG5902.N201.IFCLITY' + 
KKMS\SAT\IFCLITY.CMS               
LOCSITE TRAILINGBLANKS             
PUT 'DR.DAT.PG5902.N201.IFCLITYP' +
KKMS\SAT\IFCLITYP.CMS               
LOCSITE TRAILINGBLANKS             
PUT 'DR.DAT.PG5902.N201.IPRVIDRG' +
KKMS\SAT\IPRVIDRG.CMS               
LOCSITE TRAILINGBLANKS             
PUT 'DR.DAT.PG5901.N201.IBENPROD' +
KKMS\SAT\IBENPROD.CMS               
LOCSITE TRAILINGBLANKS             
some lines not displayed...
some lines not displayed...
LOCSITE TRAILINGBLANKS               
PUT 'DR.DAT.PG5903.N201.IMEMCVRO' + 
KKMS\SAT\IMEMCVRO.CMS               
LOCSITE TRAILINGBLANKS               
PUT 'DR.DAT.PG5903.N201.IBENEFIT' + 
KKMS\SAT\IBENEFIT.CMS               
LOCSITE TRAILINGBLANKS               
PUT 'DR.DAT.PG5903.N201.IBENGRP' +   
KKMS\SAT\IBENGRP.CMS                 
LOCSITE TRAILINGBLANKS               
PUT 'DR.DAT.PG5904.N201.IFILELST' + 
KKMS\SAT\IFILELST.CMS               
QUIT                                 


Thanks,
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Tue Aug 16, 2011 4:43 pm
Reply with quote

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.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Aug 16, 2011 6:37 pm
Reply with quote

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.

Thanks,
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Aug 16, 2011 6:45 pm
Reply with quote

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.
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Tue Aug 16, 2011 6:45 pm
Reply with quote

THIS IS THE JCL I AM USING

//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=TSUEEEZ.PRD.STA.JOB.PARM,DISP=SHR
//SORTOUT DD DSN=TSUEEEZ.PRD.STA.JOB.PARMOUT,DISP=SHR
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(101:8C'0',SEQNUM,1,ZD)),
IFTHEN=(WHEN=GROUP,RECORDS=3,
BEGIN=(1,7,CH,EQ,C'LOCSITE'),PUSH=(101:ID=8,SEQ=1)),
IFTHEN=(WHEN=GROUP,BEGIN=(109,1,ZD,EQ,1),PUSH=(111:1,30)),
IFTHEN=(WHEN=(1,100,SS,EQ,C'IFILELST'),OVERLAY=(101:8C'9')),
IFTHEN=(WHEN=(1,4,CH,EQ,C'QUIT'),OVERLAY=(101:8C'9'))
SORT FIELDS=(101,8,ZD,A),EQUALS
OUTFIL REMOVECC,OMIT=(109,1,ZD,EQ,1),BUILD=(1,100),
SECTIONS=(101,8,HEADER3=(111,30,80:X))
/*

am i doing any mistake
pls let me know
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Tue Aug 16, 2011 6:46 pm
Reply with quote

all the details specifed are not real.it is just an example i am giving
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Aug 16, 2011 6:55 pm
Reply with quote

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?


Thanks,
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Aug 16, 2011 7:18 pm
Reply with quote

Bahugun,
See if below updated card works...While copying sort card, make sure your profile is set to CAPS OFF.
Code:
//SYSIN    DD *                                                       
 INREC IFTHEN=(WHEN=INIT,OVERLAY=(101:8C'0',SEQNUM,1,ZD)),           
       IFTHEN=(WHEN=GROUP,RECORDS=3,                                 
               BEGIN=(2,7,CH,EQ,C'locsite'),PUSH=(101:ID=8,SEQ=1)),   
       IFTHEN=(WHEN=GROUP,BEGIN=(109,1,ZD,EQ,1),PUSH=(111:1,30)),     
       IFTHEN=(WHEN=(1,100,SS,EQ,C'IFILELST',OR,                     
                     1,100,SS,EQ,C'ifilelst',OR,                     
                     1,4,CH,EQ,C'QUIT'),                             
                    OVERLAY=(101:8C'9'))                             
 SORT FIELDS=(101,8,ZD,A),EQUALS                                     
 OUTFIL REMOVECC,OMIT=(109,1,ZD,EQ,1),BUILD=(1,80),                   
                  SECTIONS=(101,8,HEADER3=(111,30,80:X))             
/*                                                                   

Thanks,
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Tue Aug 16, 2011 7:19 pm
Reply with quote

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.

thank you for your time.
bahugun
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Aug 16, 2011 7:24 pm
Reply with quote

Bahugun,
I gave you updated sort card (Post time :- Tue Aug 16, 2011 7:18 pm), did you try that yet or did our post crossed each other?

Thanks,
Back to top
View user's profile Send private message
Bahugun

New User


Joined: 07 Jul 2010
Posts: 24
Location: hyderabad

PostPosted: Tue Aug 16, 2011 7:26 pm
Reply with quote

hi
great the above code is working.
thanks a lot.
i am really great ful for your help.

thanks for your time.
Bahguun
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Aug 16, 2011 7:43 pm
Reply with quote

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.

Thanks,
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Aug 16, 2011 10:04 pm
Reply with quote

bahugun,

Here is a simpler way to get the desired results. Use the following control cards.

Code:

//SYSIN    DD *                                                       
  OMIT COND=(2,7,CH,EQ,C'LOCSITE',OR,2,7,CH,EQ,C'locsite')           
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(101:C'1')),                       
  IFTHEN=(WHEN=(1,100,SS,EQ,C'IFILELST',OR,1,100,SS,EQ,C'ifilelst',OR,
                1,100,SS,EQ,C'QUIT',OR,1,100,SS,EQ,C'quit'),         
  OVERLAY=(101:C'2'))                                                 
  SORT FIELDS=(101,1,CH,A),EQUALS                                     
  OUTFIL IFOUTLEN=100,IFTHEN=(WHEN=(2,4,CH,EQ,C'PUT '),               
  BUILD=(2:C'locsite TRAILingblanks',/,1,100))                       
//*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top