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
 

 

Converting PD to ZD in VB file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Wed Nov 09, 2011 12:18 am    Post subject: Converting PD to ZD in VB file
Reply with quote

Hi,

My mainframe shop is having SYNCSORT and I'm having the following requirement.

1. Convert all the packed decimals in the file to zone decimals.
2. Input file is VB of 1000 record lenght.
3. In 210,225,245,235,255 lenght there are few packed decimals. But only for few records , details will be available after 210.
4. So when ever I try to convert the record after 210, the records for which no details are available it is not converting since the values for the fields short records are null.

Due to that I'm getting short record error.


Below is the JCL I was trying t use.

Code:
//STEP1   EXEC PGM=SORT,PARM='VLTESTI=2'                       
//SORTIN   DD DSN=TEST.CS9.TAPEMIGR.F3A,DISP=SHR               
//SORTOUT  DD DSN=TEST.CS9.TAPEMIGR.F3B,DISP=SHR               
//SORTLIB  DD DSN=SYS1.SORTLIB,DISP=SHR                         
//SYSOUT DD SYSOUT=*                                           
//SYSIN DD *                                                   
 INCLUDE COND=((205,1,CH,NE,C' '),AND,(229,1,CH,NE,C' '))       
 SORT FIELDS=COPY                                               
 OUTREC FIELDS=(1,4,5,110,                                     
                115,6,PD,EDIT=(TTTTTTTTT.TT),                   
                121,6,PD,EDIT=(TTTTTTTTT.TT),                   
                127,6,PD,EDIT=(TTTTTTTTT.TT),                   
                133,6,PD,EDIT=(TTTTTTTTT.TT),                   
                139,6,PD,EDIT=(TTTTTTTTT.TT),                   
                145,6,PD,EDIT=(TTTTTTTTT.TT),                   
                151,6,PD,EDIT=(TTTTTTTTT.TT),                   
                157,6,PD,EDIT=(TTTTTTTTT.TT),                   
                163,37,                                         
                201,2,PD,EDIT=(TTT),                           
                203,2,PD,EDIT=(TTT),                           
                205,12,                                         
                217,6,PD,EDIT=(TTTTTTTTT.TT),                   
                223,6,PD,EDIT=(TTTTTTTTT.TT),                   
                229,12,1000:X)                                 
//*             241,6,PD,EDIT=(TTTTTTTTT.TT),                   
//*             247,6,PD,EDIT=(TTTTTTTTT.TT),1000:X)           
/*             


In which fields after 217 is having short records issue. Since most of the records are not having records greater than 210. Please help me on how to solve this issue
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Nov 09, 2011 12:32 am    Post subject: Reply to: Converting PD to ZD in VB file
Reply with quote

If you have different record-types on the file, test the field which differentiates them and only attempt conversion of the fields on that record-type.

If you have occurs, with different numbers of entries, then test the count of the number of entries.

If you have both, do both.

If you have none of the above 1) you should 2) you could try to use the record-length.

EDIT: Are those decimal-points you are putting in most of the fields? That makes your field Numeric Edited not Zoned Decimal. Is that what you want?
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: Wed Nov 09, 2011 12:46 am    Post subject:
Reply with quote

Hello,

Surely not what you are looking for, but why does someone believe it is a good idea to change the data from packed to zoned? This will waste space as well as require more resources to process.

If some data needs to be downloaded to a pc for example, that data could be formatted to be pc-friendly without making a mess of the entire data file.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Wed Nov 09, 2011 12:55 am    Post subject:
Reply with quote

We are migrating data from one platform to another platform.So we need to migarate history data also.

So at any cost we need to do this.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Nov 09, 2011 1:14 am    Post subject:
Reply with quote

r2k1984 wrote:
We are migrating data from one platform to another platform.So we need to migarate history data also.

So at any cost we need to do this.

The implication being that you are migrating off the mainframe to a programmable calculator enviroment?
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: Wed Nov 09, 2011 1:24 am    Post subject:
Reply with quote

Hello,

Quote:
We are migrating data from one platform to another platform.So we need to migarate history data also.
Yup, bringing the history info would be a good thing. . . icon_smile.gif

Depending on the target platform, you may be ahead if the values are sent "edited" - including the sign and the decimal point, etc.

As to your actual question - please look at this topic and see if it will help:
http://ibmmainframes.com/viewtopic.php?t=49812&highlight=vlshrt
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Nov 09, 2011 2:18 am    Post subject:
Reply with quote

There is nothing an auditor whould like more then going back to history info and not being able to tell debits from credits.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Wed Nov 09, 2011 2:56 am    Post subject:
Reply with quote

Thanks for all your inputs .

I tried with VLTESTI=2 and 1 and also added VLSHRT. Job abends if I'm removing the include condition .

If I add the include condition ,job is working fine. I have a big occurs field and there can be random records for the fields.

Please provide inputs.

Below is the JCL I was using with include condition.
Code:
//STEP1   EXEC PGM=SORT,PARM='VLTESTI=1'                               
//SORTIN   DD DSN=TEST.CS9.TAPEMIGR.F3A,DISP=SHR                       
//SORTOUT  DD DSN=TEST.CS9.TAPEMIGR.F3B,DISP=SHR                       
//SORTLIB  DD DSN=SYS1.SORTLIB,DISP=SHR                                 
//SYSOUT DD SYSOUT=*                                                   
//SYSIN DD *                                                           
 OPTION COPY,VLSHRT                                                     
 INCLUDE COND=((205,1,CH,NE,C' '),AND,(229,1,CH,NE,C' '))               
 SORT FIELDS=COPY                                                       
 OUTREC FIELDS=(1,4,5,110,                                             
                115,6,PD,EDIT=(TTTTTTTTT.TT),                           
                121,6,PD,EDIT=(TTTTTTTTT.TT),                           
                127,6,PD,EDIT=(TTTTTTTTT.TT),                           
                133,6,PD,EDIT=(TTTTTTTTT.TT),                           
                139,6,PD,EDIT=(TTTTTTTTT.TT),                           
                145,6,PD,EDIT=(TTTTTTTTT.TT),                           
                151,6,PD,EDIT=(TTTTTTTTT.TT),                           
                157,6,PD,EDIT=(TTTTTTTTT.TT),                           
                163,37,                                                 
                201,2,PD,EDIT=(TTT),                                   
                203,2,PD,EDIT=(TTT),                                   
                205,12,                                                 
                217,6,PD,EDIT=(TTTTTTTTT.TT),                           
                223,6,PD,EDIT=(TTTTTTTTT.TT),                           
                229,12,1000:X),CONVERT       


Below is the error message , I'm getting if I dont use include condition.
Code:
 OPTION COPY,VLSHRT                                                         
 SORT FIELDS=COPY                                                           
 OUTREC FIELDS=(1,4,5,110,                                                 
                115,6,PD,EDIT=(TTTTTTTTT.TT),                               
                121,6,PD,EDIT=(TTTTTTTTT.TT),                               
                127,6,PD,EDIT=(TTTTTTTTT.TT),                               
                133,6,PD,EDIT=(TTTTTTTTT.TT),                               
                139,6,PD,EDIT=(TTTTTTTTT.TT),                               
                145,6,PD,EDIT=(TTTTTTTTT.TT),                               
                151,6,PD,EDIT=(TTTTTTTTT.TT),                               
                157,6,PD,EDIT=(TTTTTTTTT.TT),                               
                163,37,                                                     
                201,2,PD,EDIT=(TTT),                                       
                203,2,PD,EDIT=(TTT),                                       
                205,12,                                                     
                217,6,PD,EDIT=(TTTTTTTTT.TT),                               
                223,6,PD,EDIT=(TTTTTTTTT.TT),                               
                229,12,1000:X),CONVERT                                     
WER901I  **WARNING** SYNCSORT 1.3.2.2 WILL EXPIRE IN 32 DAYS               
WER276B  SYSDIAG= 94277, 632830, 632830, 1943100                           
WER164B  8,876K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,         
WER164B     0 BYTES RESERVE REQUESTED, 2,309,064 BYTES USED                 
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                             
WER108I  SORTIN   : RECFM=VB   ; LRECL=  1004; BLKSIZE= 27998               
WER237I  OUTREC RECORD LENGTH =  1000                                       
WER110I  SORTOUT  : RECFM=FB   ; LRECL=  1004; BLKSIZE= 27108               
WER462I  OUTPUT LRECL DIFFERS FROM SORTOUT LRECL                           
WER410B  7,848K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,   
WER410B     0 BYTES RESERVE REQUESTED, 2,161,608 BYTES USED                 
WER244A  OUTREC - SHORT RECORD                                             
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE         
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Nov 09, 2011 2:59 am    Post subject: Reply to: Converting PD to ZD in VB file
Reply with quote

I agree about the signs. Unless the there is something, external to the amount field which tells you with absolute certainty what is what, I can't see how you can go without them.

'd have done this in Cobol. Checking everything I can for logical consistency, a big report, printed cross-reference, cross-reference file... headers and trailers on everything.

Going out with a SORT doing a blind field conversion seems to be going out with a whimper, instead of a BANG! Have the users saying "that old system, it only had green screens, but boy that history report never lets us down".

Not my call, though, is it?
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: Wed Nov 09, 2011 3:37 am    Post subject:
Reply with quote

Hello,

You might try:
OPTION VLSHRT
SORT FIELDS=COPY

instead of:
OPTION COPY,VLSHRT
SORT FIELDS=COPY

for the run without the INCLUDE. Untested, but may be worth a shot. . .
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Wed Nov 09, 2011 4:35 am    Post subject:
Reply with quote

Thanks Dick for the inputs.

I tried both the options .Both are not working.

Any other ideas?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Nov 09, 2011 4:52 am    Post subject: Reply to: Converting PD to ZD in VB file
Reply with quote

In general the VLSHRT sort of stuff is going to affect SORT fields, INCLUDE/OMIT fields and SUM fields, I believe.

Consult the documentation to verify if there is some way to use it for this purpose.
Also check on the output lrecl message you are getting.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Nov 09, 2011 6:50 am    Post subject:
Reply with quote

Hi,

you could change your include to something like this this
Code:
  INCLUDE COND=(1,2,BI,GE,+240,&,                 
            205,1,CH,EQ,C' ',&,229,1,CH,EQ,C' ')


Gerry
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Wed Nov 09, 2011 11:10 am    Post subject:
Reply with quote

Issue with Short record is solved but I didnt get any reocrds in output.

Could you please explain the condition?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Nov 09, 2011 11:18 am    Post subject:
Reply with quote

Hi,
it's selecting records longer or equal to 240 bytes
sorry it should be
Code:
  INCLUDE COND=(1,2,BI,GE,+240,&,                 
            205,1,CH,NE,C' ',&,229,1,CH,NE,C' ')


Gerry
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Wed Nov 09, 2011 11:50 pm    Post subject:
Reply with quote

I tried it. Now job is not getting abended and no records are found in output.
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 Nov 10, 2011 1:04 am    Post subject:
Reply with quote

Hello,

Suggest you hex-dump a few blocks of data and make sure your displacements are correct. . .

Possibly there are no records that meet the first part of the INCLUDE?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Nov 10, 2011 5:27 am    Post subject: Reply to: Converting PD to ZD in VB file
Reply with quote

Is this a file with variable-length records but only one type of record?

If so, somewhere there must be a count of the number of occurences.

You'd have to do all your static fields, then do some test to know how many of the coversions to do for the variable fields.

If you proceed with what you have now (setting aside for the moment the fact that it does not work) won't you only be changing the long records, and leaving all the others with their original packed data?
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Thu Nov 10, 2011 2:31 pm    Post subject:
Reply with quote

Try using VLFILL parameter, which i believe would help in your case.
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 -> JCL & VSAM 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 CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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