View previous topic :: View next topic
|
Author |
Message |
Deborah Shugerts
New User
Joined: 14 Oct 2009 Posts: 10 Location: A Florida Cubicle...
|
|
|
|
I have a file RECFM=VBA LRECL=4100 BLKSIZE=4104 in which I want to 'drop' records with a certain date. The date is in YYDDD julian date format starting in position 17 for 3 bytes. In the example below, the date would be 11152F (06/01/11) for RECORD1 and 11171F (06/20/11) for RECORD2.
Input (with HEX ON):
RECORD 1
/CT...j................
6CE03292112032221120000
1330591015F0597015F0000
RECORD 2
.CT.íêØ.....í&î........
2CE25582111255521110000
A333520017F3506017F0000
I want to 'drop' any records for julian date 11171 and write all the other records to MY.OUTPUT.FILE
I have tried several combinations for my INCLUDE statement (PD0, BI and Y2U). Also tried using a starting position of 21 because the first data byte of a variable length record has a relative position of 5. None of these attempts has worked.
Code: |
//SORTSTEP EXEC PGM=SYNCTOOL
//DFSMSG DD SYSOUT=*
//STATIN DD DISP=SHR,DSN=MY.INPUT.FILE
//STATOUT DD DISP=SHR,DSN=MY.OUTPUT.FILE
//CON1CNTL DD *
INCLUDE COND=(17,3,BI,NE,X'11171F')
SORT FIELDS=COPY
//TOOLMSG DD SYSOUT=*
//REPORT DD SYSOUT=*
//TOOLIN DD *
SORT FROM(STATIN) TO(STATOUT) USING(CON1)
/* |
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER108I STATIN : RECFM=VBA ; LRECL= 4100; BLKSIZE= 4104
WER073I STATIN : DSNAME=MY.INPUT.FILE
WER110I STATOUT : RECFM=VBA ; LRECL= 4100; BLKSIZE= 4104
WER074I STATOUT : DSNAME=MY.OUTPUT.FILE
WER055I INSERT 0, DELETE 38035
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER054I RCD IN 38035, OUT 0
WER169I RELEASE 1.4 BATCH 0518 TPF LEVEL 0.0
WER052I END SYNCSORT - CDDELETE,SORTSTEP,,DIAG=A400,73C2,882E,0044,ECD2,48CB,0
YT000I SYNCTOOL RELEASE 1.7.0 - COPYRIGHT 2008 SYNCSORT INC.
YT001I INITIAL PROCESSING MODE IS "STOP"
YT002I "TOOLIN" INTERFACE BEING USED
SORT FROM(STATIN) TO(STATOUT) USING(CON1)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0001"
SYT030I OPERATION COMPLETED WITH RETURN CODE 0
SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 0 |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
WER052I END SYNCSORT |
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Deborah Shugerts wrote: |
I have a file RECFM=VBA LRECL=4100 BLKSIZE=4104 in which I want to 'drop' records with a certain date. The date is in YYDDD julian date format starting in position 17 for 3 bytes. In the example below, the date would be 11152F (06/01/11) for RECORD1 and 11171F (06/20/11) for RECORD2.
Input (with HEX ON):
RECORD 1
Code: |
/CT...j................
6CE03292112032221120000
1330591015F0597015F0000 |
RECORD 2
Code: |
.CT.íêØ.....í&î........
2CE25582111255521110000
A333520017F3506017F0000 |
|
(Code tags added.)
The data you show have the dates beginning in position 9 (not counting the RDW), not position 17. Did you miscount nybbles for bytes? |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
Deborah Shugerts,
Quote: |
I have a file RECFM=VBA LRECL=4100 BLKSIZE=4104 |
try
Code: |
INCLUDE COND=(22,3,BI,NE,X'11171F') |
Thanks, |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
Akatsukami,
Looks like OP has same data on 9th position (or 13th including RDW and CC) and 17th position(or 22nd including RDW and CC) when browsed.
Thanks, |
|
Back to top |
|
|
Deborah Shugerts
New User
Joined: 14 Oct 2009 Posts: 10 Location: A Florida Cubicle...
|
|
|
|
There are 2 date fields...end date (starting @ 9th position) and start date (starting @ 17th position). I am only concerned with the pos 17 date for my include/sort. |
|
Back to top |
|
|
Deborah Shugerts
New User
Joined: 14 Oct 2009 Posts: 10 Location: A Florida Cubicle...
|
|
|
|
Thanks so much...INCLUDE COND=(22,3,BI,NE,X'11171F') worked. I guess in my world 17+5 = 21. Sorry for bothering everyone for such a silly mistake. Thanks again. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Sorry for bothering everyone for such a silly mistake. |
Not to worry
Actually, i'm relieved to see that others too are keyboard or arithmetically challenged. |
|
Back to top |
|
|
|