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
 

 

convert the date in file s9(7) comp-3 to x(10)

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

New User


Joined: 22 Apr 2008
Posts: 32
Location: coimbatore

PostPosted: Thu Aug 09, 2012 3:39 pm    Post subject: convert the date in file s9(7) comp-3 to x(10)
Reply with quote

hi,

I want to convert the date in file s9(7) comp-3 to x(10)

file date data:
Code:

    +120229
    +100622
    +80916
    +71004


copybook declaration

Code:
DATESTAMP           PIC S9(7)         COMP-3.
36:53,4,             /*ACTY-TS


o/p file copybook declaration

Code:
ACTY-TS   PIC X(10).


can someone help me with sort

Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Thu Aug 09, 2012 3:54 pm    Post subject: Reply to: convert the date in file s9(7) comp-3 to x(10)
Reply with quote

So you have YYMMDD in your packed-decimal field.

You want YYMMDD in your 10-byte character field, or what?

If not, 54,4,PD,EDIT= and a suitable EDIT mask will get you there, perhaps.

However, without describing the format of your 10-character field, we'll not get much further.
Back to top
View user's profile Send private message
d_sarlie

New User


Joined: 22 Apr 2008
Posts: 32
Location: coimbatore

PostPosted: Thu Aug 09, 2012 4:08 pm    Post subject: Reply to: convert the date in file s9(7) comp-3 to x(10)
Reply with quote

You want YYMMDD in your 10-byte character field, or what? - Yes, I want to convert s9(7) Comp-3 Date field to 10byte character.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Thu Aug 09, 2012 4:34 pm    Post subject:
Reply with quote

I am not an expert but it looks strange to me

Why date field need to be a signed field ?? icon_rolleyes.gif icon_confused.gif
Back to top
View user's profile Send private message
d_sarlie

New User


Joined: 22 Apr 2008
Posts: 32
Location: coimbatore

PostPosted: Thu Aug 09, 2012 4:41 pm    Post subject: Reply to: convert the date in file s9(7) comp-3 to x(10)
Reply with quote

This field and its value I get from upstream
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Thu Aug 09, 2012 4:51 pm    Post subject: Reply to: convert the date in file s9(7) comp-3 to x(10)
Reply with quote

So, go wih the EDIT with a mask. Manual link in the DFOSRT forum and at the top of the page. Many examples here. Just search for EDIT.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Aug 09, 2012 7:29 pm    Post subject:
Reply with quote

Hello,

Now that you have posted 3 times, why have you not shown what you want in the x(10) field icon_confused.gif
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu Aug 09, 2012 9:39 pm    Post subject: Reply to: convert the date in file s9(7) comp-3 to x(10)
Reply with quote

d_sarlie,

The input you have shown is 4 byte Y2V(P'yymmdd') format. Use the following control cards. I assumed that your date in PD format is at pos 1 and you need the formatted date at position 20.

Code:

//SYSIN    DD *                                       
  OPTION COPY,Y2PAST=1980                             
  INREC OVERLAY=(20:1,4,Y2V(-))
//*
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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