View previous topic :: View next topic
|
Author |
Message |
i413678 Currently Banned Active User
Joined: 19 Feb 2005 Posts: 112 Location: chennai
|
|
|
|
Hi,
My requirement is as follows:
I have one input file with first 10bytes as the key.
Input Data in the first 10 bytes is as follows:
ABCDEADJ01
ABCDEADJ02
ABCDEADJ03
ABCDEADJ04
ABCDEADJ05
ABCDEAFK01
ABCDE4NPAA
ABCDE4NPAB
ABCDE4NPAC
ABCDE4NPAD
ABCDE4NPAE
Now my requirement is I want to maintain the key as first 10 bytes only but I want the data as follows:
ABDEADJ001
ABDEADJ002
ABDEADJ003
ABDEADJ004
ABDEADJ005
ABDEAFK001
ABDE4NPAA
ABDE4NPAB
ABDE4NPAC
ABDE4NPAD
ABDE4NPAE
The actual requirement is as follows:
1. I want to change first 5 bytes to 4 bytes only..............
i.e. ABCDE will change to ABDE
2. I want to add 8th character as follows
if 9th byte has numeric value I should populate 8th byte as zero and
if 9th byte has character No need to populate any thing in 8th byte but I should move 9th and 10th characters to 8th and 9th positions and 10th character should be space.
Please Note : Previously the key is 5,5 after requirement it should change to 6,4.............
I hope you understood my requirement.
May I know whether it can be done using JCL 3.4 commands or using any JCL sort or any other way to do this......
Thx in advance..........
pavan |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Pavan,
The following SORT CARD might do the trick for you. Please remeber this card is not tested.
Code: |
//SYSIN DD *
INREC FIELDS=(1,2, * FIRST 2 CHARACTERS
4,5, * SKIP OUT 3 CHARACTER AND START FRM 4
C' ', * BLANK OUT 8th POS TEMPROARILY
9,n) * WHERE n=LRECL-8
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(9,1,FS,EQ,NUM),
OVERLAY=(8:C'0'))
IFTHEN=(WHEN=(9,1,FS,NE,NUM),
OVERLAY=(8:9,2, * MOVE 9, 10 POS to 8, 9 Pos
10:C' ') * BLANK OUT 10 COLUMN
/*
|
|
|
Back to top |
|
|
i413678 Currently Banned Active User
Joined: 19 Feb 2005 Posts: 112 Location: chennai
|
|
|
|
First of all thank for quick reply.
But, May I know is NUM is keyword to check numercis as I am getting the error when I am using this NUM.....
Please suggest...
pavan |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
yes NUM is a keyword.
Please paste the snapshot of the error that you are facing |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
pavan,
You need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's NUM function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:
Use [URL] BBCode for External Links
But since you posted in the JCL Forum rather than the DFSORT Forum, I assume you have Syncsort. not DFSORT. Syncsort doesn't support the NUM function. |
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
I guess this should be enough in ISPF 3.4 options.
c all 'c' '' 3
c all '0' '00' 9. |
|
Back to top |
|
|
|