View previous topic :: View next topic
|
Author |
Message |
gomathisankar
New User
Joined: 07 Jul 2006 Posts: 2 Location: Louisville,KY, USA
|
|
|
|
I am viewing the dataset using layout in fileaid.
Which has binary variable & comp-3 fields.
If we view through dataset some junk characters were displayed.
But using fileaid we can able to see the value.I want to download those values into another dataset. How can we achive this |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
You can use batch FILEAID to take a field (or fields) of each record in a dataset and place this field into its own dataset:
Code: |
//FILEAID EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=INPUT.FILE,DISP=SHR
//DD01O DD DSN=OUTPUT.FILE,
// DISP=(NEW,CATLG),
// UNIT=(SYSDA),SPACE=(TRK,(5,5),RLSE),
// DCB=(RECFM=FB,LRECL=21,BLKSIZE=2100)
//SYSIN DD *
$$DD01 COPYALL PADCHAR=C' ',MOVE=(1,20,11)
/*
|
In the above example, the coding of the MOVE parameter will decide what part of the record to COPY. MOVE=(1,20,11) would indicate to MOVE 20 positions starting at position 11 of the input record to position 1 of the output record. If the output dataset has an LRECL greater than 20 positions (in my example I am using an LRECL of 21), the remainder of the record will be padded with blanks. COPYALL indicates to copy every record. |
|
Back to top |
|
|
Nithinra
New User
Joined: 03 Jul 2006 Posts: 11
|
|
|
|
If you have a Copybook for that file , You can map it using File Aid.
When you map it you can see the data correctly.
Regards,
Nithin |
|
Back to top |
|
|
rainye
New User
Joined: 11 Jul 2006 Posts: 8
|
|
|
|
It seems that a DFSORT can do the same thing , right ?
Is there any difference ? |
|
Back to top |
|
|
hermit_reloaded
New User
Joined: 23 Apr 2007 Posts: 26 Location: India
|
|
|
|
kindly tell me the way to open a vsam file and also map it with the given copybook using batch fileaid. |
|
Back to top |
|
|
|