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
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am


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