Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Include records relative to the current date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 200
Location: USA

PostPosted: Thu Oct 09, 2008 4:08 pm    Post subject: Include records relative to the current date
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: 200
Location: USA

PostPosted: Thu Oct 09, 2008 5:55 pm    Post subject:
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    Post subject: Reply to: Include records relative to the current date
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: 200
Location: USA

PostPosted: Thu Oct 09, 2008 9:52 pm    Post subject: Reply to: Include records relative to the current date
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    Post subject:
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: 200
Location: USA

PostPosted: Thu Oct 09, 2008 10:22 pm    Post subject:
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: 200
Location: USA

PostPosted: Thu Oct 09, 2008 10:57 pm    Post subject:
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    Post subject: Reply to: Include records relative to the current date
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 Moderator


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

PostPosted: Fri Oct 10, 2008 9:35 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us