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

Trouble Determining INCLUDE Statement For Date In VBA File


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Deborah Shugerts

New User


Joined: 14 Oct 2009
Posts: 10
Location: A Florida Cubicle...

PostPosted: Tue Jun 21, 2011 10:46 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 21, 2011 10:53 pm
Reply with quote

Quote:
WER052I END SYNCSORT
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Jun 21, 2011 11:32 pm
Reply with quote

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

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Jun 21, 2011 11:33 pm
Reply with quote

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

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Jun 21, 2011 11:36 pm
Reply with quote

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
View user's profile Send private message
Deborah Shugerts

New User


Joined: 14 Oct 2009
Posts: 10
Location: A Florida Cubicle...

PostPosted: Tue Jun 21, 2011 11:45 pm
Reply with quote

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
View user's profile Send private message
Deborah Shugerts

New User


Joined: 14 Oct 2009
Posts: 10
Location: A Florida Cubicle...

PostPosted: Tue Jun 21, 2011 11:49 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 22, 2011 9:19 am
Reply with quote

Hello,

Quote:
Sorry for bothering everyone for such a silly mistake.
Not to worry icon_smile.gif

Actually, i'm relieved to see that others too are keyboard or arithmetically challenged.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top