View previous topic :: View next topic
|
Author |
Message |
subarna roy
New User
Joined: 07 Dec 2007 Posts: 16 Location: mumbai
|
|
|
|
Hi
I am using an input file where there are transaction details , total number of transaction and then some default( containing genaral information) lines like materials copy rigt etc.
this default line consists of total 8 line.
The number of transactions and transaction detail can vary.
but those 8 lines are constant.
Now dont want those 8 lines in the output file.
Please help |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What product / utility were you considering using to achieve this ? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Try sorting in reverse order (inrec add a seqnum) and sort back with an 8 record skip. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
subarna roy wrote: |
then some default( containing genaral information) lines like materials copy rigt etc.
this default line consists of total 8 line.
Now dont want those 8 lines in the output file.
Please help |
Why do you want to remove the "copy rigt" information. |
|
Back to top |
|
|
subarna roy
New User
Joined: 07 Dec 2007 Posts: 16 Location: mumbai
|
|
|
|
Hi
As per business need we need to remove those genaral information.
Sorting in reverse order and then skip the 8 records is not acceptable by the client.
regards
Subarna |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
subarna roy wrote: |
Sorting in reverse order and then skip the 8 records is not acceptable by the client. |
Then, unless you can identify the 8 lines for a sort omit, you will have to do it programmatically..... |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
A tiny REXX:
Code: |
ADDRESS TSO "EXECIO * DISKR input (STEM IN. FINIS"
ADDRESS TSO "EXCEIO "IN.0 - 8" DISKW output (STEM IN. FINIS" |
O. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If the data contains some copyright notification, i suggest your management needs to sign something that this is being intentioinally removed.
Whoever holds the copyright may well find this unacceptable - indeed maybe even actionable.
Quote: |
As per business need we need to remove those genaral information. |
Falsely presenting this by removing the copyright is not a business need. . . |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
try a search for all terms on:-
Code: |
TRAILER1=(' OPTION STOPAFT=',COUNT-
|
Gerry |
|
Back to top |
|
|
shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
Hi subarna roy,
Please check with the following code for your requirement.
The following code has the logic suggested by gcicchet.
Code: |
// EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//INFILE DD DSN=INFILE,DISP=SHR
//TOOLIN DD *
COUNT FROM(INFILE) LOWER(8) RC4
/*
// IF (RC = 0) THEN
// EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//INFILE DD DSN=INFILE,DISP=SHR
/*
//CTL2CNTL DD DSN=&&T,DISP=(,DELETE)
//OUTFILE DD SYSOUT=*
//TOOLIN DD *
COPY FROM(INFILE) TO(CTL2CNTL) USING(CTL1)
COPY FROM(INFILE) TO(OUTFILE) USING(CTL2)
/*
//CTL1CNTL DD *
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(C' OPTION STOPAFT=',COUNT-8=(M11))
/*
// ELSE
// IF (RC = 4) THEN
// EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD *
INPUT FILE HAS LESS THAN OR EQUALS TO 8 RECORDS
/*
//SYSUT2 DD SYSOUT=*
// ENDIF
// ENDIF |
Thanks,
Shankar |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can do this kind of thing quite easily using the new SUBSET operator of DFSORT's ICETOOL available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008):
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DISP=... output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) INPUT REMOVE LAST(8)
/*
|
For complete details on the new SUBSET function and the other new functions available with PTF UK90013, see:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
You can use FILEAID to get this done easily, if you have it in your shop and ofcourse if it is acceptable by the client.
Thanks,
Arun |
|
Back to top |
|
|
|