View previous topic :: View next topic |
Author |
Message |
eskaysem Beginner
Joined: 31 Mar 2003 Posts: 29 Topics: 13
|
Posted: Mon Jun 02, 2008 2:54 pm Post subject: Selective read-write from a VB file |
|
|
Hello,
I need a JCL to compare 2 VB files of LRECL 730.
In that JCL I need to see if the record type ( on pos 17th) is a "OO" and when it is OO, then it should read positions 1 thru 12 and 257 thru 265 and write it on to a seperate file.
PS: Postion 257 thru 265 on the 'OO' type record is hex coded. It would be great if this is converted too.
Appreciate your help..
thanks!
sk _________________ Thanks!,
Santosh Kulkarni |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Jun 02, 2008 3:05 pm Post subject: |
|
|
eskaysem,
You are asking 2 separate issues. First you say you want to compare and then you say you want to extract the contents . if your intention is to copy the contents when the record is OO to a FB dataset then use the following control cards
we add 4 to the actual pos as VB have the RDW.
Code: |
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(21,2,CH,EQ,C'OO')
OUTFIL VTOF,BUILD=(5,12,261,9)
/*
|
Hope this helps...
Cheers _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
eskaysem Beginner
Joined: 31 Mar 2003 Posts: 29 Topics: 13
|
Posted: Mon Jun 02, 2008 4:31 pm Post subject: |
|
|
Thanks for your help Kolusu.
When I used syncsort with the control card you specified, I'm getting an error saying "Build is unidentified". I dont think we do have DFSort utility here.
Regards,
Sk _________________ Thanks!,
Santosh Kulkarni |
|
Back to top |
|
|
amargulies Beginner
Joined: 10 Jan 2007 Posts: 123 Topics: 0
|
Posted: Tue Jun 03, 2008 10:56 am Post subject: |
|
|
eskaysem wrote: | I'm getting an error saying "Build is unidentified". |
If you are running SyncSort for z/OS 1.2.1.0 or later, then the control statements specified should work fine.
However, if you are on an earlier release of SyncSort, then you can simply change BUILD to OUTREC and the job should run.
If you are still encountering a problem, please feel free to contact me offline at alissa.margulies@syncsort.com with the complete job listing and I would be happy to assist you further. _________________ Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com |
|
Back to top |
|
|
eskaysem Beginner
Joined: 31 Mar 2003 Posts: 29 Topics: 13
|
Posted: Tue Jun 03, 2008 2:12 pm Post subject: |
|
|
Thank you Alissa and Kolusu.
I was able to copy the contents using fileaid.
Another issue I'm facing now is some part of the data is EBCDIC and is there anyway that when I copy over(probably could be nother step?) to the destined dataset, could it be in the printable format?
The EBCDIC data starts on postion 18 thru 22 and 24 thru 28.
Thanks a lot!!
Santosh _________________ Thanks!,
Santosh Kulkarni |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue Jun 03, 2008 2:58 pm Post subject: |
|
|
If it is on MVS then probably the entire file is in EBCDIC. Do you mean some of the decimal data is in PACKED DECIMAL format and you would like to convert it to ZONED DECIMAL i.e. eye-readable? IF so, tthis is definitely possible with the sort facilities - you can read the manual or search this forum for examples. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
|
|