Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Trouble Determining INCLUDE Statement For Date In VBA File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Trouble Determining INCLUDE Statement For Date In VBA File
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: 6968
Location: porcelain throne

PostPosted: Tue Jun 21, 2011 10:53 pm    Post subject:
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: 1775
Location: Bloomington, IL

PostPosted: Tue Jun 21, 2011 11:32 pm    Post subject: Re: Trouble Determining INCLUDE Statement For Date In VBA Fi
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: 578
Location: USA

PostPosted: Tue Jun 21, 2011 11:33 pm    Post subject:
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: 578
Location: USA

PostPosted: Tue Jun 21, 2011 11:36 pm    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Jun 22, 2011 9:19 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us