MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Record reformat using INSYNC

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Thu May 26, 2005 1:21 pm    Post subject: Record reformat using INSYNC Reply with quote

i would like to know if we can give nested case constructs in INSYNC
If so how to give the same

I am not sure about this
Basically i want to check that a record starts with say SR2RT and it has numeric digits in 2 bytes at 105,2 position If so i want to prefix the 105,2 field by a 0 if it starts with SR2RT and it does not have numeric digits in 2 bytes at 105,2 position then i want to prefix the 105,2 field by a space

I dont want to use sort since i have a lower version of sort & it is a bit complicated
I gave the below & it is not working as desired
Code:

   SEARCHDATA=(1,8,EQ,'SR2RT   '),AND,     
                  (105,1,GE,'0'),AND,     
                  (105,1,LE,'9'),AND,     
                  (106,1,GE,'0'),AND,     
                  (106,1,LE,'9')           
     MOVE=(1,104,C,1,104,C)               
     MOVE=(105,1,C,X'F0')                 
     MOVE=(106,63,C,105,63,C)             
   SEARCHDATA=(1,8,EQ,'SR2RT   ')         
       MOVE=(1,104,C,1,104,C)             
       MOVE=(105,1,C,X'40')               
       MOVE=(106,63,C,105,63,C)           
 ENDCASE                                   

Pls help me
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Thu May 26, 2005 2:03 pm    Post subject: Reply with quote

Deepa,

If your shop has file-aid then the following JCL will give you desired results.

Code:

//STEP0100 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*               
//DD01     DD DSN=YOUR INPUT FILE,
//            DISP=SHR
//DD01O    DD DSN=YOUR OUTPUT FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *                       
$$DD01 COPYALL IF=(1,EQ,C'SR2RT'),   
              AND=(105,2,EQN),         
              REPL=(105,C'00'),       
              IF=(1,EQ,C'SR2RT'),   
              AND=(105,2,NEN),         
              REPL=(105,C'  ')         
/*                     


Code:

EQP       Equal packed
NEP       Not equal packed
EQN       Equal numeric
NEN       Not equal numeric               


Hope this helps...

Cheers

Kolusu

Ps: Please post your LRECL and RECFM , I will try to post a solution using sort which will work even on older versions.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Thu May 26, 2005 4:33 pm    Post subject: Reply with quote

Deepa12,

Untested control cards for INSYNC.

Code:

CASE
SEARCHDATA=(1,8,EQ,'SR2RT '),AND,
           (105,1,GE,'0'),AND,
           (105,1,LE,'9'),AND,
           (106,1,GE,'0'),AND,
           (106,1,LE,'9')
      MOVE=(1,104,C,1,104,C)
      MOVE=(105,1,C,X'F0')
      MOVE=(106,63,C,105,63,C)
*
CASE
SEARCHDATA=(1,8,EQ,'SR2RT ')
      MOVE=(1,104,C,1,104,C)
      MOVE=(105,1,C,X'40')
      MOVE=(106,63,C,105,63,C)
ENDCASE


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Fri May 27, 2005 2:42 am    Post subject: Reply with quote

Thanks a lot... I will check this out... I dont have fileaid...But i will check the IINSYNC part & get back
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Mon May 30, 2005 9:14 am    Post subject: Reply with quote

Ya.. This worked..
The lrecl=1068 & recfm=fb
If you dont mind you can give me a SORT based soln also
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Mon May 30, 2005 12:39 pm    Post subject: Reply with quote

Hi Kolusu,
Could you please give me some more details about this INSYNC?
Is this a product of SYNC INC?

Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Mon May 30, 2005 3:01 pm    Post subject: Reply with quote

bprasanna ,

INSYNC is a file and data management tool from macro4 just like File-aid. It is no way related to syncsort.

Check this link for a detailed explanation of the tool

http://www.macro4.com/solutions/products/insync/index.html#inotechfeatures

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue May 31, 2005 9:59 am    Post subject: Reply with quote

deepa12,

Try this sort control cards.

Code:

  SORT FIELDS=COPY                                   
  INREC FIELDS=(1,1068,     $ TOT LRECL
                1,5,        $ FIRST 5 BYTES
                105,2)      $ 2 BYTES FROM POS 105
  OUTREC FIELDS=(1,1073,                               
                 1074:1069,6,CHANGE=(1,C'SR2RT0',C'0',   
                                       C'SR2RT1',C'0',   
                                       C'SR2RT2',C'0',   
                                       C'SR2RT3',C'0',   
                                       C'SR2RT4',C'0',   
                                       C'SR2RT5',C'0',   
                                       C'SR2RT6',C'0',   
                                       C'SR2RT7',C'0',   
                                       C'SR2RT8',C'0',   
                                       C'SR2RT9',C'0'), 
                                      NOMATCH=(C' '),     
                 1075,1)                               
  OUTFIL OUTREC=(1,104,                               
                 105:1069,7,CHANGE=(2,C'SR2RT00',C'00',
                                      C'SR2RT01',C'00',
                                      C'SR2RT02',C'00',
                                      C'SR2RT03',C'00',
                                      C'SR2RT04',C'00',
                                      C'SR2RT05',C'00',
                                      C'SR2RT06',C'00',
                                      C'SR2RT07',C'00',
                                      C'SR2RT08',C'00',
                                      C'SR2RT09',C'00'),
                                      NOMATCH=(C'  '),   
                 107,962)                             
/*                   



Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Tue May 31, 2005 11:17 am    Post subject: Reply with quote

Hi Kolusu,
Thanks a lot for the info!!!

Thanks
Bprasanna
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group