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
 
trailer record with date fields-getting error.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Thu Mar 22, 2007 7:05 pm    Post subject: trailer record with date fields-getting error.
Reply with quote

Hi..

I want to insert only one row in a file having below details

Filename , current date,record count,currentdate-1 day

and other requirement (another new control card)

Filename , current date,record count,currentdate-1 month

lrecl = 71
ex..

test.file.name ,20070322, 9045,20070321

i used the below card but getting syntax error ..




Code:
 SORT FIELDS=(1,2,CH,A)                                           
 OUTFIL TRAILER1=('TEST.FILE.NAME',45:',',                       
 DATE=(4MD),',',COUNT=(M12,LENGTH=8),',',DATE=(4MD)-1),NODETAIL 
                                        $
SYNTAX ERROR                                                     
C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E7-K90000                 
END OF DFSORT                                         




thanks,
Deepa
Back to top
View user's profile Send private message

Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Thu Mar 22, 2007 8:04 pm    Post subject:
Reply with quote

just came to know that we can't use date manipulation in trailer and header.

any other way to achieve this?
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: Thu Mar 22, 2007 8:51 pm    Post subject:
Reply with quote

You can create a symbol for the current date - 1 day and then use that symbol in your TRAILER1 operand, e.g.

Code:

//S1  EXEC PGM=ICEMAN                                           
//SYSOUT DD SYSOUT=*                                             
//SORTIN   DD *                                                 
RECORD                                                           
//SORTOUT DD SYSOUT=*                                           
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS) 
//SYSIN    DD *                                                 
  OPTION COPY                                                   
  INREC BUILD=(C'DTM1,''',DATE1-1,C'''',80:X)                   
/*
//S2  EXEC PGM=ICEMAN
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
...
   OUTFIL TRAILER1=(...,DTM1,...)
/*
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 Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 0 Tue Sep 26, 2017 3:07 am
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 FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 5 Thu Sep 07, 2017 6:02 pm

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