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: 36
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: 7315

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: 36
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: 1537
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: 36
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: 7315

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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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