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 9(3) field to 9(4) field

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

New User


Joined: 21 Nov 2007
Posts: 9
Location: India

PostPosted: Wed Nov 21, 2007 4:30 pm    Post subject: Converting 9(3) field to 9(4) field
Reply with quote

Hi,

Can we convert a 9(3) field to 9(4) field using DFSORT?.
The input file is of 120 byte (record layout is of 100 bytes data and 20 byte filler). The field i need to convert is at starting offset 48. Can we handle the length increase of a field in between using DFSORT?

Thanks in advance,

Thanks,
Nobin
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 4:38 pm    Post subject: Reply to: Converting 9(3) field to 9(4) field
Reply with quote

nobin,

Yes, that is possible. But to do that u need to give more details.

1) What should be the output record length? Shd it be +1 of that of input file?

If yes, Use OUTREC/INREC BUILD for your requirement.
Back to top
View user's profile Send private message
nobin

New User


Joined: 21 Nov 2007
Posts: 9
Location: India

PostPosted: Wed Nov 21, 2007 5:06 pm    Post subject:
Reply with quote

Hi Aaru,

Actually I need to update the input file. Since there is enough filler available, I need to keep the file length same and do the required offset adjustments. For eg:
Currently,
Field A occupies 1 to 47 offset,
Field B occupies 3 bytes starting from 48 position (this of 9(3))
Field C occupies 51 to 100 offsets and filler occupying remaining 20 bytes.

I need to update the file as below,
Field A --> 1 to 47 offset
Field B occupies 4 bytes starting from 48 position (this field needs to be converted from 9(3) to 9(4)).
Field C --> 52 to 101 offsets and remaining 19 bytes filler.


Thanks,
Nobin
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Nov 21, 2007 5:45 pm    Post subject:
Reply with quote

use this untested SORT card
Code:
//SYSIN   DD *
 OPTION COPY
 INREC BUILD=(1,47,48:48,3,ZD,EDIT=(TTTT),
                        51,50,120:X)
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Nov 21, 2007 11:16 pm    Post subject:
Reply with quote

Nobin,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file (FB/120)
//SORTOUT DD DSN=...  output file (FB/120)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1:1,47,
    48:48,3,ZD,TO=ZD,LENGTH=4,
    52:51,69)
/*


TO=ZD will use an F sign for the positive 4-byte ZD values. If you want a C sign instead, use TO=ZDC instead of TO=ZD.

Krisprems,

Code:

48,3,ZD,EDIT=(TTTT)


will work for positive values only which might be what's needed as implied by the format of 9(4), but TO=ZD,LENGTH=4 is probably a better choice since it will handle positive and negative values. TO=ZDC is obviously the best choice if C signs are needed.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Nov 21, 2007 11:22 pm    Post subject:
Reply with quote

sorry Frank, i couldnt test it.I was away from mainframe
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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