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
 
Download Packed data in display format

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

New User


Joined: 12 Jun 2008
Posts: 8
Location: Bangalore

PostPosted: Fri Jun 20, 2008 2:44 pm    Post subject: Download Packed data in display format
Reply with quote

I have a huge file with say 280 columns defined in a copybook without any delimiters.

I wish to change this to a delimited file and also wish to convert the packed fields in it to display format.
Back to top
View user's profile Send private message

UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 757
Location: Germany

PostPosted: Fri Jun 20, 2008 3:09 pm    Post subject:
Reply with quote

Morning Sir !

Plse have a look at Sort-options INREC/OUTREC. Also look at the
Mask-Definitions to convert packed-decimal fields.
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 20, 2008 3:49 pm    Post subject: Reply to: Download Packed data in display format
Reply with quote

Code:

//* THIS JCL IS USED TO CONVERT A COMP-3 FIELD TO READABLE FORMAT.       
//* LAYOUT:                                                         
//* 02 RF-CD-TRAN PIC XX.                                           
//* 02 RF-CD-RPT PIC XX.                                           
//* 02 RF-DT-TRAN PIC 9(5) COMP-3.                                 
//* 02 RF-ID-SSN PIC 9(9) COMP-3.                                   
//* THIS JCL CONVERT THE  RF-ID-SSN TO READABLE FORMAT             
//S2    EXEC  PGM=SORT                                             
//SYSOUT    DD  SYSOUT=*                                           
//SORTIN DD DSN=DEV2.RK.TEST(DA11NOW),DISP=SHR                     
//SORTOUT DD DSN=DEV2.RK.TEST(DA11SSN),DISP=SHR                     
//SYSIN    DD    *                                                 
  SORT FIELDS=COPY                                                   
  OUTREC FIELDS=(8,5,PD,EDIT=(TTTTTTTTT))                           
/*                                                                 
//*
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 757
Location: Germany

PostPosted: Fri Jun 20, 2008 4:02 pm    Post subject:
Reply with quote

@ karthikr44 !

He said packed to display, so packed to unpacked Chars, i think.
Easiest way is to use a Mask in Sort.

StartingPosition, Length, PD, M1

M1 = Name of one of the 27 pre-defined edit masks.
M1 = TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTS
-00123 = 00123-

M4 = SII,III,III,III,III,III,III,III,III,IIT.TT
+0123456 = +1,234.56
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: Fri Jun 20, 2008 8:20 pm    Post subject:
Reply with quote

Hello,

For a record with many fields, you may be ahead to create a new copybook that has "displayable" fields rather than packed or binary fields. If you use the sort, it will probably become a pain to track all of the field displacements - even if you use symnames.

After moving (corresponding?) the fields from the input format to the displayable format, you could then string the displayable fields and whatever you want for the delimiter into an output and use that for the download and use in your spreadsheet.
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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