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: 189
Location: INDIA

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: 189
Location: INDIA

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: 189
Location: INDIA

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: 189
Location: INDIA

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: 189
Location: INDIA

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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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