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
 

 

Need help to populate date in COMP-3 format

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

New User


Joined: 21 Jan 2012
Posts: 53
Location: India

PostPosted: Tue Jun 21, 2016 12:25 pm    Post subject: Need help to populate date in COMP-3 format
Reply with quote

Hi

I am trying to create a file with values pre-populated as below.
But for the position 147 which is comp-3 field (length=5) I am not able to populate date in the format YYYYMMDD in comp-3 format. Tried looking at manuals but could not find it. Can you please help or give me pointer.

Here is the code I am using.

Code:


//STEP10   EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DUMMY,RECFM=FB,                                         
//             LRECL=2040,BLKSIZE=18360                               
//SORTOUT  DD DSN=<<file name>>,DISP=(NEW,CATLG,DELETE),         
//             DATACLAS=DSIZC50                                       
//SYSIN    DD *                                                       
 SORT FIELDS=COPY                                                     
 OUTFIL REMOVECC,HEADER1=(10:C'0',19:C'P',24:C'1',81:X'0000000C',     
              85:X'000000000C',90:X'0000000C',94:X'00000001',         
              98:X'0000000C',102:X'000000000C',107:X'0000000C',       
              111:X'00000001',147:DATENS=(4MD),                       
              177:X'00000000',669:C'0120')                             

Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jun 21, 2016 4:03 pm    Post subject:
Reply with quote

The first issue is that COMP-3 is a COBOL term.

Try looking in your manuals for packed decimal instead.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Tue Jun 21, 2016 6:32 pm    Post subject:
Reply with quote

DATE1P
Back to top
View user's profile Send private message
chetanambi

New User


Joined: 21 Jan 2012
Posts: 53
Location: India

PostPosted: Mon Jul 04, 2016 10:31 am    Post subject:
Reply with quote

Thank you. I was able to resolve this using DATE1P as suggested by Rohit
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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
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 Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm


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