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
 
Perform airthmetic operations in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Fri Mar 15, 2013 12:06 am    Post subject: Perform airthmetic operations in JCL
Reply with quote

Hi,

I need to check following condition on each record in a mainframe flat file and write only records which satisfies this condition. Can anyone let me know the sort card for achieving this?

Date1 (in CCYY-MM-DD format) - system date (in CCYY-MM-DD format) <= field2 (days).
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Fri Mar 15, 2013 1:52 am    Post subject: Re: Perform airthmetic operations in JCL
Reply with quote

jithumohan wrote:
Hi,

I need to check following condition on each record in a mainframe flat file and write only records which satisfies this condition. Can anyone let me know the sort card for achieving this?

Date1 (in CCYY-MM-DD format) - system date (in CCYY-MM-DD format) <= field2 (days).


1. What is the LRECL and RECFM of the input file?
2. What is the Position of the Date field?
3. What is the position and format of Filed2 which has the days?
4. Last but not least run the following job and show me the complete sysout which helps us determine the level of DFSORT you have.

Code:

//STEP0100 EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD *             
//SORTOUT  DD SYSOUT=*     
//SYSIN    DD *             
  OPTION COPY               
//*
Back to top
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Fri Mar 15, 2013 4:10 am    Post subject:
Reply with quote

Here is the sort card I am using.

SORT FIELDS=COPY
INREC IFOUTLEN=450,IFTHEN=(WHEN=INIT,
OVERLAY=(451:DATE1,360,10,UFF,M10,LENGTH=8,
467:459,8,Y4T,DATEDIFF,451,8,Y4T))
OUTFIL INCLUDE=(467,3,ZD,LE,369,3,ZD)

450 is the record length, RECFM=FB.
Date1 is at position 360
field2 is at position 369

But I am getting syntax error in 467:459,8,Y4T,DATEDIFF,451,8,Y4T))
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 15, 2013 9:50 am    Post subject:
Reply with quote

Quote:
But I am getting syntax error in 467:459,8,Y4T,DATEDIFF,451,8,Y4T))
You also need to execute the code Skolusu show, please do so and post the SYSOUT here.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Sat Mar 16, 2013 12:58 am    Post subject:
Reply with quote

jithumohan wrote:
But I am getting syntax error in 467:459,8,Y4T,DATEDIFF,451,8,Y4T))


Well I am guessing that you are using syncsort, which does not support Y4T, so if you indeed using syncsort then please post your questions in the JCL forum.
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 RFE: Additional compound operators fo... prino PL/I & Assembler 1 Wed Jun 08, 2016 3:31 pm
No new posts FileAid to compare(logical operations... anand1204 Compuware & Other Tools 3 Wed Apr 06, 2016 2:55 am
No new posts How to perform Digest Access Authenti... vasanthz All Other Mainframe Topics 0 Tue Mar 15, 2016 4:47 pm
This topic is locked: you cannot edit posts or make replies. BBC is seeking a Security Operations ... Express Mainframe Jobs 0 Tue Dec 22, 2015 1:20 am
No new posts performing airthmetic with numeric fi... Kmr.deepakcs DFSORT/ICETOOL 2 Thu Oct 24, 2013 5:54 pm

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