MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to view packed decimal values in File AID

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
suma
Beginner


Joined: 23 Jan 2006
Posts: 65
Topics: 29

PostPosted: Fri Dec 29, 2006 2:14 am    Post subject: how to view packed decimal values in File AID Reply with quote

I have one file whose some of the fieds are comp-3 items.. when i tried look thru FileAID..am getting a value as INVALID in the comp-3 fields...
can any tell me how to view these fields..I heard there is way to copy these fields usnig FileAID..does anyone has JCL for this...


Thanks
Suma
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Fri Dec 29, 2006 2:32 am    Post subject: Reply with quote

Try one of these -

You can look at them by doing 'Hex On'.

Create a Cobol Copybook and use it in 'Specify Record Layout ...' in file-aid browse panel.

You can also try XREF in the browse panel.
(I have not used XREF yet, but if you do then let me know the XREF structure.)

Regards,
Diba.
Back to top
View user's profile Send private message Send e-mail
suma
Beginner


Joined: 23 Jan 2006
Posts: 65
Topics: 29

PostPosted: Fri Dec 29, 2006 3:04 am    Post subject: Reply with quote

I wanted to view the exact converted values ....I have already used cobol copybook layout to view it doesn't work..and used Hex on..



thanks
suma
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Fri Dec 29, 2006 3:46 am    Post subject: Reply with quote

Cobol copybook will give you exact converted value, you don't need hex on with it.

Check that -

1 Browse Mode is 'V'.

2 Record Layout Usage is 'S'.

3 Record Layout Dataset name has the Copybook dataset name.

4 Member has the Copybook member name.

5 I don't know why this works but still try -

5.1 At '01' level just define a group name like ' 01 RECORD-STRUCTURE.'
5.2 Define your fields at '05' or some other level within this '01' level.

6 In the copybook define the packed datas with appropriate S9(..) COMP-3.

If answer to all of the above is yes and still you are not getting the result the show the copybook and position and length of the packed field in the data file.

Regards,
Diba.
Back to top
View user's profile Send private message Send e-mail
suma
Beginner


Joined: 23 Jan 2006
Posts: 65
Topics: 29

PostPosted: Fri Dec 29, 2006 5:11 am    Post subject: Reply with quote

I made changes as you said ..plz look into the results....

This is copybook layout.....
Code:

 01 RECORD-STRUCTURE.                                     
     03  VSAM-KEY.                                     
         05  FILL                     PIC X(26).           
     03  field1.                             
                                   
         05  a       PIC X(08).           
         05  b       PIC S9(7) COMP-3.   
         05  c       PIC S9(9)V99  COMP-3.
........................
.........
......
....

This is the fileaid output....
Code:

FILL                       A        B         C             
26/AN                      8/AN     4/PS      6/PS           
(1-26)                     (27-34)  (35-38)   (39-44)       
2------------------------- 4------- 5-------- 6------------ 
********************************* TOP OF DATA ***************
INVALID                    INVALID  INVALID   INVALID       
111111      00000000000000 00012344 INVALID   INVALID       
111111      00000000000000 00012344 INVALID   INVALID       
111111      00000000000000 00012344 INVALID   INVALID       
111111      00000000000000 00012344 INVALID   INVALID       
111111      00000000000000 00012344 INVALID   INVALID       



Thanks
suma
Back to top
View user's profile Send private message
suma
Beginner


Joined: 23 Jan 2006
Posts: 65
Topics: 29

PostPosted: Fri Dec 29, 2006 5:12 am    Post subject: Reply with quote

in the above eg.. b and c are comp-3 items and their records are INVALID...

thanks
suma
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Dec 29, 2006 4:02 pm    Post subject: Reply with quote

suma,

Is your input file a Variable block Cluster? If so you need to consider the RDW. So the actual data starts from pos 5 instead of pos 1 . So change your file aid and add the 4 bytes for the rdw.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Vidyarthi
Beginner


Joined: 12 Jan 2006
Posts: 2
Topics: 1
Location: Hyderabad

PostPosted: Thu Jan 04, 2007 1:54 pm    Post subject: Reply with quote

Kolusu,

Correct me if I am wrong.

I think file aid handles FB or VB files by itself. No extra filler would be required in the copybook for a VB file.
_________________
Cheers !!
Vidyarthi
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Jan 05, 2007 9:34 am    Post subject: Reply with quote

Quote:

Correct me if I am wrong.

I think file aid handles FB or VB files by itself. No extra filler would be required in the copybook for a VB file.

Vidyarthi,

NO. The online file-aid does NOT consider the RDW for vb files. You need to specify it. The batch version of file-aid for RDW is set by an installation option which has an initial setting of 0(zero) which includes the RDW during record processing and displays it on output.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Sun Sep 07, 2008 7:54 am    Post subject: Reply with quote

Can FILEAID take a comp-3 input field and convert it to display format?

In other words,

Code:
---
..&.
0350
290C


can it take the field above and display it as : 2395.00 or 239500 ?


Code:
//SYSIN    DD *                           
$$DD01 COPY PADCHAR=C' ',                 
       IF=(5,EQ,C'20'),                   
       MOVE=(001,13,005),                 
*      BYTES 351-354 =  COMP-3 PIC S9(5)V99
       MOVE=(016,??,351),                 
       OUT=3                               
/*                                     
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sun Sep 07, 2008 10:02 am    Post subject: Reply with quote

tcurrier,


You can use DFSORT to convert the packed decimal numbers into readable formats. There are 27 pre-defined DFSORT editing masks are available for commonly used numeric editing patterns, encompassing many of the numeric notations used throughout the world. In addition, a virtually unlimited number of numeric editing patterns are available via user-defined editing masks.

27 Pre-defined Edit Mask Patterns

The above fileaid control cards can be translated to DFSORT control cards as follows

Code:

//SYSIN    DD *                           
  INCLUDE COND=(5,2,CH,EQ,C'20')
  SORT FIELDS=COPY
  OUTFIL ENDREC=3,BUILD=(1:5,13,16:351,4,PD,EDIT=(TTTTTT.TT))
/*


Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Sun Sep 07, 2008 11:55 am    Post subject: Reply with quote

Our shop uses SYNCSORT instead of DFSORT, but I am getting the
following error :

'OUTREC RDW NOT INCLUDED'

I did do some searching, and there is a lot of discussion about this error,
but I couldn't find any resolutions.

My input file is (VB,LRECL=20719)
output file is (FB,LRECL=80)

Code:
SYSIN :                                                           
  INCLUDE COND=(5,2,CH,EQ,C'20')                                 
  SORT FIELDS=COPY                                               
  OUTFIL ENDREC=3,BUILD=(5:5,13,20:351,4,PD,EDIT=(TTTTTT.TT))     
WER276B  SYSDIAG= 7501034, 10229370, 10229370, 4403637           
WER164B  8,944K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B     0 BYTES RESERVE REQUESTED, 3,052K BYTES USED         
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                   
WER108I  SORTIN   : RECFM=VB   ; LRECL= 20719; BLKSIZE= 23476     
WER235A  SORTOUT  OUTREC RDW NOT INCLUDED                         
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                     
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE     
Back to top
View user's profile Send private message
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Sun Sep 07, 2008 1:10 pm    Post subject: Reply with quote

Two problems:

1 - I didn't include the VTOF parameter

2- My 'built' record wasn't the same length as the LRECL specified
on my output DCB parameter (LRECL=80)

This is working now:

Code:
//SYSIN    DD *                                     
  INCLUDE COND=(5,2,CH,EQ,C'20')
  SORT FIELDS=COPY               
  OUTFIL ENDREC=3,               
  BUILD=(1:5,13,       
* CONVERT COMP-3 FIELD TO DISPLAY :           
  16:351,4,PD,EDIT=(TTT,TTT.TT),
* PAD WITH SPACES TO BYTE 80  :   
  80:X),                         
* CONVERT VARIABLE TO FIXED :   
  VTOF                           
/*           
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group