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
 

 

Option of USING MOVE keyword in SORT`

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Guruprasad.R

New User


Joined: 03 Sep 2009
Posts: 2
Location: US

PostPosted: Thu Sep 03, 2009 11:25 pm    Post subject: Option of USING MOVE keyword in SORT`
Reply with quote

I have a JCL step that executes a FileAID utility like below:
------------------------------------------------------------------------------------
//PS010 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=A
//DD01 DD DSN=BEXP.PMSTB.N.IMAGE.XREF.PDSE,DISP=SHR
//DD01O DD DISP=(NEW,CATLG,CATLG),DSN=BEXD.PMSTB.N.MEM,
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=0,
// SPACE=(TRK,(75,5),RLSE)
//SYSIN DD *
$$DD01 COPYALL IF=(1,EQ,C'CMA'),
MOVE=(+0,C'$$DD01 LMODDIR MEMBER='),
MOVE=(+0,8,40),
OUT=0
//*
----------------------------------------------------------------------------------
Infile looks like this:

CMA02254P01'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225401)'
CMA02254P02'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225402)'
CMA02254P03'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225403)'
CMA02254P04'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225404)'
CMA02254P05'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225405)'

And after writing, the Outfile looks like this:

$$DD01 LMODDIR MEMBER=C0225401
$$DD01 LMODDIR MEMBER=C0225402
$$DD01 LMODDIR MEMBER=C0225403
$$DD01 LMODDIR MEMBER=C0225404
$$DD01 LMODDIR MEMBER=C0225405

I was trying to achieve the same result thru SORT or ICETOOL, I am facing some problem with syntax. Can someone please provide me a syntax for addressing the above situation.
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: Thu Sep 03, 2009 11:34 pm    Post subject:
Reply with quote

The equivalent DFSORT job would be:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=BEXP.PMSTB.N.IMAGE.XREF.PDSE,DISP=SHR
//SORTOUT DD DISP=(NEW,CATLG,CATLG),DSN=BEXD.PMSTB.N.MEM,
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=0,
// SPACE=(TRK,(75,5),RLSE)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'CMA'),
    BUILD=(C'$$DD01 LMODDIR MEMBER=',40,8,80:X))
/*
Back to top
View user's profile Send private message
Guruprasad.R

New User


Joined: 03 Sep 2009
Posts: 2
Location: US

PostPosted: Thu Sep 03, 2009 11:52 pm    Post subject: Equivalent SORT
Reply with quote

Thanks for the Solution. it works as desired. I just had one small question. What does this 80:X for in this Build ?
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: Fri Sep 04, 2009 12:44 am    Post subject:
Reply with quote

80:X is a convenient way of setting the record length (and LRECL) to 80.

It just says to pad out the records with blanks from the last specified position to position 80. So in the output records you would have the constant, the 40,8 input field and then blanks up to and including position 80, and the LRECL would automatically be set to 80.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
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 SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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