IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

HOW CAN I CONVERT SIGND packed decimal TO CHAR USE DFSORT?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1609

PostPosted: Thu Sep 29, 2022 7:21 pm
Reply with quote

haohao wrote:
hello,
I want to convert a file'S signed packed decimal column to displayable and ftp this file from mainframe to unix.
the file's format is:
Code:

01 RECORD
   03  COL-1    PIC X(33).
   03  COL-2    S9(9) COMP.
   03  COL-3    PIC X(16).
   03  COL-4    PIC S9(14)V999 COMP.
   03  COL-5    PIC X(70).


I want to convert that file to this format:
Code:

01 RECORD
   03  COL-1    PIC X(33).
   03  COL-2    +9(6).    (this value always less than 999999)
   03  COL-3    PIC X(16).
   03  COL-4    +9(14).999.
   03  COL-5    PIC X(70).

follow the previously message from this forum,I write the JCL as bellow:
Code:

 //SYSIN     DD *
   OPTION COPY
   INREC FIELDS=(1:1,33,
                 34:34,4,PD,TO=FS,LENGTH=6,
                 40:38,16,
                 56:54,8,PD,EDIT=(SIIIIIIIIIIIIIT.TTT),SIGNS=(,-),
                 75:62,70)

but it abend when executed with S0C7 abend code.


A maintainable in the future solution MUST be like this
Code:
. . . . . .
//SYMNAMES DD  *
COL_1,*,33,CH       PIC X(33).
COL_2,*,4,FI        S9(9) COMP.
COL_3,*,16,CH       PIC X(16).
COL_4,*,17,ZD       PIC S9(14)V999 COMP.
COL_5,*,70,CH       PIC X(70).
//. . . . . .
//SYSIN   DD  *
     SORT FIELDS=COPY       SORT is done BEFORE OUTREC!!!                                   
     OUTREC BUILD=(COL_1,        BUILD= is replacing obsolete FIELDS=                                         
                   COL_2,EDIT=(STTTTTT),SIGNS=(+,-), 
*                          '+' sign is mandatory in your example                     
*                          zero suppression not needed in your example                     
                   COL_3,                                       
                   COL_4,EDIT=(STTTTTTTTTTTTTT.TTT),SIGNS=(+,-),
*                          '+' sign is mandatory in your example                     
*                          zero suppression not needed in your example                     
                   COL_5)                                       
// . . . . .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8651
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 29, 2022 7:48 pm
Reply with quote

Do we really need so much on a topic that was started 13 1/2 years ago? The post reviving the topic should have been a new topic, not a continuation of the original.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1609

PostPosted: Thu Sep 29, 2022 7:51 pm
Reply with quote

Yes, needs to be locked.

Why not lock the old topics automatically? People read topics based on the latest update, do not check all previous thread...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Thu Sep 29, 2022 8:38 pm
Reply with quote

any reason to resurrect a 13 years old topic?
START A NEW ONE from scratch
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2941
Location: NYC,USA

PostPosted: Fri Sep 30, 2022 8:25 am
Reply with quote

Locked..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts How do I get the desired output using... DFSORT/ICETOOL 2
No new posts Select a DB2 value in a specific deci... DB2 4
No new posts String has hex character need to conv... COBOL Programming 3
No new posts How to display the leading zeros of a... DB2 7
No new posts Assembler: Set Program Mask for decim... PL/I & Assembler 4
Search our Forums:

Back to Top