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

Include records relative to the current date


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Oct 09, 2008 4:08 pm
Reply with quote

I have an input file which is an FB LRECL as 80 and it has only one record which has a number of months like 03 in first 2 positions.

Now I need to read the value from the file and read another VSAM input file of LRECL 128 . Now include records from the file2 which has dates as current date-03(number read from file2). Date format is YYMM.
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Oct 09, 2008 5:55 pm
Reply with quote

Hi Frank/Skolusu

I ahve used currently this code but it is giving me S013 abend.
Code:

//S1   EXEC  PGM=ICEMAN                                         
//SYSOUT  DD  SYSOUT=*                                         
//SORTIN   DD *                                                 
03                                                             
/*                                                             
//SORTOUT  DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *                                                   
  OPTION COPY                                                   
  OUTREC BUILD=(C'CUTOFF,',C'+',1,2)                           
/*                                                             
//S2    EXEC  PGM=ICEMAN                                       
//SYSOUT   DD  SYSOUT=*                                         
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)                         
//SORTIN DD *                                                   
DUMMY                                                           
/*                                                             
//SORTOUT DD SYSOUT=*                                 
//SYSIN    DD    *                                     
  OPTION COPY                                         
  OUTFIL BUILD=(C'  SORT FIELDS=COPY',80:X,/,         
    C'  OUTFIL FILES=01,INCLUDE=(105,8,CH,LT,DATE1-', 
    CUTOFF,TO=ZD,LENGTH=3,C')')                       
/*                                                     
//                                                     


The step S2 is abending with the fllowing message
Code:

ICE185A 0 DFSORT TERMINATED WITH S013  ABEND DURING PHASE   0




Can you please help me in this.


Regards
Amar
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Oct 09, 2008 9:18 pm
Reply with quote

V S Amarendra Reddy,

The reason your job abended is because the symnames dataset should be FB and should have an LRECL of 80 bytes. your first step is not creating 80 byte symbol file.

Here is a DFSORT job which will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                                       
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                 
03                                                               
//SORTOUT  DD DSN=&&T1,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//SYSIN    DD *                                                 
  SORT FIELDS=COPY                                               
  OUTFIL BUILD=(C' SORT FIELDS=COPY',/,                         
                C' INCLUDE COND=(105,8,CH,LT,DATE1-',1,2,C')',80:X)
/*
//STEP0200 EXEC PGM=ICEMAN       
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD DSN=your input vsam file,
//            DISP=SHR
//SORTOUT  DD SYSOUT=*           
//SYSIN    DD DSN=&&T1,DISP=SHR   
/*
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Oct 09, 2008 9:52 pm
Reply with quote

Skolusu,

Thank you very much for the quick solution. But one important point to metion. my date in the VSAM file will be like YYMM (like 0810). So which format supports this means how u want me to change the code?

Please help me in this

Regards
Amar
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Oct 09, 2008 10:13 pm
Reply with quote

V S Amarendra Reddy,

Change the step0100 to the following sysin control cards

Code:

//SYSIN    DD *                                       
  SORT FIELDS=COPY                                   
  OUTFIL BUILD=(C' SORT FIELDS=COPY',/,               
                C' INCLUDE COND=(105,4,Y2T,LT,',       
                C'Y''',C'DATE2''',C'-',1,2,C')',80:X)
/*
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Oct 09, 2008 10:22 pm
Reply with quote

Skolusu,

I tested it but it is abending like this.
Code:

ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0
           SORT FIELDS=COPY                                 
           INCLUDE COND=(1,4,Y2T,LT,Y'DATE2'-03)           
                                            $               
ICE007A E SYNTAX ERROR                                     
ICE052I 3 END OF DFSORT                                     


Please help me in resolving this.

Regards
Amar
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Oct 09, 2008 10:57 pm
Reply with quote

Is our DFSORT release should be upgraded to use this?

Regards
Amar
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Oct 10, 2008 9:08 pm
Reply with quote

V S Amarendra Reddy,

You need to have PTF UK90006 for DFSORT Release 14 , which is available since April, 2006 to be able to use DATEn-r parms

Ask your System Programmer to install it (it's free).
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Oct 10, 2008 9:35 pm
Reply with quote

Note that DFSORT R14 and the z/OS releases it runs on (z/OS 1.4 and below) are no longer supported. Only z/OS DFSORT V1R5 (for z/OS 1.5 through 1.9) and z/OS DFSORT V1R10 (for z/OS 1.10) are currently supported. So your site is way behind the curve.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top