MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to Copy Record until some value is met.
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Tue Dec 09, 2008 9:09 am    Post subject: How to Copy Record until some value is met. Reply with quote

Hi,

How to copy records from an input file until some value is met? We get a daily input file with a max of 20,000 total number of records. The trend of the file has had header records (ERROR - PROCESS CLOSED) anywhere between 15 to 20 at the maximum followed by their detailed records. All put together will form total of 20,000 records.

So, I want to copy records till "ERROR - PROCESS CLOSED" is occured into respective output files.

Input Data:

Code:

ERROR - PROCESS CLOSED
RET0 13 001 XXX48   001 N
RET2 13 001 XXY48   002 T
RET9 13 001 XXZ48   001 T
RET8 13 001 XBX48   002 N
RET9 13 001 XYT48   003 N
ERROR - PROCESS CLOSED
RET1 83 001 XXX48   001 N
RET5 83 001 XXY48   002 T
RET7 83 001 XXZ48   001 T
ERROR - PROCESS CLOSED
RET2 10 001 XXX48   001 N
RET6 10 001 XXY48   002 T
RET1 10 001 XBX48   002 N
RET2 10 001 XYT48   003 N


In this example, I want to create three files out of it.

File-1:
Code:

ERROR - PROCESS CLOSED
RET0 13 001 XXX48   001 N
RET2 13 001 XXY48   002 T
RET9 13 001 XXZ48   001 T
RET8 13 001 XBX48   002 N
RET9 13 001 XYT48   003 N


File-2:
Code:

ERROR - PROCESS CLOSED
RET1 83 001 XXX48   001 N
RET5 83 001 XXY48   002 T
RET7 83 001 XXZ48   001 T


File-3:
Code:

ERROR - PROCESS CLOSED
RET2 10 001 XXX48   001 N
RET6 10 001 XXY48   002 T
RET1 10 001 XBX48   002 N
RET2 10 001 XYT48   003 N


How to achieve it? Please help.

TIA.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Dec 09, 2008 11:25 am    Post subject: Reply with quote

ranga_subham,

You can very easily split using the new WHEN=GROUP function of DFSORT available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

Code:

//STEP0100 EXEC PGM=ICEMAN                                           
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD *                                                     
ERROR - PROCESS CLOSED                                               
RET0 13 001 XXX48   001 N                                           
RET2 13 001 XXY48   002 T                                           
RET9 13 001 XXZ48   001 T                                           
RET8 13 001 XBX48   002 N                                           
RET9 13 001 XYT48   003 N                                           
ERROR - PROCESS CLOSED                                               
RET1 83 001 XXX48   001 N                                           
RET5 83 001 XXY48   002 T                                           
RET7 83 001 XXZ48   001 T                                           
ERROR - PROCESS CLOSED                                               
RET2 10 001 XXX48   001 N                                           
RET6 10 001 XXY48   002 T                                           
RET1 10 001 XBX48   002 N                                           
RET2 10 001 XYT48   003 N                                           
//OUT1     DD SYSOUT=*                                               
//OUT2     DD SYSOUT=*                                               
//OUT3     DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,5,CH,EQ,C'ERROR'),PUSH=(81:ID=2))
  OUTFIL FNAMES=OUT1,INCLUDE=(81,2,ZD,EQ,1),BUILD=(1,80)             
  OUTFIL FNAMES=OUT2,INCLUDE=(81,2,ZD,EQ,2),BUILD=(1,80)             
  OUTFIL FNAMES=OUT3,INCLUDE=(81,2,ZD,EQ,3),BUILD=(1,80)             
/*


If you don't have the July, 2008 PTF installed, ask your System Programmer to install it (it's free).

For complete details on the new WHEN=GROUP and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/

Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Tue Dec 09, 2008 4:37 pm    Post subject: Reply with quote

Hi,
Kolusu What if total number of ERROR statement and hence OUTFIL are unknown?

Is there a way to automate this process so that it will dynamically decide and create datasets?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Dec 09, 2008 6:10 pm    Post subject: Reply with quote

Sqlcode wrote:
Hi,
Kolusu What if total number of ERROR statement and hence OUTFIL are unknown?

Is there a way to automate this process so that it will dynamically decide and create datasets?


Well you can , you can generate the JCL needed for splitting the file dynamically and submit it via INTRDR like shown below. I coded only to handle 99 output files. So if there are more than you need to change it a little bit

Code:

//STEP0100 EXEC PGM=ICEMAN                                 
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD DSN=YOUR INPUT FILE,
//            DISP=SHR                         
//CCOUT    DD DSN=&&C1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//DDOUT    DD DSN=&&D1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//SYSIN    DD *                                                       
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,5,CH,EQ,C'ERROR'),PUSH=(81:ID=2))
  OUTFIL FNAMES=DDOUT,REMOVECC,NODETAIL,BUILD=(80X),                 
  SECTIONS=(81,2,                                                     
  TRAILER3=('//OUT',81,2,4X,'DD DSN=USERID.OUTPUT.FILE',81,2,',',/,   
            '//',12X,'DISP=(NEW,CATLG,DELETE),',/,                   
            '//',12X,'UNIT=SYSDA,',/,                                 
            '//',12X,'SPACE=(CYL(1,1),RLSE),',/,                     
            '//*',80:X))                                             
  OUTFIL FNAMES=CCOUT,REMOVECC,NODETAIL,BUILD=(80X),                 
  SECTIONS=(81,2,                                                     
  TRAILER3=('  OUTFIL FNAMES=OUT',81,2,C',INCLUDE=',                 
            '=(81,2,ZD,EQ,',81,2,'),BUILD=(1,80)',80:X)),             
  TRAILER1=('//*',80:X)                                               
/*                                                                   
//STEP0200 EXEC  PGM=ICEMAN                                         
//SYSOUT   DD SYSOUT=*                                               
//SYSIN    DD *                                                     
   OPTION COPY                                                       
/*                                                                   
//SORTOUT  DD SYSOUT=*                                               
//SORTIN   DD DATA,DLM=$$                                           
//TIDXXXXA JOB 'COPY',                                               
//             CLASS=A,                                             
//             MSGCLASS=Y,                                           
//             MSGLEVEL=(1,1),                                       
//             NOTIFY=TID                                           
//*                                                                 
//STEP0100 EXEC  PGM=ICEMAN                                         
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=YOUR INPUT DSN,                                   
//            DISP=SHR                                               
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,5,CH,EQ,C'ERROR'),PUSH=(81:ID=2))
$$                                                                   
//         DD DSN=&&C1,DISP=(OLD,PASS)                               
//         DD DSN=&&D1,DISP=(OLD,PASS)                               
/*


This will generate the JCL as follows

Code:

//TIDXXXXA JOB 'COPY',                                               
//             CLASS=A,                                             
//             MSGCLASS=Y,                                           
//             MSGLEVEL=(1,1),                                       
//             NOTIFY=TID                                           
//*                                                                 
//STEP0100 EXEC  PGM=ICEMAN                                         
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=YOUR INPUT DSN,                                   
//            DISP=SHR                                               
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,5,CH,EQ,C'ERROR'),PUSH=(81:ID=2))
  OUTFIL FNAMES=OUT01,INCLUDE==(81,2,ZD,EQ,01),BUILD=(1,80)         
  OUTFIL FNAMES=OUT02,INCLUDE==(81,2,ZD,EQ,02),BUILD=(1,80)         
  OUTFIL FNAMES=OUT03,INCLUDE==(81,2,ZD,EQ,03),BUILD=(1,80)         
//*                                                                 
//OUT01    DD DSN=USERID.OUTPUT.FILE01,                             
//            DISP=(NEW,CATLG,DELETE),                               
//            UNIT=SYSDA,                                           
//            SPACE=(CYL(1,1),RLSE),                                 
//*                                                                 
//OUT02    DD DSN=USERID.OUTPUT.FILE02,                             
//            DISP=(NEW,CATLG,DELETE),                               
//            UNIT=SYSDA,                                           
//            SPACE=(CYL(1,1),RLSE),                                 
//*                                                                 
//OUT03    DD DSN=USERID.OUTPUT.FILE03,                             
//            DISP=(NEW,CATLG,DELETE),                               
//            UNIT=SYSDA,                                           
//            SPACE=(CYL(1,1),RLSE),                                 
//*                                                                 


once you have verified that the jcl created above is right simply replace this statement in step0200

Code:

//SORTOUT  DD SYSOUT=* 


with
Code:
//SORTOUT  DD SYSOUT=(*,INTRDR)


This will submit the generated JCL which does the split.

Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Wed Dec 10, 2008 1:09 am    Post subject: Reply with quote

Hats off to Kolusu...... Very Happy

That was very quick...... Surprised

Thank you.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Thu Dec 11, 2008 5:49 am    Post subject: How to suite this for SYNCSORT? Reply with quote

Alissa, how to alter Kolusu's solution for SYNCSORT? Confused Surprised

We use SYNCSORT v1.2 and I tried Kolusu's solution but it failed because WHEN=GROUP is not supported Sad

Please post the SYNCSORT version for this. Rolling Eyes

Thanks.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Thu Dec 11, 2008 10:41 am    Post subject: Reply with quote

Hi,

Sorry for the late reply to appreciate help offered by Kolusu,

Wow I was trying to use SYMNAMES to create SORTCONTROL card but couldn't think of anything when it came to handle DD statements in JCL.

Thanks Kolusu.
Back to top
View user's profile Send private message
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Thu Dec 11, 2008 3:13 pm    Post subject: Reply with quote

MF,

For SyncSort for z/OS 1.3 customers, this functionality will be available shortly. Please feel free to contact me offline if you would like to be included on the early distribution list.

Best Regards,
_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
samlwho
Beginner


Joined: 08 Feb 2007
Posts: 21
Topics: 2

PostPosted: Fri Dec 12, 2008 1:06 pm    Post subject: Reply with quote

Under the following assumptions the sysncsort below will work:
1). The information in positions 07,02 is known. (see profile sort)
2). The header ERROR - PROCESS CLOSED is not needed on each input file


Code:

//DAFORUM  EXEC PGM=SORT,COND=(0,LT)   
//*                               
//SORTIN   DD *                                                       
 ERROR - PROCESS CLOSED                                               
 RET0 13 001 XXX48   001 N                                             
 RET2 13 001 XXY48   002 T                                             
 RET9 13 001 XXZ48   001 T                                             
 RET8 13 001 XBX48   002 N                                             
 RET9 13 001 XYT48   003 N                                             
 ERROR - PROCESS CLOSED                                               
 RET1 83 001 XXX48   001 N                                             
 RET5 83 001 XXY48   002 T                                             
 RET7 83 001 XXZ48   001 T                                             
 ERROR - PROCESS CLOSED                                               
 RET2 10 001 XXX48   001 N                                             
 RET6 10 001 XXY48   002 T                                             
 RET1 10 001 XBX48   002 N                                             
 RET2 10 001 XYT48   003 N   
//*
//*Output Files                                         
//EFILE1   DD SYSOUT=*                                                 
//EFILE2   DD SYSOUT=*                                                 
//EFILE3   DD SYSOUT=*                                                 
//*                                                       
//SYSIN    DD *                                                       
 SORT FIELDS=COPY                                                     
 OUTFIL FNAMES=EFILE1,                                                 
 INCLUDE=(007,002,CH,EQ,C'13')                                         
 OUTFIL FNAMES=EFILE2,                                                 
 INCLUDE=(007,002,CH,EQ,C'83')                                         
 OUTFIL FNAMES=EFILE3,                                                 
 INCLUDE=(007,002,CH,EQ,C'10')                                         
//*                                                                   
//SYSPRINT DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 


Output File 1 or EFILE1
Code:

RET0 13 001 XXX48   001 N                   
RET2 13 001 XXY48   002 T                   
RET9 13 001 XXZ48   001 T                   
RET8 13 001 XBX48   002 N                   
RET9 13 001 XYT48   003 N                   


Output File 2 or EFILE2
Code:

RET1 83 001 XXX48   001 N                   
RET5 83 001 XXY48   002 T                   
RET7 83 001 XXZ48   001 T   


Output File 3 or EFILE3
Code:

RET2 10 001 XXX48   001 N
RET6 10 001 XXY48   002 T
RET1 10 001 XBX48   002 N
RET2 10 001 XYT48   003 N



Profile Sort - This sort will create a report of the various digits in positions 7, 2 of the input file. The information obtained here could be used to construct the previous sort include statements...

Code:

//PROFILE  EXEC PGM=SORT,COND=(0,LT)                                   
//SORTIN   DD *                                                       
 ERROR - PROCESS CLOSED                                               
 RET0 13 001 XXX48   001 N                                             
 RET2 13 001 XXY48   002 T                                             
 RET9 13 001 XXZ48   001 T                                             
 RET8 13 001 XBX48   002 N                                             
 RET9 13 001 XYT48   003 N                                             
 ERROR - PROCESS CLOSED                                               
 RET1 83 001 XXX48   001 N                                             
 RET5 83 001 XXY48   002 T                                             
 RET7 83 001 XXZ48   001 T                                             
 ERROR - PROCESS CLOSED                                               
 RET2 10 001 XXX48   001 N                                             
 RET6 10 001 XXY48   002 T                                             
 RET1 10 001 XBX48   002 N                                             
 RET2 10 001 XYT48   003 N                                             
//*                                                                   
//SORTOF1 DD SYSOUT=*                                                 
//SYSIN    DD *                                                       
 INREC FIELDS=(07,2,C'0000001')                                       
 INCLUDE COND=(008,1,CH,NE,C'-')  *EXCLUDE THE '-' IN 'ERROR - PROCESS'
  SORT FIELDS=(1,2,CH,A)                                   
  SUM FIELDS=(3,7,ZD)                                       
  OUTFIL FILES=1,                                           
         OUTREC=(03:1,2,                                   
                 20:3,7,ZD,EDIT=(I,III,TTT),               
                 80:C' '),                                 
        HEADER2=(10:'ERROR TOTAL '//,                       
                 01:'ERROR CODE  ',                         
                 23:'OCCURENCES'/),                         
        TRAILER1=(01/,                                     
                  01:'TOTAL ERROR TYPES  :',COUNT)         
//*                                                         
//SYSPRINT DD SYSOUT=*                                     
//SYSUDUMP DD SYSOUT=*                                     
//SYSOUT   DD SYSOUT=*       


Results
Code:

         ERROR TOTAL           
                               
ERROR CODE            OCCURENCES
                               
  10                     004   
  13                     005   
  83                     003   
                               
TOTAL ERROR TYPES  :       3   




...I hope this helps -- MP22
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Dec 12, 2008 1:18 pm    Post subject: Reply with quote

samlwho wrote:
Under the following assumptions the sysncsort below will work:
1). The information in positions 07,02 is known. (see profile sort)


Are you assuming that the 7,2 position is same for all the detail records under a header? what happens if the input data is like this?


Code:

 ERROR - PROCESS CLOSED
 RET0 01 001 XXX48   001 N
 RET2 02 001 XXY48   002 T
 RET9 03 001 XXZ48   001 T
 RET8 04 001 XBX48   002 N
 RET9 05 001 XYT48   003 N
 ERROR - PROCESS CLOSED   
 RET1 01 001 XXX48   001 N
 RET5 02 001 XXY48   002 T
 RET7 03 001 XXZ48   001 T
 ERROR - PROCESS CLOSED
 RET2 01 001 XXX48   001 N
 RET6 02 001 XXY48   002 T
 RET1 03 001 XBX48   002 N
 RET2 04 001 XYT48   003 N

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
samlwho
Beginner


Joined: 08 Feb 2007
Posts: 21
Topics: 2

PostPosted: Fri Dec 12, 2008 1:46 pm    Post subject: Reply with quote

The previous sort would still work assuming that all of the possible combinations for positions 7,2 are defined in the includes. Because syncsort will not use the location of a record to determine which file to write to, instead, the includes will be used to determine which output file to write.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Dec 12, 2008 1:58 pm    Post subject: Reply with quote

samlwho wrote:
The previous sort would still work assuming that all of the possible combinations for positions 7,2 are defined in the includes. Because syncsort will not use the location of a record to determine which file to write to, instead, the includes will be used to determine which output file to write.


samlwho,

NO. it would not work. ex:


Code:

//STEP0100 EXEC PGM=ICEMAN                             
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *                                         
 ERROR - PROCESS CLOSED                                 
 RET0 01 001 XXX48   001 N - GOES TO OUTPUT FILE 1     
 RET2 02 001 XXY48   002 T - GOES TO OUTPUT FILE 1     
 RET9 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 1     
 RET8 04 001 XBX48   002 N - GOES TO OUTPUT FILE 1     
 RET9 05 001 XYT48   003 N - GOES TO OUTPUT FILE 1     
 ERROR - PROCESS CLOSED                                 
 RET1 01 001 XXX48   001 N - GOES TO OUTPUT FILE 2     
 RET5 02 001 XXY48   002 T - GOES TO OUTPUT FILE 2     
 RET7 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 2     
 ERROR - PROCESS CLOSED                                 
 RET2 01 001 XXX48   001 N - GOES TO OUTPUT FILE 3     
 RET6 02 001 XXY48   002 T - GOES TO OUTPUT FILE 3     
 RET1 03 001 XBX48   002 N - GOES TO OUTPUT FILE 3     
 RET2 04 001 XYT48   003 N - GOES TO OUTPUT FILE 3     
//*                                                     
//*OUTPUT FILES                                         
//EFILE1   DD SYSOUT=*                                 
//EFILE2   DD SYSOUT=*                                 
//EFILE3   DD SYSOUT=*                                 
//EFILE4   DD SYSOUT=*                                 
//EFILE5   DD SYSOUT=*                                 
//SYSIN    DD *                 
 SORT FIELDS=COPY               
 OUTFIL FNAMES=EFILE1,         
 INCLUDE=(007,002,CH,EQ,C'01') 
 OUTFIL FNAMES=EFILE2,         
 INCLUDE=(007,002,CH,EQ,C'02') 
 OUTFIL FNAMES=EFILE3,         
 INCLUDE=(007,002,CH,EQ,C'03') 
 OUTFIL FNAMES=EFILE4,         
 INCLUDE=(007,002,CH,EQ,C'04') 
 OUTFIL FNAMES=EFILE5,         
 INCLUDE=(007,002,CH,EQ,C'05') 
//*


the output files are

EFILE1
Code:

 RET0 01 001 XXX48   001 N - GOES TO OUTPUT FILE 1
 RET1 01 001 XXX48   001 N - GOES TO OUTPUT FILE 2
 RET2 01 001 XXX48   001 N - GOES TO OUTPUT FILE 3


EFILE2

Code:

 RET2 02 001 XXY48   002 T - GOES TO OUTPUT FILE 1 
 RET5 02 001 XXY48   002 T - GOES TO OUTPUT FILE 2 
 RET6 02 001 XXY48   002 T - GOES TO OUTPUT FILE 3 


EFILE3
Code:

 RET9 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 1   
 RET7 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 2   
 RET1 03 001 XBX48   002 N - GOES TO OUTPUT FILE 3   


EFILE4
Code:

 RET8 04 001 XBX48   002 N - GOES TO OUTPUT FILE 1
 RET2 04 001 XYT48   003 N - GOES TO OUTPUT FILE 3


EFILE5
Code:

 RET9 05 001 XYT48   003 N - GOES TO OUTPUT FILE 1


if you use

Code:

//SYSIN    DD *                           
 SORT FIELDS=COPY                         
 OUTFIL FNAMES=EFILE1,                     
 INCLUDE=(007,002,SS,EQ,C'01,02,03,04,05')
 OUTFIL FNAMES=EFILE2,                     
 INCLUDE=(007,002,SS,EQ,C'01,02,03,04,05')
 OUTFIL FNAMES=EFILE3,                     
 INCLUDE=(007,002,SS,EQ,C'01,02,03,04,05')


you would get

EFILE1
Code:

RET0 01 001 XXX48   001 N - GOES TO OUTPUT FILE 1
RET2 02 001 XXY48   002 T - GOES TO OUTPUT FILE 1
RET9 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 1
RET8 04 001 XBX48   002 N - GOES TO OUTPUT FILE 1
RET9 05 001 XYT48   003 N - GOES TO OUTPUT FILE 1
RET1 01 001 XXX48   001 N - GOES TO OUTPUT FILE 2
RET5 02 001 XXY48   002 T - GOES TO OUTPUT FILE 2
RET7 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 2
RET2 01 001 XXX48   001 N - GOES TO OUTPUT FILE 3
RET6 02 001 XXY48   002 T - GOES TO OUTPUT FILE 3
RET1 03 001 XBX48   002 N - GOES TO OUTPUT FILE 3
RET2 04 001 XYT48   003 N - GOES TO OUTPUT FILE 3


EFILE2

Code:

RET0 01 001 XXX48   001 N - GOES TO OUTPUT FILE 1
RET2 02 001 XXY48   002 T - GOES TO OUTPUT FILE 1
RET9 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 1
RET8 04 001 XBX48   002 N - GOES TO OUTPUT FILE 1
RET9 05 001 XYT48   003 N - GOES TO OUTPUT FILE 1
RET1 01 001 XXX48   001 N - GOES TO OUTPUT FILE 2
RET5 02 001 XXY48   002 T - GOES TO OUTPUT FILE 2
RET7 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 2
RET2 01 001 XXX48   001 N - GOES TO OUTPUT FILE 3
RET6 02 001 XXY48   002 T - GOES TO OUTPUT FILE 3
RET1 03 001 XBX48   002 N - GOES TO OUTPUT FILE 3
RET2 04 001 XYT48   003 N - GOES TO OUTPUT FILE 3


EFILE3

Code:

 RET0 01 001 XXX48   001 N - GOES TO OUTPUT FILE 1
 RET2 02 001 XXY48   002 T - GOES TO OUTPUT FILE 1
 RET9 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 1
 RET8 04 001 XBX48   002 N - GOES TO OUTPUT FILE 1
 RET9 05 001 XYT48   003 N - GOES TO OUTPUT FILE 1
 RET1 01 001 XXX48   001 N - GOES TO OUTPUT FILE 2
 RET5 02 001 XXY48   002 T - GOES TO OUTPUT FILE 2
 RET7 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 2
 RET2 01 001 XXX48   001 N - GOES TO OUTPUT FILE 3
 RET6 02 001 XXY48   002 T - GOES TO OUTPUT FILE 3
 RET1 03 001 XBX48   002 N - GOES TO OUTPUT FILE 3
 RET2 04 001 XYT48   003 N - GOES TO OUTPUT FILE 3



whereas OP wanted it as follows

EFILE1

Code:

RET0 01 001 XXX48   001 N - GOES TO OUTPUT FILE 1 
RET2 02 001 XXY48   002 T - GOES TO OUTPUT FILE 1 
RET9 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 1 
RET8 04 001 XBX48   002 N - GOES TO OUTPUT FILE 1 
RET9 05 001 XYT48   003 N - GOES TO OUTPUT FILE 1 


EFILE2

Code:

RET1 01 001 XXX48   001 N - GOES TO OUTPUT FILE 2
RET5 02 001 XXY48   002 T - GOES TO OUTPUT FILE 2
RET7 03 001 XXZ48   001 T - GOES TO OUTPUT FILE 2


EFILE3
Code:

RET2 01 001 XXX48   001 N - GOES TO OUTPUT FILE 3
RET6 02 001 XXY48   002 T - GOES TO OUTPUT FILE 3
RET1 03 001 XBX48   002 N - GOES TO OUTPUT FILE 3
RET2 04 001 XYT48   003 N - GOES TO OUTPUT FILE 3

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
samlwho
Beginner


Joined: 08 Feb 2007
Posts: 21
Topics: 2

PostPosted: Fri Dec 12, 2008 2:34 pm    Post subject: Reply with quote

I am not sure why you say it would not work before proving that it does via your example. As shown in your example, regardless of the record location on the file, the result was 5 files with unique values in positions 7,2...that is what's desired, right?

Please elaborate.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Dec 12, 2008 4:02 pm    Post subject: Reply with quote

samlwho wrote:
I am not sure why you say it would not work before proving that it does via your example. As shown in your example, regardless of the record location on the file, the result was 5 files with unique values in positions 7,2...that is what's desired, right?

Please elaborate.


*Sigh* did you read my last post clearly ? I have shown the results your job would produce and also what OP wants
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
samlwho
Beginner


Joined: 08 Feb 2007
Posts: 21
Topics: 2

PostPosted: Sun Dec 14, 2008 8:44 am    Post subject: Reply with quote

My fault, you are correct - I misread your reply but now, I undertsand what you are saying and what I submitted will not achieve the objective...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group